Re: Regression: Cygwin 3.5.1 freezes when launching several mingw processes in parallel

2024-03-04 Thread Dimitry Andric via Cygwin
It's already been backported here: 
https://cygwin.com/cgit/newlib-cygwin/commit/?h=cygwin-3_5-branch&id=fc5e9525453fea7c27b0e13635ae54abaa0db69d

So I would guess a version 3.5.2 is very likely to appear.

-Dimitry

> On 4 Mar 2024, at 20:54, Cedric Blancher via Cygwin  wrote:
> 
> Same here building gcc with the msnfs41client NFSv4.1 filesystem
> driver (https://sourceforge.net/p/ms-nfs41-client/mailman/message/58741244/),
> make -j8 and make -j128 builds now succeed again.
> 
> Is a Cygwin 3.5.x backport required?
> 
> Ced
> 
> On Mon, 4 Mar 2024 at 20:38, Dimitry Andric via Cygwin
>  wrote:
>> 
>> Same here, did a bunch of make -j8 builds, and with 3.6.0-0.71.gb160b690b6ac 
>> they now complete without any hangs.
>> 
>> Thanks for the quick fix!
>> 
>> -Dimitry
>> 
>>> On 4 Mar 2024, at 16:58, Kate Deplaix via Cygwin  wrote:
>>> 
>>> After testing that version without interruption for the past 3 hours on 
>>> test cases that would've failed before, I can happily say it looks like 
>>> it's fixed!
>>> 
>>> Thank you so much!!
>>> ________________
>>> From: Cygwin  on behalf 
>>> of Takashi Yano via Cygwin 
>>> Sent: 04 March 2024 12:06
>>> To: cygwin@cygwin.com 
>>> Subject: Re: Regression: Cygwin 3.5.1 freezes when launching several mingw 
>>> processes in parallel
>>> 
>>> On Mon, 4 Mar 2024 20:00:13 +0900
>>> Takashi Yano via Cygwin wrote:
>>>> On Sun, 3 Mar 2024 13:07:11 +0900
>>>> Takashi Yano wrote:
>>>>> On Sat, 2 Mar 2024 11:49:36 +
>>>>> Kate Deplaix wrote:
>>>>>> I'm running cygwin on baremetal on an Intel i5-750 (4 cores), with 7GB 
>>>>>> of RAM and with an up-to-date Windows 10.
>>>>> 
>>>>> Thanks for the information. I could reproduce the problem with
>>>>> Core i5 M 540 + 8GB RAM machine.
>>>>> 
>>>>> Let consider how to debug.
>>>> 
>>>> I found the cause. I'll push the patch shortly.
>>>> Thanks!
>>> 
>>> Please try:
>>> cygwin 3.6.0-0.71.gb160b690b6ac (TEST)
>>> 
>>> --
>>> Takashi Yano 
>>> 
>>> --
>>> 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
>>> 
>>> --
>>> 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
>> 
>> 
>> --
>> 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
> 
> 
> 
> -- 
> Cedric Blancher 
> [https://plus.google.com/u/0/+CedricBlancher/]
> Institute Pasteur
> 
> -- 
> 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


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


Re: Regression: Cygwin 3.5.1 freezes when launching several mingw processes in parallel

2024-03-04 Thread Cedric Blancher via Cygwin
Same here building gcc with the msnfs41client NFSv4.1 filesystem
driver (https://sourceforge.net/p/ms-nfs41-client/mailman/message/58741244/),
make -j8 and make -j128 builds now succeed again.

Is a Cygwin 3.5.x backport required?

Ced

On Mon, 4 Mar 2024 at 20:38, Dimitry Andric via Cygwin
 wrote:
>
> Same here, did a bunch of make -j8 builds, and with 3.6.0-0.71.gb160b690b6ac 
> they now complete without any hangs.
>
> Thanks for the quick fix!
>
> -Dimitry
>
> > On 4 Mar 2024, at 16:58, Kate Deplaix via Cygwin  wrote:
> >
> > After testing that version without interruption for the past 3 hours on 
> > test cases that would've failed before, I can happily say it looks like 
> > it's fixed!
> >
> > Thank you so much!!
> > 
> > From: Cygwin  on behalf 
> > of Takashi Yano via Cygwin 
> > Sent: 04 March 2024 12:06
> > To: cygwin@cygwin.com 
> > Subject: Re: Regression: Cygwin 3.5.1 freezes when launching several mingw 
> > processes in parallel
> >
> > On Mon, 4 Mar 2024 20:00:13 +0900
> > Takashi Yano via Cygwin wrote:
> >> On Sun, 3 Mar 2024 13:07:11 +0900
> >> Takashi Yano wrote:
> >>> On Sat, 2 Mar 2024 11:49:36 +
> >>> Kate Deplaix wrote:
> >>>> I'm running cygwin on baremetal on an Intel i5-750 (4 cores), with 7GB 
> >>>> of RAM and with an up-to-date Windows 10.
> >>>
> >>> Thanks for the information. I could reproduce the problem with
> >>> Core i5 M 540 + 8GB RAM machine.
> >>>
> >>> Let consider how to debug.
> >>
> >> I found the cause. I'll push the patch shortly.
> >> Thanks!
> >
> > Please try:
> > cygwin 3.6.0-0.71.gb160b690b6ac (TEST)
> >
> > --
> > Takashi Yano 
> >
> > --
> > 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
> >
> > --
> > 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
>
>
> --
> 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



-- 
Cedric Blancher 
[https://plus.google.com/u/0/+CedricBlancher/]
Institute Pasteur

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


Re: Regression: Cygwin 3.5.1 freezes when launching several mingw processes in parallel

2024-03-04 Thread Dimitry Andric via Cygwin
Same here, did a bunch of make -j8 builds, and with 3.6.0-0.71.gb160b690b6ac 
they now complete without any hangs.

Thanks for the quick fix!

-Dimitry

> On 4 Mar 2024, at 16:58, Kate Deplaix via Cygwin  wrote:
> 
> After testing that version without interruption for the past 3 hours on test 
> cases that would've failed before, I can happily say it looks like it's fixed!
> 
> Thank you so much!!
> 
> From: Cygwin  on behalf of 
> Takashi Yano via Cygwin 
> Sent: 04 March 2024 12:06
> To: cygwin@cygwin.com 
> Subject: Re: Regression: Cygwin 3.5.1 freezes when launching several mingw 
> processes in parallel
> 
> On Mon, 4 Mar 2024 20:00:13 +0900
> Takashi Yano via Cygwin wrote:
>> On Sun, 3 Mar 2024 13:07:11 +0900
>> Takashi Yano wrote:
>>> On Sat, 2 Mar 2024 11:49:36 +
>>> Kate Deplaix wrote:
>>>> I'm running cygwin on baremetal on an Intel i5-750 (4 cores), with 7GB of 
>>>> RAM and with an up-to-date Windows 10.
>>> 
>>> Thanks for the information. I could reproduce the problem with
>>> Core i5 M 540 + 8GB RAM machine.
>>> 
>>> Let consider how to debug.
>> 
>> I found the cause. I'll push the patch shortly.
>> Thanks!
> 
> Please try:
> cygwin 3.6.0-0.71.gb160b690b6ac (TEST)
> 
> --
> Takashi Yano 
> 
> --
> 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
> 
> -- 
> 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


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


Re: Regression: Cygwin 3.5.1 freezes when launching several mingw processes in parallel

2024-03-04 Thread Kate Deplaix via Cygwin
After testing that version without interruption for the past 3 hours on test 
cases that would've failed before, I can happily say it looks like it's fixed!

Thank you so much!!

From: Cygwin  on behalf of 
Takashi Yano via Cygwin 
Sent: 04 March 2024 12:06
To: cygwin@cygwin.com 
Subject: Re: Regression: Cygwin 3.5.1 freezes when launching several mingw 
processes in parallel

On Mon, 4 Mar 2024 20:00:13 +0900
Takashi Yano via Cygwin wrote:
> On Sun, 3 Mar 2024 13:07:11 +0900
> Takashi Yano wrote:
> > On Sat, 2 Mar 2024 11:49:36 +
> > Kate Deplaix wrote:
> > > I'm running cygwin on baremetal on an Intel i5-750 (4 cores), with 7GB of 
> > > RAM and with an up-to-date Windows 10.
> >
> > Thanks for the information. I could reproduce the problem with
> > Core i5 M 540 + 8GB RAM machine.
> >
> > Let consider how to debug.
>
> I found the cause. I'll push the patch shortly.
> Thanks!

Please try:
cygwin 3.6.0-0.71.gb160b690b6ac (TEST)

--
Takashi Yano 

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

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


Re: Regression: Cygwin 3.5.1 freezes when launching several mingw processes in parallel

2024-03-04 Thread Dimitry Andric via Cygwin
I think I've been experiencing something similar with 3.5.1, where date.exe 
randomly hangs with a full core pegged. Loading it in gdb shows:

Thread 1 received signal SIGTRAP, Trace/breakpoint trap.
0x7ffe23b0b503 in KERNELBASE!DebugBreak () from 
/cygdrive/c/Windows/System32/KERNELBASE.dll
(gdb) bt
#0  0x7ffe23b0b503 in KERNELBASE!DebugBreak () from 
/cygdrive/c/Windows/System32/KERNELBASE.dll
#1  0x7ffe19cf6367 in break_here () at 
/usr/src/debug/cygwin-3.5.1-1/winsup/cygwin/dcrt0.cc:472
#2  0x7ffe19d10339 in try_to_debug () at 
/usr/src/debug/cygwin-3.5.1-1/winsup/cygwin/exceptions.cc:597
#3  exception::handle (e=0x7c7b0, frame=, in=0x7c2c0, 
dispatch=)
at /usr/src/debug/cygwin-3.5.1-1/winsup/cygwin/exceptions.cc:810
#4  0x7ffe261123af in ntdll!.chkstk () from 
/cygdrive/c/Windows/SYSTEM32/ntdll.dll
#5  0x7ffe260c14b4 in ntdll!RtlRaiseException () from 
/cygdrive/c/Windows/SYSTEM32/ntdll.dll
#6  0x7ffe26110ebe in ntdll!KiUserExceptionDispatcher () from 
/cygdrive/c/Windows/SYSTEM32/ntdll.dll
#7  0x7ffe19da92d7 in fhandler_console::set_output_mode (m=(unknown: 
0x2610d444), t=0x1, p=0x7b9e8)
at /usr/src/debug/cygwin-3.5.1-1/winsup/cygwin/fhandler/console.cc:843
#8  0x7ffe19d095ca in dtable::init_std_file_from_handle (this=, fd=, handle=0x)
at /usr/src/debug/cygwin-3.5.1-1/winsup/cygwin/dtable.cc:425
#9  0x7ffe19d099c2 in dtable::stdio_init (this=0x84870) at 
/usr/src/debug/cygwin-3.5.1-1/winsup/cygwin/dtable.cc:186
#10 0x7ffe19cf7187 in dll_crt0_1 () at 
/usr/src/debug/cygwin-3.5.1-1/winsup/cygwin/dcrt0.cc:925
#11 0x7ffe19cf5e08 in _cygtls::call2 (this=0x7ce00, func=0x7ffe19cf6fb8 
, arg=0x0, buf=buf@entry=0x7cdf0)
at /usr/src/debug/cygwin-3.5.1-1/winsup/cygwin/cygtls.cc:41
#12 0x7ffe19cf5e86 in _cygtls::call (func=, arg=) at /usr/src/debug/cygwin-3.5.1-1/winsup/cygwin/cygtls.cc:28
#13 0x in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

