[tor-bugs] #4626 [Tor Directory Authority]: Very high cpu usage for gabelmoo running master

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Tue Dec 6 05:54:36 UTC 2011


#4626: Very high cpu usage for gabelmoo running master
-------------------------------------+--------------------------------------
 Reporter:  Sebastian                |          Owner:                    
     Type:  defect                   |         Status:  needs_review      
 Priority:  major                    |      Milestone:  Tor: 0.2.3.x-final
Component:  Tor Directory Authority  |        Version:                    
 Keywords:                           |         Parent:                    
   Points:                           |   Actualpoints:                    
-------------------------------------+--------------------------------------

Comment(by Sebastian):

 lalelu, to keep trac updated:

 wanoskarnet and asn have been chatting, and had another idea which seems
 to not be the problem:

 {{{

 diff --git a/src/common/tortls.c b/src/common/tortls.c
 index 1205599..a768634 100644
 --- a/src/common/tortls.c
 +++ b/src/common/tortls.c
 @@ -1629,14 +1629,17 @@ tor_tls_read(tor_tls_t *tls, char *cp, size_t len)

  #ifdef V2_HANDSHAKE_SERVER
    if (tls->got_renegotiate) {
 -    tor_assert(tls->server_handshake_count == 2);
 -    /* XXX tor_assert(err == TOR_TLS_WANTREAD); */
 -
 -    /* Renegotiation happened! */
 -    log_info(LD_NET, "Got a TLS renegotiation from %s", ADDR(tls));
 -    if (tls->negotiated_callback)
 -      tls->negotiated_callback(tls, tls->callback_arg);
 -    tls->got_renegotiate = 0;
 +    if ((err == TOR_TLS_WANTREAD) || (err == TOR_TLS_WANTWRITE)) {
 +
 +      tor_assert(tls->server_handshake_count == 2);
 +      /* XXX tor_assert(err == TOR_TLS_WANTREAD); */
 +
 +      /* Renegotiation happened! */
 +      log_info(LD_NET, "Got a TLS renegotiation from %s", ADDR(tls));
 +      if (tls->negotiated_callback)
 +        tls->negotiated_callback(tls, tls->callback_arg);
 +      tls->got_renegotiate = 0;
 +    }
    }
  #endif

 }}}

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


More information about the tor-bugs mailing list