From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from conssluserg-04.nifty.com (conssluserg-04.nifty.com [210.131.2.83]) by sourceware.org (Postfix) with ESMTPS id 54B453858016 for ; Wed, 4 May 2022 11:16:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 54B453858016 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 Received: from Express5800-S70 (ak044095.dynamic.ppp.asahi-net.or.jp [119.150.44.95]) (authenticated) by conssluserg-04.nifty.com with ESMTP id 244BG9LG029531; Wed, 4 May 2022 20:16:09 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-04.nifty.com 244BG9LG029531 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.ne.jp; s=dec2015msa; t=1651662969; bh=dY9gssRChQJW4EBqqg9fHZ93J2YQthRxVTJLT7Dx2d0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=lWQ9bGq9zeO3yrj/LqoHT0pEmiZj6zpKchtQ9EFFKJClXQXLnTgck1+I9c+d8PIJg aq5wHbws1G1FehDdRBBfyaheP1dDYhB8X7ihlc50qWOPZ3KJHJD3gqLbhUEXDwXTS9 XY526ryBtpNq35BpBsfiLRHtPBfBMsCuAcwuy4N4A3ZVAIT97x8NV+Dy/SpWerCOZC 6EeYFLzh1btvpgPxu7nQW0J8KBc1mueaIAkP8uDXkAdxypeCQYGLgvKT/cT56h6fe+ I+JNGtVPjAOLL2p+TqnxNq5GOLS0msrHaKCyIMlRPAhQR7QhhonOn69A+0xEqYz/C1 597lam0P33w6Q== X-Nifty-SrcIP: [119.150.44.95] Date: Wed, 4 May 2022 20:16:10 +0900 From: Takashi Yano To: cygwin@cygwin.com Cc: Orgad Shaneh Subject: Re: mintty crashes on Windows 7 Message-Id: <20220504201610.125888f234ffe063fa6773c0@nifty.ne.jp> In-Reply-To: References: <20220504002343.4345bfe1630fa904276f0d37@nifty.ne.jp> <20220504011018.7c455cedb38571f786d72ae9@nifty.ne.jp> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2022 11:16:48 -0000 On Wed, 4 May 2022 12:46:28 +0300 Orgad Shaneh wrote: > On Wed, May 4, 2022 at 12:33 PM Orgad Shaneh wrote: > > > > On Tue, May 3, 2022 at 7:10 PM Takashi Yano wrote: > > > > > > On Tue, 3 May 2022 18:52:28 +0300 > > > Orgad Shaneh wrote: > > > > On Tue, May 3, 2022 at 6:23 PM Takashi Yano 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 > > 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