[tor-bugs] #12572 [Tor]: Proposal for __OwningControllerTimeout option

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Jul 8 18:47:49 UTC 2014


#12572: Proposal for __OwningControllerTimeout option
-------------------------+---------------------
 Reporter:  yarong       |          Owner:
     Type:  enhancement  |         Status:  new
 Priority:  normal       |      Milestone:
Component:  Tor          |        Version:
 Keywords:  tor-client   |  Actual Points:
Parent ID:               |         Points:
-------------------------+---------------------
 '''TL;DR - Can we add !__!OwningControllerTimeout option that will cause
 the Tor OP to exit if it doesn't receive a TAKEOWNERSHIP in the specified
 time interval?'''

 #3049 added TAKEOWNERSHIP and !__!OwningControllerProcess to handle
 situations where a parent wants to spawn the Tor OP as a child and connect
 their life spans.

 The problem is that !__!OwningControllerProcess is very platform specific.
 It assumes that the Tor OP can see the parent PID and detect if it goes
 away. But this works differently on every platform and every new version
 of every platform. Then one gets to do fun things like add it to Android.
 It's a recipe for a lot of testing and compatibility issues.

 !__!OwningControllerProcess also doesn't handle situations where the
 parent might itself become a zombie so its PID is still there but it's not
 really running.

 A potentially simpler solution that doesn't have cross platform issues is
 to introduce the !__!OwningControllerTimeout option. This would specify
 that if the Tor OP doesn't receive a TAKEOWNERSHIP command within a
 certain time period then the Tor OP should exit automatically.

 There is still a potential race condition here if the parent somehow gets
 blocked but this is easily detectable and recoverable by the parent.

 For bonus points we could also add keep alives to TAKEOWNERSHIP in case
 the parent becomes a zombie but this is probably getting a big excessive.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/12572>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list