[tor-bugs] #32103 [Core Tor/Tor]: Subsystem "thread_cleanup" is never called

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu Jan 30 19:02:25 UTC 2020


#32103: Subsystem "thread_cleanup" is never called
--------------------------------------+------------------------------------
 Reporter:  opara                     |          Owner:  nickm
     Type:  defect                    |         Status:  needs_review
 Priority:  Medium                    |      Milestone:  Tor: 0.4.3.x-final
Component:  Core Tor/Tor              |        Version:
 Severity:  Normal                    |     Resolution:
 Keywords:  043-should, extra-review  |  Actual Points:  .2
Parent ID:                            |         Points:
 Reviewer:  nickm                     |        Sponsor:
--------------------------------------+------------------------------------

Comment (by opara):

 Ah you're right sorry, it would only be called once, although it is a
 little confusing. Is there a reason not to remove {{{spawn_exit()}}}
 entirely at this point and just call {{{pthread_exit(NULL)}}} within the
 wrapper?

 One other thing is that you're writing to a global
 ({{{thread_cleanup_fn}}}) in the main thread, but reading it from other
 threads. This should be fine (I'm assuming NUMA won't complicate things),
 but I think it's worth documenting that you must not call
 {{{tor_set_thread_cleanup_fn()}}} after you have started any threads.

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


More information about the tor-bugs mailing list