You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Rare hang (~1 in 3000) in grpc when using abseil sync primitives on Windows. #1877
User of Abseil here -- saw this scary-looking ticket and wanted to make sure my project wasn't vulnerable.
Does the issue still present if you replace the use of std::_Exit() with std::exit()? The Windows implementation of std::_Exit seems a bit dubious -- reading the source in the UCRT source code (look for exit.cpp in your Windows SDK install) in most cases it boils down to a call to Win32's ExitProcess().
But ExitProcess() is somewhat dangerous -- it abruptly terminates all but the current thread, without invoking the threads' destructors for thread-local objects. However, destructors of thread-locals for the thread calling ExitProcess() are evidently still executed. This is bad news if any of the thread-local object dtors acquire a lock -- and Abseil's do -- because that lock might end up being held a thread that was killed.
Activity
nickhutchinson commentedon May 4, 2025
User of Abseil here -- saw this scary-looking ticket and wanted to make sure my project wasn't vulnerable.
Does the issue still present if you replace the use of
std::_Exit()withstd::exit()? The Windows implementation ofstd::_Exitseems a bit dubious -- reading the source in the UCRT source code (look forexit.cppin your Windows SDK install) in most cases it boils down to a call to Win32'sExitProcess().But
ExitProcess()is somewhat dangerous -- it abruptly terminates all but the current thread, without invoking the threads' destructors for thread-local objects. However, destructors of thread-locals for the thread callingExitProcess()are evidently still executed. This is bad news if any of the thread-local object dtors acquire a lock -- and Abseil's do -- because that lock might end up being held a thread that was killed.GH-49465: [CI][C++] Fix Abseil hang in arrow-flight-test on ODBC Wind…