I will check out 3.6.0-0.71.gb160b690b6ac to see if it fixes this hang.

-Dimitry

> On 4 Mar 2024, at 13:06, Takashi Yano via Cygwin  wrote:
> 
> On Mon, 4 Mar 2024 20:00:13 +0900
> Takashi Yano via Cygwin wrote:
>> On Sun, 3 Mar 2024 13:07:11 +0900
>> Takashi Yano wrote:
>>> On Sat, 2 Mar 2024 11:49:36 +
>>> Kate Deplaix wrote:
 I'm running cygwin on baremetal on an Intel i5-750 (4 cores), with 7GB of 
 RAM and with an up-to-date Windows 10.
>>> 
>>> Thanks for the information. I could reproduce the problem with
>>> Core i5 M 540 + 8GB RAM machine.
>>> 
>>> Let consider how to debug.
>> 
>> I found the cause. I'll push the patch shortly.
>> Thanks!
> 
> Please try:
> cygwin 3.6.0-0.71.gb160b690b6ac (TEST)
> 
> -- 
> Takashi Yano 
> 
> -- 
> 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


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


Re: Regression: Cygwin 3.5.1 freezes when launching several mingw processes in parallel

2024-03-04 Thread Takashi Yano via Cygwin
On Mon, 4 Mar 2024 20:00:13 +0900
Takashi Yano via Cygwin wrote:
> On Sun, 3 Mar 2024 13:07:11 +0900
> Takashi Yano wrote:
> > On Sat, 2 Mar 2024 11:49:36 +
> > Kate Deplaix wrote:
> > > I'm running cygwin on baremetal on an Intel i5-750 (4 cores), with 7GB of 
> > > RAM and with an up-to-date Windows 10.
> > 
> > Thanks for the information. I could reproduce the problem with
> > Core i5 M 540 + 8GB RAM machine.
> > 
> > Let consider how to debug.
> 
> I found the cause. I'll push the patch shortly.
> Thanks!

