[issue30391] test_threading_handled() of test_socketserver hangs randomly on AMD64 FreeBSD 10.x Shared 3.6

Martin Panter report at bugs.python.org
Fri Jun 30 21:26:22 EDT 2017


Martin Panter added the comment:

These tests are supposed to:

1. Create a TCP server
2. Open a TCP connection
3. Run a custom connection handler (depending on the particular test) in a new thread
4. When the handler returns, the new thread should call “shutdown_request”
5. Shutdown_request closes the server’s connection socket
6. Shutdown_request sets an event for the main thread
7. Main thread waits for the above event

The stack trace indicates a thread is stuck at step 7. My guess is that step 5 has raised an exception, killing the thread rather than continuing to step 6. I suspect it is a “socket.close” call raising an asynchronous error such as ECONNRESET; see Issue 30319. A general fix for that problem might fix these test_socketserver hangs.

----------
nosy: +martin.panter

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30391>
_______________________________________


More information about the Python-bugs-list mailing list