From: Brian Inglis <Brian.Inglis@Shaw.ca>
To: cygwin@cygwin.com
Subject: Re: Cygwin 3.4.3 and 3.5.0... hangs in make, top, procps, ls /proc/PID/...
Date: Mon, 16 Jan 2023 12:23:43 -0700 [thread overview]
Message-ID: <40dfd7b0-9b90-6c0d-fb05-85b68ec60544@Shaw.ca> (raw)
In-Reply-To: <Y8VqvgP8rA5SX/Or@calimero.vinschen.de>
On 2023-01-16 08:18, Corinna Vinschen via Cygwin wrote:
> Hi Takashi,
>
> On Jan 16 23:45, Takashi Yano via Cygwin wrote:
>> On Mon, 16 Jan 2023 11:23:54 +0100
>> Corinna Vinschen wrote:
>>> On Jan 16 18:02, Takashi Yano via Cygwin wrote:
>>> [...]
>>>> Errors seem to be three types: (null), cygpid.xxx and shared.5.
>>>> I'm not sure what is happening and why at all, however, this
>>>> did not seem to happen before the commit 30add3e6b3e3.
>>>
>>> I'll try to reproduce this issue. But the weird thing is certainly
>>> this: The affected shared mem regions are apparently not the cygheap.
>>> Rather, they are the "shared" and "cygpid" shared mem regions, which
>>> should not at all collide with the cygheap. I guess we need more
>>> debug output in the api_fatal call inside open_shared...
>>
>> I am now trying the test case with reverting the commit 60675f1a7eb2
>> "Cygwin: decouple shared mem regions from Cygwin DLL", and the issue
>> does not happen for several hours so far. I guess this most likely
>> is the direct cause of the problem.
>
> 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?
After struggling to build and release a new ncurses test package yesterday, with
many hangs including unrelated hourly cron jobs, make, top, ps, and using Cygwin
/bin/ps and /bin/kill -f combos a lot to make progress, I upgraded last night to
latest including *cygwin test 3.5.0-0.107.g8bd56ec87345*, and an ncurses
rebuild, and another package rebuild, with top monitoring under X and usual
hourly cron jobs running had no issues for the first time in weeks!
I also have a couple of cygcheck -cd cygwin loops running, and damn, *just* got
a failure on one, and stackdump is zero length:
$ 0 [main] cygcheck (16228) C:\usr\local\cygwin64\bin\cygcheck.exe: ***
fatal error -
MapViewOfFileEx '(null)'(0x108), Win32 error 487. Terminating.
1260 [main] cygcheck (16228) cygwin_exception::open_stackdumpfile: Dumping
stack trace to cygcheck.exe.stackdump
$ ls -glo *.stackdump
-rwxr-xr-x 1 0 Jan 16 12:16 cygcheck.exe.stackdump
--
Take care. Thanks, Brian Inglis Calgary, Alberta, Canada
La perfection est atteinte Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer but when there is no more to cut
-- Antoine de Saint-Exupéry
next prev parent reply other threads:[~2023-01-16 19:23 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-30 4:59 Brian Inglis
2023-01-02 2:32 ` Takashi Yano
2023-01-02 5:38 ` Takashi Yano
2023-01-02 8:21 ` Takashi Yano
2023-01-09 13:20 ` Corinna Vinschen
2023-01-16 9:02 ` Takashi Yano
2023-01-16 10:23 ` Corinna Vinschen
2023-01-16 14:45 ` Takashi Yano
2023-01-16 15:18 ` Corinna Vinschen
2023-01-16 19:23 ` Brian Inglis [this message]
2023-01-16 21:42 ` Corinna Vinschen
2023-01-17 20:46 ` Corinna Vinschen
2023-01-18 9:16 ` Takashi Yano
2023-01-18 9:42 ` Corinna Vinschen
2023-01-19 16:31 ` Brian Inglis
2023-01-19 17:12 ` Brian Inglis
2023-01-19 18:38 ` Corinna Vinschen
2023-01-19 18:42 ` Jose Isaias Cabrera
2023-01-19 19:31 ` Brian Inglis
2023-03-21 19:17 ` Brian Inglis
2023-03-22 19:05 ` Brian Inglis
2023-01-02 23:03 ` Takashi Yano
2023-01-09 16:02 ` Corinna Vinschen
2023-01-09 17:13 ` Corinna Vinschen
2023-01-10 10:01 ` Takashi Yano
2023-01-10 10:57 ` Corinna Vinschen
2023-01-09 13:36 ` Corinna Vinschen
2023-01-10 0:00 ` Brian Inglis
2023-01-16 15:40 ` Jon Turney
2023-01-16 18:54 ` Brian Inglis
2022-12-31 20:01 Brian Inglis
2023-01-01 18:51 ` Jeremy Drake
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=40dfd7b0-9b90-6c0d-fb05-85b68ec60544@Shaw.ca \
--to=brian.inglis@shaw.ca \
--cc=cygwin@cygwin.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).