[tor-talk] How to make the Tor service to stop faster?
cline at frii.com
Mon Feb 15 18:48:45 UTC 2016
> On 15 Feb 2016, at 7:22 AM, nusenu <nusenu at openmailbox.org> wrote:
>> Is there any reason for the ShutdownWaitLength to be 30s? That's too
>> long, no wonder it is so slow to restart the tor service.
> It is just the nicer way to say goodbye to clients - I guess.
I bet shutdown delay has to have something to do with TCP connection finalization semantics, which can leave client processes stuck in a FIN_WAIT_2 state if tor closes too quickly. My memory is a little vague here, but it is a result of interrupting the FIN-> ACK<- FIN<- ACK-> dialogue ... the client won't close the connection until it receive's that last ACK form tor, which tor can't send if it closes before it gets the client's FIN.
I've seen this with server processes on my computer that route through tor. Killing tor can leave them in that FIN_WAIT_2 state in which they cannot be killed, and the service cannot be restarted since the hung process has the service port allocated. Then it's up to the TCP stack to close the connection after it times out.
So, yes - it is a nicer way to say goodbye to clients. And nicer here can mean nicer to you as well.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 203 bytes
Desc: Message signed with OpenPGP using GPGMail
More information about the tor-talk