[tor-bugs] #4345 [Tor]: Bug: closing wedged cpuworker.
Tor Bug Tracker & Wiki
blackhole at torproject.org
Sun Jan 19 05:11:24 UTC 2014
#4345: Bug: closing wedged cpuworker.
------------------------+---------------------------------
Reporter: jn | Owner:
Type: defect | Status: needs_review
Priority: normal | Milestone: Tor: 0.2.4.x-final
Component: Tor | Version: Tor: 0.2.3.10-alpha
Resolution: | Keywords: tor-relay
Actual Points: | Parent ID:
Points: |
------------------------+---------------------------------
Comment (by cypherpunks):
> For an 0.2.4 fix, here's a trivial one: bug4345a_024 in my public
repository.
spawn_func returns errors for threads in cases:
{{{
if (pthread_create(&thread,NULL,tor_pthread_helper_fn,d))
return -1;
if (pthread_detach(thread))
return -1;
}}}
If pthread_create failed it's for sure no thread launched, but if
pthread_detach failed then thread can be launched still? Is it safe to
close another end's socket for socketpair if thread actually runs?
spawn_func should to detect actual errors and terminate failed thread or
recover from failed state.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/4345#comment:34>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list