Tor tries to kill nonexistent proxy PID on second SIGINT
|Reported by:||dcf||Owned by:||nickm|
|Severity:||Keywords:||tor-client, pt, 024-deferrable, 025-triaged, 2016-bug-retrospective|
This is what 180-pluggable-transport.txt says about proxies and SIGINT:
Proxies should respond to a single INT signal by closing their listener ports and not accepting any new connections, but keeping all connections open, then terminating when connections are all closed. Proxies should respond to a second INT signal by shutting down cleanly.
I implemented the websocket-server transport to work as specified:
I noticed unexpected behavior when the proxy receives a SIGINT, and doesn't have any open connection, and so exits immediately without waiting for a second SIGINT. The parent tor process tries to kill a nonexistent PID:
^CApr 19 17:58:59.000 [notice] Interrupt: we have stopped accepting new connections, and will shut down in 30 seconds. Interrupt again to exit now. ^CApr 19 17:59:05.000 [notice] SIGINT received a second time; exiting now. Apr 19 17:59:05.000 [notice] Failed to terminate process with PID '18277' ('No such process').
The PID might have been reclaimed in the meantime, and tor could be killing an unrelated process.
(Originally from https://lists.torproject.org/pipermail/tor-dev/2013-April/004679.html.)
Change History (21)
comment:5 Changed 4 years ago by nickm
- Milestone changed from Tor: 0.2.4.x-final to Tor: 0.2.5.x-final
comment:18 Changed 3 years ago by nickm
- Resolution set to fixed
- Status changed from needs_review to closed