Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
Trac
Trac
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Create a new issue
  • Issue Boards

GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

  • Legacy
  • TracTrac
  • Issues
  • #30257

Closed
Open
Opened Apr 22, 2019 by teor@teor

Propagate USR1 and ABRT signals from stem tests through to tor

In #30234 (moved), we got the tor logs, but the USR1 and ABRT signals sent by timelimit to test_stem.py aren't being propagated to tor:

Apr 22 03:32:30.000 [notice] Monitored process 20402 is dead.
Apr 22 03:32:30.000 [notice] Owning controller process has vanished -- exiting now.
Apr 22 03:32:30.000 [notice] Catching signal TERM, exiting cleanly.

https://travis-ci.org/teor2345/tor/jobs/522893523#L4944

We need to work out how to get the signals from this stem test process down to the tor it launches:

================================================================================
Signal SIGABRT received by thread MainThread in process 20402
--------------------------------------------------------------------------------
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/teor2345/tor/stem/stem/control.py", line 984, 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)
--------------------------------------------------------------------------------
MainThread thread stacktrace
  File "/home/travis/build/teor2345/tor/stem/run_tests.py", line 451, in <module>
    main()
  File "/home/travis/build/teor2345/tor/stem/run_tests.py", line 287, in main
    integ_runner.start(target, args.attribute_targets, args.tor_path)
  File "/home/travis/build/teor2345/tor/stem/test/runner.py", line 262, in start
    self._owner_controller = self.get_tor_controller(True)
  File "/home/travis/build/teor2345/tor/stem/test/runner.py", line 482, in get_tor_controller
    controller.authenticate(password = CONTROL_PASSWORD, chroot_path = self.get_chroot())
  File "/home/travis/build/teor2345/tor/stem/stem/control.py", line 1103, in authenticate
    stem.connection.authenticate(self, *args, **kwargs)
  File "/home/travis/build/teor2345/tor/stem/stem/connection.py", line 530, in authenticate
    protocolinfo_response = get_protocolinfo(controller)
  File "/home/travis/build/teor2345/tor/stem/stem/connection.py", line 1007, in get_protocolinfo
    protocolinfo_response = _msg(controller, 'PROTOCOLINFO 1')
  File "/home/travis/build/teor2345/tor/stem/stem/connection.py", line 1036, in _msg
    return controller.msg(message)
  File "/home/travis/build/teor2345/tor/stem/stem/control.py", line 654, 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/teor2345/tor/stem/run_tests.py", line 98, in log_traceback
    for thread_name, stacktrace in test.output.thread_stacktraces().items():
  File "/home/travis/build/teor2345/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/teor2345/tor/stem/stem/control.py", line 939, in _reader_loop
    control_message = self._socket.recv()
  File "/home/travis/build/teor2345/tor/stem/stem/socket.py", line 474, in recv
    return self._recv(lambda s, sf: recv_message(sf))
  File "/home/travis/build/teor2345/tor/stem/stem/socket.py", line 274, in _recv
    return handler(my_socket, my_socket_file)
  File "/home/travis/build/teor2345/tor/stem/stem/socket.py", line 474, in <lambda>
    return self._recv(lambda s, sf: recv_message(sf))
  File "/home/travis/build/teor2345/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)
================================================================================

https://travis-ci.org/teor2345/tor/jobs/522893523#L3830

To upload designs, you'll need to enable LFS and have admin enable hashed storage. More information
Assignee
Assign to
Tor: 0.2.9.x-final
Milestone
Tor: 0.2.9.x-final
Assign milestone
Time tracking
None
Due date
None
Reference: legacy/trac#30257