[tor-bugs] #5263 [Tor Relay]: Busy/infinite Libevent loops

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Sat Jun 9 02:55:11 UTC 2012


#5263: Busy/infinite Libevent loops
------------------------+---------------------------------------------------
 Reporter:  robgjansen  |          Owner:                    
     Type:  defect      |         Status:  needs_review      
 Priority:  major       |      Milestone:  Tor: 0.2.3.x-final
Component:  Tor Relay   |        Version:                    
 Keywords:              |         Parent:                    
   Points:              |   Actualpoints:                    
------------------------+---------------------------------------------------

Comment(by nickm):

 wrt the OR_CONN_STATE_TLS_SERVER_RENEGOTIATING issue -- I think the
 problem might be here, around line 2818 (in master connection.c) :
 {{{
       case TOR_TLS_WANTWRITE:
         connection_start_writing(conn);
         return 0;
       case TOR_TLS_WANTREAD: /* we're already reading */
       case TOR_TLS_DONE: /* no data read, so nothing to process */
         result = 0;
         break; /* so we call bucket_decrement below */
 }}}

 The "wantread" case isn't correct if connection_handle_read is called from
 connection_handle_write_impl.  I think instead it should say something
 like
 {{{
       case TOR_TLS_WANTREAD:
           if (connection_is_writing(conn))
              stop writing.
           if (! connection_is_reading(conn))
               start reading
       ...
 }}}

 or something of that kind.  (Very sleepy now; I may be doing this poorly;
 please read the above critically.)

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


More information about the tor-bugs mailing list