[tor-bugs] #8680 [Tor]: CPU 100% - conn_write_callback(): socket # wants to write.

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Apr 10 22:45:26 UTC 2013


#8680: CPU 100% - conn_write_callback(): socket # wants to write.
-----------------------+----------------------------------------------------
 Reporter:  alphawolf  |          Owner:                     
     Type:  defect     |         Status:  new                
 Priority:  normal     |      Milestone:                     
Component:  Tor        |        Version:  Tor: 0.2.4.11-alpha
 Keywords:             |         Parent:                     
   Points:             |   Actualpoints:                     
-----------------------+----------------------------------------------------
 Running as a relay on Debian Wheezy x86_64, installed from tor repository.

 This is difficult to describe, and I'm not 100% certain I know how to
 reproduce it... It seems to reproduce itself.  After an indeterminate
 amount of time, the CPU usage for tor goes to 100% and stays there until I
 restart the service.  This is a fairly low bandwidth relay (128 KB/s), and
 even when very busy the CPU usage is usually 3%.  The most recent time
 this happened, I stumbled upon the "SIGNAL DEBUG" command, which I passed
 to tor via arm.  The result was *millions of lines* of the following:

 {{{
 Apr 10 17:59:25.000 [debug] conn_write_callback(): socket 124 wants to
 write.
 Apr 10 17:59:25.000 [debug] connection_read_to_buf(): 124: starting,
 inbuf_datalen 0 (0 pending in tls object). at_most 15872.
 Apr 10 17:59:25.000 [debug] tor_tls_read(): read returned r=-1, err=-2
 Apr 10 17:59:25.000 [debug] connection_read_to_buf(): After TLS read of 0:
 0 read, 0 written
 Apr 10 17:59:25.000 [debug] connection_or_process_cells_from_inbuf(): 124:
 starting, inbuf_datalen 0 (0 pending in tls object).
 Apr 10 17:59:25.000 [debug] conn_write_callback(): socket 124 wants to
 write.
 Apr 10 17:59:25.000 [debug] connection_read_to_buf(): 124: starting,
 inbuf_datalen 0 (0 pending in tls object). at_most 15872.
 Apr 10 17:59:25.000 [debug] tor_tls_read(): read returned r=-1, err=-2
 Apr 10 17:59:25.000 [debug] connection_read_to_buf(): After TLS read of 0:
 0 read, 0 written
 Apr 10 17:59:25.000 [debug] connection_or_process_cells_from_inbuf(): 124:
 starting, inbuf_datalen 0 (0 pending in tls object).

 }}}
 Those lines were repeated ''identically'', adding 75,000 lines ''per
 second'' to the log.

 Other information:

  * The relay also runs a bitcoin server as a hidden service.
  * Tor is configured to to listen for socks connections on the local
 network.

 Before running "SIGNAL DEBUG", I:

  * Turned off the bitcoin server.  CPU remained at 100% for the tor
 process.
  * Disabled the hidden service in torrc, and gave SIGHUP.  CPU remained at
 100% for the tor process.
  * Disabled any device on the local network that could be accessing tor
 via socks.  CPU remained at 100% for the tor process.

 I'm not sure what other information I can provide...  Let me know what
 else you need to help track this down.

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


More information about the tor-bugs mailing list