[tor-bugs] #32058 [Core Tor/Tor]: mainloop: make periodic events restartable

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Oct 15 13:42:56 UTC 2019


#32058: mainloop: make periodic events restartable
-------------------------------------------------+-------------------------
 Reporter:  teor                                 |          Owner:  dgoulet
     Type:  defect                               |         Status:
                                                 |  assigned
 Priority:  Medium                               |      Milestone:  Tor:
                                                 |  0.4.2.x-final
Component:  Core Tor/Tor                         |        Version:  Tor:
                                                 |  0.3.4.1-alpha
 Severity:  Normal                               |     Resolution:
 Keywords:  042-should, regression?,             |  Actual Points:
  035-backport, 040-backport, 041-backport,      |
  042-backport, BugSmashFund                     |
Parent ID:                                       |         Points:  0.5
 Reviewer:  dgoulet                              |        Sponsor:
-------------------------------------------------+-------------------------
Changes (by dgoulet):

 * reviewer:   => dgoulet


Comment:

 Hmmmm so indeed `periodic_event_disconnect()` doesn't unset the enabled
 flag which is `periodic_event_disable()` job.

 It appears that when tearing down tor, we call a "disconnect all" but that
 doesn't cancel any of the event, it just disconnect them which free() the
 libevent event without `event_del()` before (which is the
 `periodic_event_disable()` job to do).

 I'm starting to think that before a disconnect, there should be a disable
 so the event can be freed and its enabled flag set to 0?

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


More information about the tor-bugs mailing list