mintty crashes on Windows 7
Takashi Yano
takashi.yano@nifty.ne.jp
Thu May 5 04:41:20 GMT 2022
On Thu, 5 May 2022 12:33:07 +0900
Takashi Yano wrote:
> On Thu, 5 May 2022 10:59:54 +0900
> Takashi Yano wrote:
> > On Thu, 5 May 2022 10:27:24 +0900
> > Takashi Yano wrote:
> > > On Thu, 5 May 2022 10:20:45 +0900
> > > Takashi Yano wrote:
> > >
> > > > On Wed, 4 May 2022 16:27:43 +0300
> > > > Orgad Shaneh wrote:
> > > > > On Wed, May 4, 2022 at 2:16 PM Takashi Yano <takashi.yano@nifty.ne.jp> wrote:
> > > > > >
> > > > > > > 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.
> > > > >
> > > > > Right. mintty dash also works.
> > > > >
> > > > > Notice that I did *not* set enable_pcon (not supported on Win7 anyway).
> > > >
> > > > Even without that commit (and also with msys2 3.3.4 release),
> > > > something wrong with msys2 in Windows 7.
> > > >
> > > > If you run script command (/usr/bin/script), bash crashes in
> > > > similar way. typescript file generated by script command is
> > > > as follows.
> > > >
> > > > Script started on 2022-05-05 10:12:28+09:00 [TERM="cygwin" TTY="/dev/cons0" COLUMNS="80" LINES="25"]
> > > >
> > > > Script done on 2022-05-05 10:12:29+09:00 [COMMAND_EXIT_CODE="127"]
> > > >
> > > > bash also exited with exit code 127.
> > >
> > > Ah, this only occurs if script command is started in console.
> >
> > And also this is caused by:
> > get_ttyp ()->need_invisible_console = true;
> > at another place.
>
> I found that bash crashes at:
> h = GetProcessWindowStation ();
> in fhandler_console::need_invisible().
I downloaded bash source files from:
https://git.savannah.gnu.org/git/bash.git
and built it by:
./configure && make
and replaced /usr/bin/bash.
Then the issue disappeared.
Now, I start to suspect the issue is a bug of msys2 bash package.
--
Takashi Yano <takashi.yano@nifty.ne.jp>
More information about the Cygwin
mailing list