delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2023/01/18/04:18:23

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 385C43858410
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1674033457;
bh=qE3LVfi2QjKWkdM9Cq5ByzJYdwTGAjvrzW1rqj0JaI8=;
h=Date:To:Subject:In-Reply-To:References:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
From;
b=CVHKxJ08ICcZnvxUg/5/LUsnU9cXQkQLQlhfa37roURPjIHTX4Kwk/L1nXDO2D7QE
bmqIWF8A+o6oo4doF6uynwpkd4WN1RyiREGiVPIJ+SOm0/hq/DwNFIZ54rZWlbCRNu
4kqbGxuqTkiw24pqXjmxIcHQlyUtVTkwmg69rSvw=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 09A943858D28
DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-05.nifty.com 30I9Gn5v023560
X-Nifty-SrcIP: [220.150.135.41]
Date: Wed, 18 Jan 2023 18:16:48 +0900
To: cygwin AT cygwin DOT com
Subject: Re: Cygwin 3.4.3 and 3.5.0... hangs in make, top, procps, ls
/proc/PID/...
Message-Id: <20230118181648.362c4665be80637108e4fd36@nifty.ne.jp>
In-Reply-To: <Y8cJHDaXbQ2ZQSzn@calimero.vinschen.de>
References: <4a4427cc-422b-1d14-015e-26523e620d9b AT Shaw DOT ca>
<20230102113201 DOT 476c10bef7a5643bddc00762 AT nifty DOT ne DOT jp>
<20230102143803 DOT 53f89d07a545a1bdd596e1e8 AT nifty DOT ne DOT jp>
<20230102172147 DOT 83789d400bb0400cb8c8ca74 AT nifty DOT ne DOT jp>
<Y7wUuNUbXBANLdIA AT calimero DOT vinschen DOT de>
<20230116180213 DOT 0e03a896f512d784933f54da AT nifty DOT ne DOT jp>
<Y8Ulug5IS7IGc15w AT calimero DOT vinschen DOT de>
<20230116234532 DOT f567e64fe7bf9a0a13704af9 AT nifty DOT ne DOT jp>
<Y8VqvgP8rA5SX/Or AT calimero DOT vinschen DOT de>
<Y8XE3gykn7dTPrmU AT calimero DOT vinschen DOT de>
<Y8cJHDaXbQ2ZQSzn AT calimero DOT vinschen DOT de>
X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32)
Mime-Version: 1.0
X-Spam-Status: No, score=-10.6 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, NICE_REPLY_A,
RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS,
TXREP autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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>
From: Takashi Yano via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp>
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 Tue, 17 Jan 2023 21:46:20 +0100
Corinna Vinschen wrote:

> Hi Takashi,
> 
> On Jan 16 22:42, Corinna Vinschen via Cygwin wrote:
> > On Jan 16 16:18, Corinna Vinschen via Cygwin wrote:
> > > Actually, I' running your testcase on two machines in parallel now for
> > > quite some time, which only one hunk of 60675f1a7eb2 reverted, i.e.
> > > 
> > > diff --git a/winsup/cygwin/mm/shared.cc b/winsup/cygwin/mm/shared.cc
> > > index 893b20d289b4..6d6d2940b6d4 100644
> > > --- a/winsup/cygwin/mm/shared.cc
> > > +++ b/winsup/cygwin/mm/shared.cc
> > > @@ -140,7 +140,11 @@ open_shared (const WCHAR *name, int n, HANDLE& shared_h, DWORD size,
> > >    if (*m == SH_JUSTCREATE || *m == SH_JUSTOPEN)
> > >      addr = NULL;
> > >    else
> > > -    addr = (void *) region_address[*m];
> > > +    {
> > > +      addr = (void *) region_address[*m];
> > > +      VirtualFree (addr, 0, MEM_RELEASE);
> > > +    }
> > > +
> > >  
> > >    WCHAR map_buf[MAX_PATH];
> > >    WCHAR *mapname = NULL;
> > > 
> > > So far (and knocking on wood madly while writing this) the mapping
> > > problem didn't show up once.  Maybe you'd like to try the same?
> > 
> > Never mind, I encountered another error.  After a bit more debugging
> > I think I understand the problem now, and  I'm just in the process of
> > reworking open_shared.  This may take a day or two.  Stay tuned.
> 
> I pushed some patches to fix this issue.  Excessive debugging indicated
> that the reason cygcheck fails in this way is:
> 
> - It's a non-Cygwin process which
> 
> - is built with high-entropy ASLR and
> 
> - tries to load the Cygwin DLL dynamically and
> 
> - therefore suffers from the fact that recent Cygwin code doesn't
>   expect that certain memory regions are used by Windows itself.
>   Which they are, due to the high-entropy stuff.
> 
> The patches are supposed to make the code less rigid in terms of the
> addresses of certain memory regions, as well as dropping the
> high-entropy VA flag from builds of strace and cygcheck, both of which
> are loading the Cygwin DLL dynamically as part of their job.
> 
> The test release 3.5.0-0.116.g8d318bf142f7 contains the patches, for
> everybody to try.

Thank you very much for working on this problem. It seems that
it was unexpectedly large-scale modification.

I confirmed that the problem has been fixed with these patches.
The test case has been running for 11 hours but the problem does
not happen so far.

-- 
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