Comment 10 for bug 417053

Revision history for this message
Denys Duchier (denys.duchier) wrote :

I tried something like that: I added a _close() method to SmartServerSocketStreamMedium

+ def _close(self):
+ self.socket.close()
+ self.finished = True

and kept track of them in the smart server using a weak dict and closed them in
stop_background_thread. Still, I discovered one smart-server-child thread that
would not go away. It appears to be stuck trying to recv from a closed socket:

(Pydbgr) info threads smart-server-child
    until_no_eintr(f=<built-in method recv of _socket.socket object at 0xb53ff70>, *a=(65536,), **kw={})

I have verified that the socket is closed. If I attempt a recv in the debugger, I get a bad file descriptor error.