fix(test): avoid AF_UNIX socket-file hang in temp_socket_dir teardown#262
Conversation
temp_socket_dir's destructor used std::filesystem::remove_all() on a directory holding a bound AF_UNIX socket file. remove_all() stats each entry via symlink_status(), which on Windows libstdc++ opens the file with CreateFileW; opening an AF_UNIX socket file hangs in ZwCreateFile, deadlocking teardown. This timed out the MinGW gcov coverage build (1500s) in local_stream_socket.iocp, native.local_stream_socket.iocp and wait.iocp -- the only suites that bind AF_UNIX paths. MSVC STL stats without opening the file, so the regular CI and non-coverage builds were unaffected; the wait-reactor WSAPoll change in ca33581 addressed an unrelated subsystem (the hang is in test teardown). Unlink the socket file with std::remove (deletes by name without opening it) before remove_all walks the now-empty directory. Portable, no platform branch.
|
An automated preview of the documentation is available at https://262.corosio.prtest3.cppalliance.org/index.html If more commits are pushed to the pull request, the docs will rebuild at the same URL. 2026-06-01 15:48:57 UTC |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #262 +/- ##
========================================
Coverage 77.77% 77.77%
========================================
Files 96 96
Lines 7262 7262
Branches 1773 1773
========================================
Hits 5648 5648
Misses 1104 1104
Partials 510 510 Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
|
GCOVR code coverage report https://262.corosio.prtest3.cppalliance.org/gcovr/index.html Build time: 2026-06-01 16:00:29 UTC |
temp_socket_dir's destructor used std::filesystem::remove_all() on a directory holding a bound AF_UNIX socket file. remove_all() stats each entry via symlink_status(), which on Windows libstdc++ opens the file with CreateFileW; opening an AF_UNIX socket file hangs in ZwCreateFile, deadlocking teardown. This timed out the MinGW gcov coverage build (1500s) in local_stream_socket.iocp, native.local_stream_socket.iocp and wait.iocp -- the only suites that bind AF_UNIX paths. MSVC STL stats without opening the file, so the regular CI and non-coverage builds were unaffected; the wait-reactor WSAPoll change in ca33581 addressed an unrelated subsystem (the hang is in test teardown).
Unlink the socket file with std::remove (deletes by name without opening it) before remove_all walks the now-empty directory. Portable, no platform branch.