Please try:
cygwin 3.6.0-0.71.gb160b690b6ac (TEST)

-- 
Takashi Yano 

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


Re: Regression: Cygwin 3.5.1 freezes when launching several mingw processes in parallel

2024-03-04 Thread Takashi Yano via Cygwin
On Sun, 3 Mar 2024 13:07:11 +0900
Takashi Yano wrote:
> On Sat, 2 Mar 2024 11:49:36 +
> Kate Deplaix wrote:
> > I'm running cygwin on baremetal on an Intel i5-750 (4 cores), with 7GB of 
> > RAM and with an up-to-date Windows 10.
> 
> Thanks for the information. I could reproduce the problem with
> Core i5 M 540 + 8GB RAM machine.
> 
> Let consider how to debug.

I found the cause. I'll push the patch shortly.
Thanks!

-- 
Takashi Yano 

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


Re: Regression: Cygwin 3.5.1 freezes when launching several mingw processes in parallel

2024-03-02 Thread Takashi Yano via Cygwin
On Sat, 2 Mar 2024 11:49:36 +
Kate Deplaix wrote:
> I'm running cygwin on baremetal on an Intel i5-750 (4 cores), with 7GB of RAM 
> and with an up-to-date Windows 10.

Thanks for the information. I could reproduce the problem with
Core i5 M 540 + 8GB RAM machine.

Let consider how to debug.

-- 
Takashi Yano 

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


Re: Regression: Cygwin 3.5.1 freezes when launching several mingw processes in parallel

2024-03-02 Thread Kate Deplaix via Cygwin
I'm running cygwin on baremetal on an Intel i5-750 (4 cores), with 7GB of RAM 
and with an up-to-date Windows 10.

At any given time during the RAM usage basically flat lines and there is still 
plenty of free memory left.


From: Cygwin  on behalf of 
Takashi Yano via Cygwin 
Sent: Saturday, March 2, 2024 4:41 am
To: cygwin@cygwin.com 
Subject: Re: Regression: Cygwin 3.5.1 freezes when launching several mingw 
processes in parallel

On Fri, 1 Mar 2024 17:48:52 +
Kate Deplaix wrote:
> Hi,
>
> Using cygwin 3.6.0-0.66.gc77a5689f7bd I was indeed unable to reproduce the 
> issue.

Thanks for tesing.

