public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Takashi Yano <takashi.yano@nifty.ne.jp>
To: cygwin@cygwin.com
Cc: Orgad Shaneh <orgads@gmail.com>
Subject: Re: mintty crashes on Windows 7
Date: Wed, 4 May 2022 20:16:10 +0900	[thread overview]
Message-ID: <20220504201610.125888f234ffe063fa6773c0@nifty.ne.jp> (raw)
In-Reply-To: <CAGHpTB+tZX+z0ZkCNG-42bp4Pw+YKUXkccnnNqwN_tHRekk=UA@mail.gmail.com>

On Wed, 4 May 2022 12:46:28 +0300
Orgad Shaneh wrote:
> On Wed, May 4, 2022 at 12:33 PM Orgad Shaneh <orgads@gmail.com> wrote:
> >
> > On Tue, May 3, 2022 at 7:10 PM Takashi Yano <takashi.yano@nifty.ne.jp> wrote:
> > >
> > > On Tue, 3 May 2022 18:52:28 +0300
> > > Orgad Shaneh wrote:
> > > > On Tue, May 3, 2022 at 6:23 PM Takashi Yano <takashi.yano@nifty.ne.jp> wrote:
> > > > >
> > > > > On Tue, 3 May 2022 14:47:17 +0300
> > > > > Orgad Shaneh wrote:
> > > > > > Hi,
> > > > > >
> > > > > > Running `mintty ./bash` crashes on Windows 7 on cygwin-3_3-branch.
> > > > > >
> > > > > > Tested in MSYS2 on merge-3.3 branch from
> > > > > > https://github.com/orgads/msys2-runtime-1. It includes the tip of
> > > > > > cygwin-3_3-branch as of today (05827d2df8).
> > > > > >
> > > > > I cannot reproduce this with cygwin git head of cygwin-3_3-branch.
> > > > > Is this MSYS2 specific problem?
> > > >
> > > > You're right. I can't reproduce either. Only in my MSYS branch.
> > > >
> > > > Can you give me some guidance how to debug it?
> > >
> > > If you could identify which commit causes the issue, It would help.
> >
> > 0e1847fb87f5306cda6c022540560c5926627ae1 is the first bad commit
> > commit 0e1847fb87f5306cda6c022540560c5926627ae1
> > Author: Takashi Yano <takashi.yano@nifty.ne.jp>
> > Date:   Mon Feb 28 20:25:09 2022 +0900
> >
> >     Cygwin: pty: Isolate CTRL_C_EVENTs between ptys.
> >
> >     - With this patch, unique invisible consoles are created for each pty
> >       to isolate CTRL_C_EVENTs between ptys. This is necessary by Ctrl-C
> >       handling in fhandler_termios::process_sigs() for non-cygwin apps
> >       started in pty if the pseudo console is disabled.
> >
> >  winsup/cygwin/fhandler_termios.cc |  6 ++----
> >  winsup/cygwin/fhandler_tty.cc     | 17 +++++++++++++++++
> >  winsup/cygwin/tty.cc              |  2 ++
> >  3 files changed, 21 insertions(+), 4 deletions(-)
> >
> > I tried reverting this commit, and it fixed the crash indeed.
> >
> > - Orgad
> 
> Reduced the revert to this:
> @@ -979,16 +979,10 @@ fhandler_pty_slave::open (int flags, mode_t)
>         code does not work as expected because it calls Win32
>         API directly rather than cygwin read()/write(). Due to
>         this behaviour, protection based on attach_mutex does
>         not take effect. */
>      get_ttyp ()->need_invisible_console = true;
> -  else if (_major (myself->ctty) != DEV_CONS_MAJOR
> -    && (!get_ttyp ()->invisible_console_pid
> -        || !pinfo (get_ttyp ()->invisible_console_pid)))
> -    /* Create a new invisible console for each pty to isolate
> -       CTRL_C_EVENTs between ptys. */
> -    get_ttyp ()->need_invisible_console = true;
>    else
>      {
>        acquire_attach_mutex (mutex_timeout);
>        fhandler_console::need_invisible ();
>        release_attach_mutex ();

A few things about this.

1) bash exits with exit code 127 for 'mintty bash'
2) 'mintty bash' does not work, but 'mintty ash' and 'mintty tcsh' work.

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>

  reply	other threads:[~2022-05-04 11:16 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-03 11:47 Orgad Shaneh
2022-05-03 15:23 ` Takashi Yano
2022-05-03 15:52   ` Orgad Shaneh
2022-05-03 16:10     ` Takashi Yano
2022-05-04  9:33       ` Orgad Shaneh
2022-05-04  9:46         ` Orgad Shaneh
2022-05-04 11:16           ` Takashi Yano [this message]
2022-05-04 13:27             ` Orgad Shaneh
2022-05-05  1:20               ` Takashi Yano
2022-05-05  1:27                 ` Takashi Yano
2022-05-05  1:59                   ` Takashi Yano
2022-05-05  3:33                     ` Takashi Yano
2022-05-05  4:41                       ` Takashi Yano
2022-05-05  6:44                         ` Takashi Yano
2022-05-05 22:48                           ` Takashi Yano
2022-05-06 14:05                             ` Orgad Shaneh
2022-05-06 17:22                               ` Brian Inglis
2022-05-06 19:02                               ` Takashi Yano
2022-05-06 19:16                               ` Johannes Schindelin
2022-05-06 20:13                                 ` Takashi Yano
2022-05-07  0:20                                   ` Takashi Yano
2022-05-08 11:08                                     ` Takashi Yano
2022-05-08 11:22                                       ` Orgad Shaneh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220504201610.125888f234ffe063fa6773c0@nifty.ne.jp \
    --to=takashi.yano@nifty.ne.jp \
    --cc=cygwin@cygwin.com \
    --cc=orgads@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).