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: Thu, 5 May 2022 13:41:20 +0900 [thread overview]
Message-ID: <20220505134120.242af45a631131d7e4217f5e@nifty.ne.jp> (raw)
In-Reply-To: <20220505123307.e745d7c88877316b9a38d0c9@nifty.ne.jp>
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>
next prev parent reply other threads:[~2022-05-05 4:41 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
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 [this message]
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=20220505134120.242af45a631131d7e4217f5e@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).