> However I'm getting a related but slightly different issue now, where a 
> subprocess randomly (but quite reliably over the whole compilation process) 
> fails with make -j (works fine with -j1 once again)
>
> Luckily i was able to make a really small test-case this time:
> Using MinGW 11.4.0 with the following test.c file:
>
> #define UNICODE
> #define _UNICODE
>
> #include 
> #include 
>
> int main() {
>   int ret = _wsystem(L"x86_64-w64-mingw32-gcc -dumpversion");
>   if(ret != 0) printf("FOUND %d\n", ret);
> }
>
> compile using: x86_64_w64-mingw32-gcc ./test.c
> and run using: for i in $(seq 1 100) ; do ./a & done

Thanks for the test case. I tried this test case, however,
I cannot reproduce the second problem, i.e. all 100 processes
exited normally.

To increase system load, I also tried:

#define UNICODE
#define _UNICODE

#include 
#include 

int main(int argc, char *argv[]) {
  wchar_t buf[1024];
  swprintf(buf, 1024, L"x86_64-w64-mingw32-gcc test.c -o %s", argv[1]);
  int ret = _wsystem(buf);
  if(ret != 0) printf("FOUND %d\n", ret);
}

and

#!/bin/sh
for i in $(seq 1 200); do ./a.exe $i & done

but, no error was found...

How many cpu cores and how much memory does your system have?

--
Takashi Yano 

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

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


Re: Regression: Cygwin 3.5.1 freezes when launching several mingw processes in parallel

2024-03-01 Thread Takashi Yano via Cygwin
On Fri, 1 Mar 2024 17:48:52 +
Kate Deplaix wrote:
> Hi,
> 
> Using cygwin 3.6.0-0.66.gc77a5689f7bd I was indeed unable to reproduce the 
> issue.

Thanks for tesing.

> However I'm getting a related but slightly different issue now, where a 
> subprocess randomly (but quite reliably over the whole compilation process) 
> fails with make -j (works fine with -j1 once again)
> 
> Luckily i was able to make a really small test-case this time:
> Using MinGW 11.4.0 with the following test.c file:
> 
> #define UNICODE
> #define _UNICODE
> 
> #include 
> #include 
> 
> int main() {
>   int ret = _wsystem(L"x86_64-w64-mingw32-gcc -dumpversion");
>   if(ret != 0) printf("FOUND %d\n", ret);
> }
> 
> compile using: x86_64_w64-mingw32-gcc ./test.c
> and run using: for i in $(seq 1 100) ; do ./a & done

Thanks for the test case. I tried this test case, however,
I cannot reproduce the second problem, i.e. all 100 processes
exited normally.

To increase system load, I also tried:

#define UNICODE
#define _UNICODE

#include 
#include 

int main(int argc, char *argv[]) {
  wchar_t buf[1024];
  swprintf(buf, 1024, L"x86_64-w64-mingw32-gcc test.c -o %s", argv[1]);
  int ret = _wsystem(buf);
  if(ret != 0) printf("FOUND %d\n", ret);
}

and

#!/bin/sh
for i in $(seq 1 200); do ./a.exe $i & done

but, no error was found...

How many cpu cores and how much memory does your system have?

-- 
Takashi Yano 

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


Re: Regression: Cygwin 3.5.1 freezes when launching several mingw processes in parallel

2024-03-01 Thread Kate Deplaix via Cygwin
Hi,

Using cygwin 3.6.0-0.66.gc77a5689f7bd I was indeed unable to reproduce the 
issue.
However I'm getting a related but slightly different issue now, where a 
subprocess randomly (but quite reliably over the whole compilation process) 
fails with make -j (works fine with -j1 once again)

Luckily i was able to make a really small test-case this time:
Using MinGW 11.4.0 with the following test.c file:

#define UNICODE
#define _UNICODE

#include 
#include 

int main() {
  int ret = _wsystem(L"x86_64-w64-mingw32-gcc -dumpversion");
  if(ret != 0) printf("FOUND %d\n", ret);
}

compile using: x86_64_w64-mingw32-gcc ./test.c
and run using: for i in $(seq 1 100) ; do ./a & done

You should now be able to see at least one FOUND line among the output.

This exact behaviour happens to me everytime I try to compile the OCaml 
compiler, where a gcc subprocess fails inexplicably.

We've been getting this kind of error once in a while over the years (locally 
and in CI) but it was never reproducible to this point and it was usually fine 
if we restarted the compilation.

Kind regards,

From: Cygwin  on behalf of 
David Allsopp via Cygwin 
Sent: 01 March 2024 15:26
To: Takashi Yano 
Cc: cygwin@cygwin.com 
Subject: Re: Regression: Cygwin 3.5.1 freezes when launching several mingw 
processes in parallel

On Fri, 1 Mar 2024 at 08:03, Takashi Yano via Cygwin  wrote:
> Please try: cygwin 3.6.0-0.66.gc77a5689f7bd (TEST)

I can confirm this fixes the issue for me, thank you!


David

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

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


Re: Regression: Cygwin 3.5.1 freezes when launching several mingw processes in parallel

2024-03-01 Thread David Allsopp via Cygwin
On Fri, 1 Mar 2024 at 08:03, Takashi Yano via Cygwin  wrote:
> Please try: cygwin 3.6.0-0.66.gc77a5689f7bd (TEST)

