Opened 8 years ago

Closed 4 years ago

#4447 closed defect (wontfix)

Torbel stops receiving NEWCONSENSUS events

Reported by: Sebastian Owned by:
Priority: Medium Milestone:
Component: Core Tor/TorDNSEL Version:
Severity: Normal Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


A couple of hours after starting up, Torbel stops logging about NEWCONSENSUS events. The accompanying torctl log clearly shows there are events, but torbel is either in some deadlock state or otherwise doesn't know to handle them. This means the scanner goes black, because it takes NEWCONSENSUS events as a motivation to rescan. I'm not sure yet why this happens at all, need to investigate...

Child Tickets

Change History (3)

comment:1 Changed 8 years ago by aagbsn

Could this issue be related to the Traceback you got?

Traceback (most recent call last):
  File "/home/torbel/torflow/TorCtl/", line 713, in _eventLoop
    self._handleFn(timestamp, reply)
  File "/home/torbel/torflow/TorCtl/", line 1338, in _handle1
    self._map1.get(event.event_name, self.unknown_event)(event)
  File "/home/torbel/torbel/", line 781, in stream_status_event
    event.strm_id, router.current_test.circ_id)
AttributeError: 'NoneType' object has no attribute 'circ_id'

The TorCtl thread will exit; and should take TorBEL down with it. See: TorCtl/TorCtl._err() and os.kill(os.getpid()). But perhaps this hack doesn't work when TorBEL daemonize() is used. The signal handler did not log a SIGTERM.

In order to poke at this a bit further I am trying the following (without daemonizing):

diff --git a/ b/
index fe6dbf7..e0767f5 100644
--- a/
+++ b/
@@ -788,6 +788,14 @@ class Controller(TorCtl.EventHandler):
                               router.nickname, event.target_port)
                     # DO something!
+                except AttributeError:
+                    # Lets log this and hope it helps us figure out what is going on
+                    if not router.current_test:
+                        log.error("(%s, %d): current_test was None!",
+                              router.nickname, event.target_port)
+                       import pdb; pdb.set_trace()
                 # Tor closed on us.
                 except TorCtl.TorCtlClosed:

comment:2 Changed 8 years ago by Sebastian

Yup, this issue seems to definitely be caused by the traceback.

comment:3 Changed 4 years ago by arlolra

Resolution: wontfix
Severity: Normal
Status: newclosed

TorBEL is unmaintained.

Note: See TracTickets for help on using tickets.