[tor-bugs] #10088 [Pluggable transport]: pyptlib - use JobObjects on windows to automatically kill PT children when PT itself dies (was: Allow tor helpers to use JobObjects by setting CREATE_BREAKAWAY_FROM_JOB (Windows-only))

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Nov 27 17:33:31 UTC 2013


#10088: pyptlib - use JobObjects on windows to automatically kill PT children when
PT itself dies
-------------------------------------+--------------------------------
     Reporter:  asn                  |      Owner:
         Type:  defect               |     Status:  needs_review
     Priority:  normal               |  Milestone:  Tor: 0.2.4.x-final
    Component:  Pluggable transport  |    Version:
   Resolution:                       |   Keywords:  tor-pt
Actual Points:                       |  Parent ID:  #10006
       Points:                       |
-------------------------------------+--------------------------------
Changes (by infinity0):

 * status:  new => needs_review
 * component:  Tor => Pluggable transport
 * parent:   => #10006


Old description:

> While building Windows pbfs-flash PTTB bundles, we encountered an issue
> where the obfsproxy child of obfs-flash would not be terminated properly
> after closing the PTTBB. More information can be found in
> comment:5:ticket:10006 .
>
> After lots of digging around, the problem was solved by toggling the
> `CREATE_BREAKAWAY_FROM_JOB` flag of `CreateProcess()` in
> `tor_spawn_background()`. More info in comment:26:ticket:10006.
>
> We should look at the possible side-effects of adding the
> `CREATE_BREAKAWAY_FROM_JOB` flag there, and if it's innocuous then we
> should implement the change and get it merged.

New description:

 This allows obfs-flash-client to work smoothly on windows. Otherwise, some
 orphan processes sometimes hang around, using up listen-ports, and prevent
 the next PT from starting *its* children.

 Patch is here: https://github.com/infinity0/pyptlib/compare/w32-subproc

 Note that this is just a temporary measure to get things working on
 windows, until we implement #10047.

 original ticket contents, obsolete since #comment:7:

 ''Allow tor helpers to use JobObjects by setting CREATE_BREAKAWAY_FROM_JOB
 (Windows-only)''

 While building Windows pbfs-flash PTTB bundles, we encountered an issue
 where the obfsproxy child of obfs-flash would not be terminated properly
 after closing the PTTBB. More information can be found in
 comment:5:ticket:10006 .

 After lots of digging around, the problem was solved by toggling the
 `CREATE_BREAKAWAY_FROM_JOB` flag of `CreateProcess()` in
 `tor_spawn_background()`. More info in comment:26:ticket:10006.

 We should look at the possible side-effects of adding the
 `CREATE_BREAKAWAY_FROM_JOB` flag there, and if it's innocuous then we
 should implement the change and get it merged.

--

Comment:

 As discussed, we are proceeding with (2) for now.

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


More information about the tor-bugs mailing list