I can confirm this fixes the issue for me, thank you!


David

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


Re: Regression: Cygwin 3.5.1 freezes when launching several mingw processes in parallel

2024-03-01 Thread Takashi Yano via Cygwin
On Fri, 1 Mar 2024 19:21:12 +0900
Takashi Yano wrote:
> On Fri, 1 Mar 2024 09:25:10 +0900
> Takashi Yano wrote:
> > On Thu, 29 Feb 2024 18:19:45 +
> > Kate Deplaix wrote:
> > > To reproduce this:
> > > 
> > >   *
> > > make sure you have a fresh installed of cygwin 3.5.1
> > >   *
> > > install the following packages: autoconf, make, patch, curl, 
> > > mingw64-x86_64-gcc-g++, mingw64-i686-gcc-g++
> > >   *
> > > curl -LO 
> > > https://github.com/ocaml/opam/releases/download/2.2.0-beta1/opam-full-2.2.0-beta1.tar.gz
> > >   *   tar xvf opam-full-2.2.0-beta1.tar.gz
> > >   *   cd opam-full-2.2.0-beta1
> > >   *   make cold
> > 
> > I tried to reproduce this, however, make cold failed with the error:
> [...]
> > ** Fatal error: Cannot run cygpath -m
> 
> I could reproduce the issue in Windows SandBox and might find the cause.
> I'll submit a patch for this issue shortly. Thanks for the report.

Please try: cygwin 3.6.0-0.66.gc77a5689f7bd (TEST)

-- 
Takashi Yano 

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


Re: Regression: Cygwin 3.5.1 freezes when launching several mingw processes in parallel

2024-03-01 Thread Takashi Yano via Cygwin
On Fri, 1 Mar 2024 09:25:10 +0900
Takashi Yano wrote:
> On Thu, 29 Feb 2024 18:19:45 +
> Kate Deplaix wrote:
> > To reproduce this:
> > 
> >   *
> > make sure you have a fresh installed of cygwin 3.5.1
> >   *
> > install the following packages: autoconf, make, patch, curl, 
> > mingw64-x86_64-gcc-g++, mingw64-i686-gcc-g++
> >   *
> > curl -LO 
> > https://github.com/ocaml/opam/releases/download/2.2.0-beta1/opam-full-2.2.0-beta1.tar.gz
> >   *   tar xvf opam-full-2.2.0-beta1.tar.gz
> >   *   cd opam-full-2.2.0-beta1
> >   *   make cold
> 
> I tried to reproduce this, however, make cold failed with the error:
[...]
> ** Fatal error: Cannot run cygpath -m

I could reproduce the issue in Windows SandBox and might find the cause.
I'll submit a patch for this issue shortly. Thanks for the report.

-- 
Takashi Yano 

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


Re: Regression: Cygwin 3.5.1 freezes when launching several mingw processes in parallel

2024-02-29 Thread jojelino via Cygwin

$ (gdb|grep '+1275' -n -B10 -A10)<530 /usr/src/debug/cygwin-3.5.1-1/winsup/cygwin/pinfo.cc: No such 
file or directory.

225-
226-564 in /usr/src/debug/cygwin-3.5.1-1/winsup/cygwin/pinfo.cc
227-565 in /usr/src/debug/cygwin-3.5.1-1/winsup/cygwin/pinfo.cc
228-   0x0001800991de <+300>:   mov0x10(%rdx),%edi
229-   0x0001800991e1 <+303>:   test   %edi,%edi
230-   0x0001800991e3 <+305>:   jne0x1800991f1 
<_pinfo::set_ctty(fhandler_termios*, int)+319>

231-
232-566 in /usr/src/debug/cygwin-3.5.1-1/winsup/cygwin/pinfo.cc
233-   0x0001800991cc <+282>:   mov(%rbx),%eax
234-   0x0001800991e5 <+307>:   cmp%eax,0xfc20(%rbx)
235:   0x0001800991eb <+313>:   je 0x1800995ad 
<_pinfo::set_ctty(fhandler_termios*, int)+1275>

236-
237-567 in /usr/src/debug/cygwin-3.5.1-1/winsup/cygwin/pinfo.cc
238-568 in /usr/src/debug/cygwin-3.5.1-1/winsup/cygwin/pinfo.cc
239-569 in /usr/src/debug/cygwin-3.5.1-1/winsup/cygwin/pinfo.cc
240-570 in /usr/src/debug/cygwin-3.5.1-1/winsup/cygwin/pinfo.cc
241-   0x0001800991ce <+284>:   cmpb   $0x0,0x1ad535(%rip) 
 # 0x18024670a 
242-   0x0001800991d5 <+291>:   jne0x1800991f1 
<_pinfo::set_ctty(fhandler_termios*, int)+319>
243-   0x0001800995e6 <+1332>:  call   0x180205fa8 


244-   0x0001800995eb <+1337>:  test   %eax,%eax
245-   0x0001800995ed <+1339>:  nopl   (%rax)

On 3/1/2024 8:57 AM, jojelino via Cygwin wrote:
Line 74 of 
"/usr/src/debug/cygwin-3.5.1-1/winsup/cygwin/local_includes/tty.h"
    starts at address 0x1800995ad <_pinfo::set_ctty(fhandler_termios*, 
int)+1275> and ends at 0x1800995bb <_pinfo::set_ctty(fhandler_termios*, 
int)+1289>.



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


