Opened 9 years ago

Closed 8 years ago

Last modified 7 years ago

#2381 closed defect (fixed)

Stack blowout in 0.2.3.0-alpha-dev

Reported by: iang Owned by:
Priority: High Milestone: Tor: 0.2.3.1-alpha
Component: Core Tor/Tor Version: Tor: unspecified
Severity: Keywords: tor-relay
Cc: nickm Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

gurgle (our tor node) kept crashing, so I ran it under gdb. It crashed again, with a SEGV and the attached stack trace. I truncated it; the whole trace goes on for >1600 frames (then I gave up hitting Enter).

Child Tickets

Attachments (1)

bt (17.9 KB) - added by iang 9 years ago.
Backtrace of crashed Tor node

Download all attachments as: .zip

Change History (10)

Changed 9 years ago by iang

Attachment: bt added

Backtrace of crashed Tor node

comment:1 Changed 9 years ago by nickm

Milestone: Tor: 0.2.3.x-final

comment:2 Changed 9 years ago by cypherpunks

    switch (connection_connect(TO_CONN(conn), conn->_base.address, &addr,
                               dir_port, &socket_error)) {
      case -1:
        connection_dir_request_failed(conn); /* retry if we want */
        /* XXX we only pass 'conn' above, not 'resource', 'payload',
         * etc. So in many situations it can't retry! -RD */
        connection_free(TO_CONN(conn));
        return;

Loop. Recurs calls. Actually it's shouldn't even retry (if no such bug), it's just count the failures. I could be wrong, but connection_dir_request_failed(conn) here is not a good way for 0.2.1.x and 0.2.2.x too.

static download_status_t consensus_dl_status[N_CONSENSUS_FLAVORS];

it's only DL_SCHED_GENERIC instead of DL_SCHED_CONSENSUS. Not a reason for bug however.

comment:3 Changed 8 years ago by arma

Priority: normalmajor

comment:4 Changed 8 years ago by nickm

from mobmix:

  conn->requested_resource is null for any resource. that the 
  trigger for infinitive loop. n_download_failures count for "ns" 
  only, while update_consensus_networkstatus_downloads() tries to 
  update both "ns" and "microdesc".

comment:5 Changed 8 years ago by arma

Milestone: Tor: 0.2.3.x-finalTor: 0.2.3.1-alpha

comment:6 Changed 8 years ago by nickm

Status: newneeds_review

Possible fix in branch bug2381 in my public repository.

comment:7 Changed 8 years ago by nickm

Resolution: fixed
Status: needs_reviewclosed

Hm. 6 weeks later, I still like it, so I'll merge it.

comment:8 Changed 7 years ago by nickm

Keywords: tor-relay added

comment:9 Changed 7 years ago by nickm

Component: Tor RelayTor
Note: See TracTickets for help on using tickets.