delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2022/05/05/00:42:25

X-Recipient: archive-cygwin AT delorie DOT com
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 684233858D3C
Authentication-Results: sourceware.org;
dmarc=fail (p=none dis=none) header.from=nifty.ne.jp
Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=nifty.ne.jp
DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-04.nifty.com 2454fAR1002433
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.ne.jp;
s=dec2015msa; t=1651725670;
bh=Pe9TMQb+SzOcDAJFtbtr2+vazlUZcNER13FqdDdLOGY=;
h=Date:From:To:Cc:Subject:In-Reply-To:References:From;
b=1LJN/yKWufY6Fm714+pq1o8dytVD/800B1jX7RQdI7zo90K9dRhGBhojuz7NKL9zh
j22pkrlmEIP2aQUFbAdA+RQM273tUSbhNrcBvYQBqNi+yB4qBjiapmJBeN+alHVLsH
28Q+1Bq6ty07NiXxoxVOYlPMXMR4Eatucv4p6aN9ZuhHtJLjjtGDK77ZtOO79xvepa
ALRVu1l5nald4VNYJygC7Zssq47yyrj/t5bkF3owxSsc2NBn06P76lHSuyGNyxOSWq
XC5l0kGmba/GFRJIbMmXNeXKjc7vPpQa8+nhyTfe52T+KwtrApQfFWlJpTXhpQDbse
nQVyc27AzVkRg==
X-Nifty-SrcIP: [119.150.44.95]
Date: Thu, 5 May 2022 13:41:20 +0900
From: Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp>
To: cygwin AT cygwin DOT com
Subject: Re: mintty crashes on Windows 7
Message-Id: <20220505134120.242af45a631131d7e4217f5e@nifty.ne.jp>
In-Reply-To: <20220505123307.e745d7c88877316b9a38d0c9@nifty.ne.jp>
References: <CAGHpTB+t+gCySabZZQvJstZSLresmoOTUUL8of9cwCdvmGySdg AT mail DOT gmail DOT com>
<20220504002343 DOT 4345bfe1630fa904276f0d37 AT nifty DOT ne DOT jp>
<CAGHpTB+3V98eWDaHv7DCa133KWS39FaDFMUo=8qOJjxTFon51A AT mail DOT gmail DOT com>
<20220504011018 DOT 7c455cedb38571f786d72ae9 AT nifty DOT ne DOT jp>
<CAGHpTBJyOgYAzEvs3NLb8AzkiujbCKjaf+w-QSJAou47g-J-Cg AT mail DOT gmail DOT com>
<CAGHpTB+tZX+z0ZkCNG-42bp4Pw+YKUXkccnnNqwN_tHRekk=UA AT mail DOT gmail DOT com>
<20220504201610 DOT 125888f234ffe063fa6773c0 AT nifty DOT ne DOT jp>
<CAGHpTBKphe_jSRS+9ihygODYGYYyzPfLPkt9H4rTDm9u7pMexw AT mail DOT gmail DOT com>
<20220505102045 DOT fd6bfd46732e2eab0451e28c AT nifty DOT ne DOT jp>
<20220505102724 DOT 11b5675450f2b4f723a8b70e AT nifty DOT ne DOT jp>
<20220505105954 DOT e910df2e6998d130a9373299 AT nifty DOT ne DOT jp>
<20220505123307 DOT e745d7c88877316b9a38d0c9 AT nifty DOT ne DOT jp>
X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32)
Mime-Version: 1.0
X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_NUMSUBJECT, NICE_REPLY_A,
RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP,
T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
Cc: Orgad Shaneh <orgads AT gmail DOT com>
Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>

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 DOT yano AT nifty DOT ne DOT 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 DOT yano AT nifty DOT ne DOT jp>

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019