Re: Regression: Cygwin 3.5.1 freezes when launching several mingw processes in parallel

2024-02-29 Thread Takashi Yano via Cygwin
On Thu, 29 Feb 2024 18:19:45 +
Kate Deplaix wrote:
> To reproduce this:
> 
>   *
> make sure you have a fresh installed of cygwin 3.5.1
>   *
> install the following packages: autoconf, make, patch, curl, 
> mingw64-x86_64-gcc-g++, mingw64-i686-gcc-g++
>   *
> curl -LO 
> https://github.com/ocaml/opam/releases/download/2.2.0-beta1/opam-full-2.2.0-beta1.tar.gz
>   *   tar xvf opam-full-2.2.0-beta1.tar.gz
>   *   cd opam-full-2.2.0-beta1
>   *   make cold
> 
>   *
>   *

I tried to reproduce this, however, make cold failed with the error:

Usage: cygpath (-d|-m|-u|-w|-t TYPE) [-f FILE] [OPTION]... NAME...
   cygpath [-c HANDLE]
   cygpath [-ADHOPSW]
   cygpath [-F ID]

Convert Unix and Windows format paths, or output system path information

Output type options:

  -d, --dos print DOS (short) form of NAMEs (C:\PROGRA~1\)
  -m, --mixed   like --windows, but with regular slashes (C:/WINNT)
  -M, --modereport on mode of file (binmode or textmode)
  -u, --unix(default) print Unix form of NAMEs (/cygdrive/c/winnt)
  -w, --windows print Windows form of NAMEs (C:\WINNT)
  -t, --type TYPE   print TYPE form: 'dos', 'mixed', 'unix', or 'windows'

Path conversion options:

  -a, --absoluteoutput absolute path
  -l, --long-name   print Windows long form of NAMEs (with -w, -m only)
  -p, --pathNAME is a PATH list (i.e., '/bin:/usr/bin')
  -U, --proc-cygdrive   Emit /proc/cygdrive path instead of cygdrive prefix
when converting Windows path to UNIX path.
  -s, --short-name  print DOS (short) form of NAMEs (with -w, -m only)
  -C, --codepage CP print DOS, Windows, or mixed pathname in Windows
codepage CP.  CP can be a numeric codepage identifier,
or one of the reserved words ANSI, OEM, or UTF8.
If this option is missing, cygpath defaults to the
character set defined by the current locale.

System information:

  -A, --allusersuse `All Users' instead of current user for -D, -O, -P
  -D, --desktop output `Desktop' directory and exit
  -H, --homerootoutput `Profiles' directory (home root) and exit
  -O, --mydocs  output `My Documents' directory and exit
  -P, --smprograms  output Start Menu `Programs' directory and exit
  -S, --sysdir  output system directory and exit
  -W, --windir  output `Windows' directory and exit
  -F, --folder ID   output special folder with numeric ID and exit
