[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-talk] How to make the Tor service to stop faster?



> On 15 Feb 2016, at 7:22 AM, nusenu <nusenu@xxxxxxxxxxxxxxx> wrote:
> 
> 
> 
> Pickfire:
>> 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.

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

-- 
tor-talk mailing list - tor-talk@xxxxxxxxxxxxxxxxxxxx
To unsubscribe or change other settings go to
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-talk