ivmai / bdwgc

The Boehm-Demers-Weiser conservative C/C++ Garbage Collector (bdwgc, also known as bdw-gc, boehm-gc, libgc)
https://www.hboehm.info/gc/
Other
2.98k stars 407 forks source link

Failed to create new win32 semaphore on Cygwin #522

Closed ivmai closed 1 year ago

ivmai commented 1 year ago

Build: https://ci.appveyor.com/project/ivmai/bdwgc/builds/45812102/job/hss7251qx96m26tn Host: Win64 Occurrence: ~1/30 Broken commit: d8a88dcd6

gctest ouput: gctest 3718 bdwgc.libs\gctest.exe: *** fatal error in forked process - failed to create new win32 semaphore, currentvalue -1, Win32 error 87 Child process failed, pid= 3718, status= 0x1 Test failed

ivmai commented 1 year ago

Win32 error 87 is ERROR_INVALID_PARAMETER

ivmai commented 1 year ago

According to Cygwin source, the issue occurs during semaphore fixup on fork.

ivmai commented 1 year ago

There are several ways to fix this:

Let's the easiest solution and check whether the issue is ever reproduced again.