[tor-bugs] #4345 [Tor Relay]: Bug: closing wedged cpuworker.

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Fri Jan 20 18:35:08 UTC 2012


#4345: Bug: closing wedged cpuworker.
-----------------------+----------------------------------------------------
 Reporter:  jn         |          Owner:                     
     Type:  defect     |         Status:  needs_information  
 Priority:  normal     |      Milestone:  Tor: unspecified   
Component:  Tor Relay  |        Version:  Tor: 0.2.3.10-alpha
 Keywords:             |         Parent:                     
   Points:             |   Actualpoints:                     
-----------------------+----------------------------------------------------

Comment(by juwi):

 I put some work into it and patched cpuworker.c. As nickm wrote
 CPUWORKER_BUSY_TIMEOUT seems to be ridiculously high, also gamambel
 suggested trying out just using more cpuworkers, so I also set
 MAX_CPUWORKERS to 32. Of course this doesn't solve the error yet, it is
 merely a workaround, but so far it makes a huge difference. While
 previously it merely hit about 8MB/sec I'm now up to about 60MB/sec
 (~450-500Mbits), which is pretty good, considering I just built a
 workaround.

 Here comes the patch. Just put it in the files directory, recompile, and
 have fun.

 I'll also try finding the actual cause of the problem, but I'll be busy
 the next two weeks, so that'll have to wait.

 `less /usr/ports/security/tor-devel/files/patch-src-or-cpuworker.c---
 src/or/cpuworker.c  2012-01-20 17:38:13.000000000 +0100+++
 src/or/cpuworker.c  2012-01-20 19:16:44.000000000 +0100@@ -24,7 +24,7 @@
 #include "router.h" /** The maximum number of cpuworker processes we will
 keep around. */-#define MAX_CPUWORKERS 16+#define MAX_CPUWORKERS 32 /**
 The minimum number of cpuworker processes we will keep around. */ #define
 MIN_CPUWORKERS 1@@ -405,7 +405,7 @@  * up on it and decide that we have a
 bug or infinite loop?  * This value is high because some servers with low
 memory/cpu  * sometimes spend an hour or more swapping, and Tor starves.
 */-#define CPUWORKER_BUSY_TIMEOUT (60*60*12)+#define
 CPUWORKER_BUSY_TIMEOUT (60*2*1) /** We have a bug that I can't find.
 Sometimes, very rarely, cpuworkers get  * stuck in the 'busy' state, even
 though the cpuworker process thinks of`

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


More information about the tor-bugs mailing list