#30235: Stem hangs waiting for control port data -----------------------------------+------------------------------- Reporter: teor | Owner: (none) Type: defect | Status: assigned Priority: Medium | Milestone: Component: Core Tor/Stem | Version: Severity: Normal | Resolution: Keywords: tor-ci-fail-sometimes | Actual Points: 0.5 Parent ID: #29437 | Points: 1 Reviewer: | Sponsor: Sponsor31-can -----------------------------------+------------------------------- Changes (by teor):
* milestone: Tor: 0.2.9.x-final => * component: Core Tor/Tor => Core Tor/Stem * version: Tor: 0.2.4.8-alpha => * actualpoints: 0.3 => 0.5 Comment: It looks like stem hangs waiting for a controller reply, but stem never actually sends a command to trigger the reply: {{{ 05/30/2019 10:20:56 [TRACE] Sent to tor: Blarg! 05/30/2019 10:20:56 [TRACE] Received from tor: 650 STATUS_SERVER NOTICE EXTERNAL_ADDRESS ADDRESS=35.202.145.110 METHOD=DIRSERV 05/30/2019 10:20:56 [TRACE] Received from tor: 514 Authentication required. 05/30/2019 10:20:56 [TRACE] Sent to tor: blarg 05/30/2019 10:20:56 [INFO] Error while receiving a control message (SocketClosed): empty socket content 05/30/2019 10:20:56 [TRACE] Received from tor: 650 STATUS_SERVER NOTICE EXTERNAL_ADDRESS ADDRESS=35.184.96.71 METHOD=DIRSERV control.controller... ================================================================================ Signal SIGUSR1 received by thread MainThread in process 18617 -------------------------------------------------------------------------------- MainThread thread stacktrace File "/home/travis/build/torproject/tor/stem/run_tests.py", line 456, in <module> main() File "/home/travis/build/torproject/tor/stem/run_tests.py", line 297, in main run_result = _run_test(args, test_class, output_filters) File "/home/travis/build/torproject/tor/stem/run_tests.py", line 437, in _run_test run_result = stem.util.test_tools.TimedTestRunner(test_results, verbosity = 2).run(suite) File "/home/travis/build/torproject/tor/stem/stem/util/test_tools.py", line 308, in run return super(TimedTestRunner, self).run(test) File "/usr/lib/python3.4/unittest/runner.py", line 168, in run test(result) File "/usr/lib/python3.4/unittest/suite.py", line 84, in __call__ return self.run(*args, **kwds) File "/usr/lib/python3.4/unittest/suite.py", line 122, in run test(result) File "/usr/lib/python3.4/unittest/case.py", line 625, in __call__ return self.run(*args, **kwds) File "/home/travis/build/torproject/tor/stem/stem/util/test_tools.py", line 258, in run result = super(type(self), self).run(result) File "/usr/lib/python3.4/unittest/case.py", line 577, in run testMethod() File "/home/travis/build/torproject/tor/stem/test/require.py", line 57, in wrapped return func(self, *args, **kwargs) File "/home/travis/build/torproject/tor/stem/test/integ/control/controller.py", line 782, in test_set_conf ), reset = True) File "/home/travis/build/torproject/tor/stem/stem/control.py", line 2541, in set_options response = self.msg(query) File "/home/travis/build/torproject/tor/stem/stem/control.py", line 661, in msg response = self._reply_queue.get() File "/usr/lib/python3.4/queue.py", line 167, in get self.not_empty.wait() File "/usr/lib/python3.4/threading.py", line 290, in wait waiter.acquire() File "/home/travis/build/torproject/tor/stem/run_tests.py", line 91, in log_traceback for thread_name, stacktrace in test.output.thread_stacktraces().items(): File "/home/travis/build/torproject/tor/stem/test/output.py", line 110, in thread_stacktraces stacktraces[thread.name] = ''.join(traceback.format_stack(frame)) -------------------------------------------------------------------------------- Tor listener thread stacktrace File "/usr/lib/python3.4/threading.py", line 888, in _bootstrap self._bootstrap_inner() File "/usr/lib/python3.4/threading.py", line 920, in _bootstrap_inner self.run() File "/usr/lib/python3.4/threading.py", line 868, in run self._target(*self._args, **self._kwargs) File "/home/travis/build/torproject/tor/stem/stem/control.py", line 946, in _reader_loop control_message = self._socket.recv() File "/home/travis/build/torproject/tor/stem/stem/socket.py", line 474, in recv return self._recv(lambda s, sf: recv_message(sf)) File "/home/travis/build/torproject/tor/stem/stem/socket.py", line 274, in _recv return handler(my_socket, my_socket_file) File "/home/travis/build/torproject/tor/stem/stem/socket.py", line 474, in <lambda> return self._recv(lambda s, sf: recv_message(sf)) File "/home/travis/build/torproject/tor/stem/stem/socket.py", line 676, in recv_message line = control_file.readline() File "/usr/lib/python3.4/socket.py", line 374, in readinto return self._sock.recv_into(b) -------------------------------------------------------------------------------- Event notifier thread stacktrace File "/usr/lib/python3.4/threading.py", line 888, in _bootstrap self._bootstrap_inner() File "/usr/lib/python3.4/threading.py", line 920, in _bootstrap_inner self.run() File "/usr/lib/python3.4/threading.py", line 868, in run self._target(*self._args, **self._kwargs) File "/home/travis/build/torproject/tor/stem/stem/control.py", line 991, in _event_loop self._event_notice.wait(0.05) File "/usr/lib/python3.4/threading.py", line 553, in wait signaled = self._cond.wait(timeout) File "/usr/lib/python3.4/threading.py", line 294, in wait gotit = waiter.acquire(True, timeout) ================================================================================ }}} https://travis-ci.org/torproject/tor/jobs/539146230#L4372 The tor logs aren't much help, because they are from 10 minutes later than the hang. -- Ticket URL: <https://trac.torproject.org/projects/tor/ticket/30235#comment:12> Tor Bug Tracker & Wiki <https://trac.torproject.org/> The Tor Project: anonymity online
_______________________________________________ tor-bugs mailing list tor-bugs@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs