Opened 7 months ago

Last modified 6 months ago

#32939 new defect

Make sbws become idle and re-try sending messages to the controller when it fails

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

Description

Jan 10 18:23:16 WARNING MainThread heartbeat.py:67 - print_heartbeat_message - There is no progress measuring new unique relays.
Jan 10 18:23:16 DEBUG MainThread scanner.py:548 - main_loop - Attempted to measure 317 relays in 7.899018947283427 minutes
Jan 10 18:23:16 CRITICAL MainThread scanner.py:707 - run_speedtest - Something went wrong.
Please create a ticket in https://trac.torproject.org with this traceback.
Jan 10 18:23:16 ERROR MainThread scanner.py:708 - run_speedtest -
Traceback (most recent call last):
  File "/home/tom/sbws-venv/lib/python3.7/site-packages/sbws/core/scanner.py", line 700, in run_speedtest
    max_pending_results, pool)
  File "/home/tom/sbws-venv/lib/python3.7/site-packages/sbws/core/scanner.py", line 550, in main_loop
    if controller.get_conf('TestingTorNetwork') == '1':
  File "/home/tom/sbws-venv/lib/python3.7/site-packages/stem/control.py", line 2170, in get_conf
    entries = self.get_conf_map(param, default, multiple)
  File "/home/tom/sbws-venv/lib/python3.7/site-packages/stem/control.py", line 2254, in get_conf_map
    response = self.msg('GETCONF %s' % ' '.join(lookup_params))
  File "/home/tom/sbws-venv/lib/python3.7/site-packages/stem/control.py", line 651, in msg
    self._socket.send(message)
  File "/home/tom/sbws-venv/lib/python3.7/site-packages/stem/socket.py", line 450, in send
    self._send(message, lambda s, sf, msg: send_message(sf, msg))
  File "/home/tom/sbws-venv/lib/python3.7/site-packages/stem/socket.py", line 247, in _send
    raise stem.SocketClosed()
stem.SocketClosed

It seems like sometimes tor does not respond to a controller message and that causes sbws to crash...

Child Tickets

Change History (5)

comment:1 Changed 7 months ago by juga

It seems like sometimes tor does not respond to a controller message and that causes sbws to crash...

In concrete, when sending GETCONF.

Could you look which versions of stem and tor you have?.

This looks like a duplicate of #32897, i'd copy these lines there and close this one.

Thanks!

comment:2 Changed 7 months ago by tom

From inside the venv I did tor --version Tor version 0.3.5.8. and stem.version = '1.7.1'

comment:3 Changed 7 months ago by juga

The machines was having only 512MB of RAM that have been just increased. If this error does not happen again, the problem was probably that.
We recommend at least 1.5GB https://sbws.readthedocs.io/en/latest/INSTALL.html#system-physical-requirements

Last edited 7 months ago by juga (previous) (diff)

comment:4 Changed 7 months ago by tom

The likely theory is that tor got killed and crashed SBWS. It would be nice if sbws could handle this nicely and idle until it could reconnect to tor...

comment:5 Changed 6 months ago by juga

Summary: Python stack in sbwsMake sbws become idle and re-try sending messages to the controller when it fails

Changing title to reflect what would be nice to do in this ticket

Note: See TracTickets for help on using tickets.