[tor-bugs] #25987 [Core Tor/Tor]: Allow controller to receive log messages from outside main thread

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue May 1 14:14:35 UTC 2018


#25987: Allow controller to receive log messages from outside main thread
------------------------------+----------------------------------------
     Reporter:  nickm         |      Owner:  nickm
         Type:  defect        |     Status:  assigned
     Priority:  Medium        |  Milestone:  Tor: 0.3.5.x-final
    Component:  Core Tor/Tor  |    Version:
     Severity:  Normal        |   Keywords:  035-roadmap-proposed small
Actual Points:                |  Parent ID:
       Points:                |   Reviewer:
      Sponsor:                |
------------------------------+----------------------------------------
 Our existing callback system doesn't allow this, but actually it would be
 pretty easy to take care of.

 The trick here would be:
   1) to make it so that the flush_queued_events_event uses the
 alert_sockets_create() mechanism, so it can be turned on from another
 thread.
   2) To remove the check for whether we're in the main thread from
 control_event_logmsg().

 I think this would be pretty simple -- maybe a couple hours of work -- but
 we should consider it only for 0.3.5, since it has potential to be very
 destabilizing if we mess it up.

 Found while working on #25951

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/25987>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list