Try `cygpath --help' for more information.
** Fatal error: Cannot run cygpath -m

Any idea?

-- 
Takashi Yano 

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


Re: Regression: Cygwin 3.5.1 freezes when launching several mingw processes in parallel

2024-02-29 Thread jojelino via Cygwin
$ (echo symbol cygwin1.dll;grep -Po 
'(?<=cygwin1!)[a-z_0-9]*?\+0x[a-f0-9]*'|sed -E 's/^/i line *(/;s/$/)/')|gdb

GNU gdb (GDB) (Cygwin 12.1-1) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 


This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-cygwin".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.

For help, type "help".
Type "apropos word" to search for commands related to "word".

warning: the current range check setting does not match the language.

Whether backtraces should continue past the entry point of a program is off.
(gdb) Reading symbols from cygwin1.dll...
Reading symbols from /usr/lib/debug/usr/bin/cygwin1.dll.dbg...
(gdb) 0007`c8c0 7ffe`7dc57f74 : 0008`00039b40 
0008`00039b40 `00010002 000a`0298 : 
cygwin1!dirname+0x198e
0007`c980 7ffe`7dc56a78 : `00f2f2f2 
` 0007`cd30 7ffe`e44773ae : 
cygwin1!cuserid+0x16e16
0007`c9c0 7ffe`7dc581d3 : 00ff783b`00767676 
`005b0720 `0002 0008`4870 : 
cygwin1!cuserid+0x1591a
0007`ca40 7ffe`7dbb954d : 0002`0050 
`000a3dd0 `000ab7b0 ` : 
cygwin1!cuserid+0x17075
0007`ca70 7ffe`7dbb99c2 : 0007`cc8a 
7ffe`7dba7d37 0007`cd30 0007`0c90 : 
cygwin1!dlfork+0x2695
0007`cb70 7ffe`7dba7187 : 315c615c`305c625c 
2f00735c`2e5c625c 5f5c6c5c`665c615c 745c735c`6e5c695c : 
cygwin1!dlfork+0x2b0a
0007`cbf0 7ffe`7dba5e08 : ` 
` ` ` : 
cygwin1!cygwin_dll_init+0x381
0007`cd80 7ffe`7dba5e86 : ` 
` ` ` : 
cygwin1!_assert+0x23f0
0007`cdd0 ` : 7ffe`7dd0604f 
0008`0003a210 ` 0008`00039400 : 
cygwin1!_assert+0x246e
Line 74 of 
"/usr/src/debug/cygwin-3.5.1-1/winsup/cygwin/local_includes/tty.h"
   starts at address 0x1800995ad <_pinfo::set_ctty(fhandler_termios*, 
int)+1275> and ends at 0x1800995bb <_pinfo::set_ctty(fhandler_termios*, 
int)+1289>.
(gdb) Line 1853 of 
"/usr/src/debug/cygwin-3.5.1-1/winsup/cygwin/fhandler/console.cc"

   starts at address 0x1800f7f74 
   and ends at 0x1800f7f78 .
(gdb) Line 474 of 
"/usr/src/debug/cygwin-3.5.1-1/winsup/cygwin/fhandler/base.cc"
   starts at address 0x1800f6a78 unsigned int)+312>
   and ends at 0x1800f6a7c int)+316>.
(gdb) Line 4132 of 
"/usr/src/debug/cygwin-3.5.1-1/winsup/cygwin/fhandler/console.cc"
   starts at address 0x1800f81d3 unsigned int, unsigned int)+73>
   and ends at 0x1800f81de unsigned int)+84>.

(gdb) Line 407 of "/usr/src/debug/cygwin-3.5.1-1/winsup/cygwin/dtable.cc"
   starts at address 0x18005954d 

   and ends at 0x180059555 void*)+1019>.

(gdb) Line 186 of "/usr/src/debug/cygwin-3.5.1-1/winsup/cygwin/dtable.cc"
   starts at address 0x1800599b0 
   and ends at 0x1800599c3 .
(gdb) Line 928 of "/usr/src/debug/cygwin-3.5.1-1/winsup/cygwin/dcrt0.cc"
   starts at address 0x180047187 
   and ends at 0x180047191 .
(gdb) No symbol "_assert" in current context.
(gdb) No symbol "_assert" in current context.
(gdb)
quit

On 3/1/2024 6:34 AM, Kevin Schnitzius via Cygwin wrote:

STACK_TEXT:
0007`c8c0 7ffe`7dc57f74 : 0008`00039b40
0008`00039b40 `00010002 000a`0298 :
cygwin1!dirname+0x198e
0007`c980 7ffe`7dc56a78 : `00f2f2f2
` 0007`cd30 7ffe`e44773ae :
cygwin1!cuserid+0x16e16
0007`c9c0 7ffe`7dc581d3 : 00ff783b`00767676
`005b0720 `0002 0008`4870 :
cygwin1!cuserid+0x1591a
0007`ca40 7ffe`7dbb954d : 0002`0050
`000a3dd0 `000ab7b0 ` :
cygwin1!cuserid+0x17075
0007`ca70 7ffe`7dbb99c2 : 0007`cc8a
7ffe`7dba7d37 0007`cd30 0007`0c90 :
cygwin1!dlfork+0x2695
0007`cb70 7ffe`7dba7187 : 315c615c`305c625c
2f00735c`2e5c625c 5f5c6c5c`665c615c 745c735c`6e5c695c :
cygwin1!dlfork+0x2b0a
0007`cbf0 7ffe`7dba5e08 : `
` ` ` :
cygwin1!cygwin_dll_init+0x381
0007`cd80 7ffe`7dba5e86 : `
` ` ` :
cygwin1!_assert+0x23f0
0007`cdd0 ` : 7ffe`7dd0604f
0008`0003a210 ` 0008`00039400 :
cygwin1!_assert+0x246e



--
P

Re: Regression: Cygwin 3.5.1 freezes when launching several mingw processes in parallel

2024-02-29 Thread jojelino via Cygwin
$ (echo symbol cygwin1.dll;grep -Po 
'(?<=cygwin1!)[a-z_0-9]*?\+0x[a-f0-9]*'|sed -E 's/^/i line *(/;s/$/)/')|gdb

GNU gdb (GDB) (Cygwin 12.1-1) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 


This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-cygwin".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.

For help, type "help".
Type "apropos word" to search for commands related to "word".

warning: the current range check setting does not match the language.

Whether backtraces should continue past the entry point of a program is off.
(gdb) Reading symbols from cygwin1.dll...
Reading symbols from /usr/lib/debug/usr/bin/cygwin1.dll.dbg...
(gdb) 0007`c8c0 7ffe`7dc57f74 : 0008`00039b40 
0008`00039b40 `00010002 000a`0298 : 
cygwin1!dirname+0x198e
0007`c980 7ffe`7dc56a78 : `00f2f2f2 
` 0007`cd30 7ffe`e44773ae : 
cygwin1!cuserid+0x16e16
0007`c9c0 7ffe`7dc581d3 : 00ff783b`00767676 
`005b0720 `0002 0008`4870 : 
cygwin1!cuserid+0x1591a
0007`ca40 7ffe`7dbb954d : 0002`0050 
`000a3dd0 `000ab7b0 ` : 
cygwin1!cuserid+0x17075
0007`ca70 7ffe`7dbb99c2 : 0007`cc8a 
7ffe`7dba7d37 0007`cd30 0007`0c90 : 
cygwin1!dlfork+0x2695
0007`cb70 7ffe`7dba7187 : 315c615c`305c625c 
2f00735c`2e5c625c 5f5c6c5c`665c615c 745c735c`6e5c695c : 
cygwin1!dlfork+0x2b0a
0007`cbf0 7ffe`7dba5e08 : ` 
` ` ` : 
cygwin1!cygwin_dll_init+0x381
0007`cd80 7ffe`7dba5e86 : ` 
` ` ` : 
cygwin1!_assert+0x23f0
0007`cdd0 ` : 7ffe`7dd0604f 
0008`0003a210 ` 0008`00039400 : 
cygwin1!_assert+0x246e
Line 74 of 
"/usr/src/debug/cygwin-3.5.1-1/winsup/cygwin/local_includes/tty.h"
   starts at address 0x1800995ad <_pinfo::set_ctty(fhandler_termios*, 
int)+1275> and ends at 0x1800995bb <_pinfo::set_ctty(fhandler_termios*, 
int)+1289>.
(gdb) Line 1853 of 
"/usr/src/debug/cygwin-3.5.1-1/winsup/cygwin/fhandler/console.cc"

   starts at address 0x1800f7f74 
   and ends at 0x1800f7f78 .
(gdb) Line 474 of 
"/usr/src/debug/cygwin-3.5.1-1/winsup/cygwin/fhandler/base.cc"
   starts at address 0x1800f6a78 unsigned int)+312>
   and ends at 0x1800f6a7c int)+316>.
(gdb) Line 4132 of 
"/usr/src/debug/cygwin-3.5.1-1/winsup/cygwin/fhandler/console.cc"
   starts at address 0x1800f81d3 unsigned int, unsigned int)+73>
   and ends at 0x1800f81de unsigned int)+84>.

(gdb) Line 407 of "/usr/src/debug/cygwin-3.5.1-1/winsup/cygwin/dtable.cc"
   starts at address 0x18005954d 

   and ends at 0x180059555 void*)+1019>.

(gdb) Line 186 of "/usr/src/debug/cygwin-3.5.1-1/winsup/cygwin/dtable.cc"
   starts at address 0x1800599b0 
   and ends at 0x1800599c3 .
(gdb) Line 928 of "/usr/src/debug/cygwin-3.5.1-1/winsup/cygwin/dcrt0.cc"
   starts at address 0x180047187 
   and ends at 0x180047191 .
(gdb) No symbol "_assert" in current context.
(gdb) No symbol "_assert" in current context.
(gdb)
quit


On 3/1/2024 6:34 AM, Kevin Schnitzius via Cygwin wrote:

On Thursday, February 29, 2024 at 01:21:01 PM EST, Kate Deplaix via Cygwin 
 wrote:

At some point of the make process, one job will infinit loop (taking 100% of 
one core), while the rest of the mingw jobs will idle and never finish. After 
some time Cygwin Terminal isn't
responsive anymore, and I'm not able to open another one or to spawn any other 
processes that are relying on the cygwin dll. I was able to observe this 
behaviour every time i tried
consistently.


I have repro'd this problem with the exception that there was no 100% cpu 
usage.  Looks like an exception handling loop:

(2c20.4df8): Access violation - code c005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
cygwin1!dirname+0x198e:
7ffe`7dbf95ad 458b5c2408  mov r11d,dword ptr [r12+8] 
ds:0001`a0030008=
0:000> g
(2c20.4df8): Access violation - code c005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
cygwin1!dirname+0x198e:
7ffe`7dbf95ad 458b5c2408  mov r11d,dword ptr [r12+8] 
ds:0001`a0030008=
0:000> g
(2c20.4df8): Access violation - code c005 (first chance)
First chance exc

Regression: Cygwin 3.5.1 freezes when launching several mingw processes in parallel

2024-02-29 Thread Kate Deplaix via Cygwin
  *
Hi,

I've been using Cygwin for the past year without any issues, however today I 
upgraded to Cygwin 3.5.1 from 3.4 and noticed a consistent freeze of every 
Cygwin processes happening, and there is no way to call a new Cygwin process 
anymore (e.g. even the terminal doesn't show up) without logging off my user 
session and logging back on.

Other users and coworkers of mine have noticed this happening too the past 
couple days (first recorded break was on the 25th, with I presume, Cygwin 
3.5.0).

To reproduce this:

  *
make sure you have a fresh installed of cygwin 3.5.1
  *
install the following packages: autoconf, make, patch, curl, 
mingw64-x86_64-gcc-g++, mingw64-i686-gcc-g++
  *
curl -LO 
https://github.com/ocaml/opam/releases/download/2.2.0-beta1/opam-full-2.2.0-beta1.tar.gz
  *   tar xvf opam-full-2.2.0-beta1.tar.gz
  *   cd opam-full-2.2.0-beta1
  *   make cold

  *
  *
At some point of the make process, one job will infinit loop (taking 100% of 
one core), while the rest of the mingw jobs will idle and never finish. After 
some time Cygwin Terminal isn't responsive anymore, and I'm not able to open 
another one or to spawn any other processes that are relying on the cygwin dll. 
I was able to observe this behaviour every time i tried consistently.
  *

It was noticed that passing -j1 to all the calls to make in the 
shell/bootstrap-ocaml.sh script fixes this issue, so I'm guessing this is some 
kind of multicore scheduling issue.

Given it is the core of our project (the compiler) that makes the whole system 
freeze and that we were hoping to release this project soon, whose main item in 
the changelog is Windows support using Cygwin, it is somewhat vital for us for 
this to be fixed, and while we don't know much of the Cygwin internals/codebase 
we're ready to help in any ways we can.

Kind regards,
Kate

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