* Freezing because cwdstuff::set has excessive release_write
@ 2023-10-10 19:22 tryandbuy
0 siblings, 0 replies; only message in thread
From: tryandbuy @ 2023-10-10 19:22 UTC (permalink / raw)
To: cygwin
I think that there is an excessive release_write() in cwdstuff::set.
A link to the call:
https://github.com/cygwin/cygwin/blob/fe5886a500e66cddf0f57eea3049d25d5f8765e9/winsup/cygwin/path.cc#L4871C13-L4871C13
This call leads to a double release of SRW lock which causes deadlocks in some cases.
Test cases to this issue:
1) using Cygwin terminal
1. open Cygwin terminal
2. mkdir test; cd test; echo 123 > 1.txt
3. chmod -x .
4. strace cat 1.txt # <-- freeze
# cd ..; strace cat test/1.txt # <-- no freeze
2) using windows console
1. open cmd.exe
2. cd <path to the previously created test directory>
3. C:\cygwin64\bin\cat.exe 1.txt & rem <-- freeze
rem cd ..; C:\cygwin64\bin\cat.exe test\1.txt <-- no freeze
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-10-10 19:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-10 19:22 Freezing because cwdstuff::set has excessive release_write tryandbuy
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).