Open OmegaDoom opened 6 years ago
We're hitting the same issue on Ceph. The above sample is still hanging using mingw 8.0.0 and g++-mingw-w64 10.3.0.
Can you reproduce the issue with latest GCC toolchain 12.1.0?
Can you reproduce the issue with latest GCC toolchain 12.1.0?
I'm giving it a try, thanks for the suggestion.
Same behavior using mingw 10.0.0 and gcc 12.1.0.
Here's a trace: https://pastebin.com/raw/wBzzpqi1
There seems to be a deadlock between the following calls:
I suppose this is one of GCC emulatedTLS bugs. You'd probably have to use Clang from CLANG64 subsystem to workaround it. Otherwise the best way to solve it is reporting at GCC's bugzilla.
There have been issues in winpthreads that never get fixed. However, do you have any interest in https://gcc-mcf.lhmouse.com/? I believe it is feasible to create a new threading library to replace winpthreads.
There have been issues in winpthreads that never get fixed. However, do you have any interest in https://gcc-mcf.lhmouse.com/? I believe it is feasible to create a new threading library to replace winpthreads.
Thanks for mentioning mcfgthread
. It seems promising, however it was more convenient for us to just switch to boost::shared_mutex
to avoid this specific issue, at least for the time being. Having to patch gcc and mingw would complicate the ceph build process and maintenance.
Hello. This code causes a deadlock.
Run this program multiple times and eventually it goes to deadlock. There is no such bug on c++ 7.2.0 of ubuntu and VS 2017.