[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



#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):

 Hi, just wanted to leave a few comments:

 (1) The function 'tor_run_thread_cleanup_fn()' is never run. I checked
 this by adding the following and checking that they never execute (added
 the call to system since I didn't check if the logging subsystem will
 still log at this point of the shutdown procedure).

 {{{
 tor_run_thread_cleanup_fn(void)
 {
   log_warn(LD_OR, "HERE");
   system("touch /tmp/abc");
   if (thread_cleanup_fn)
     thread_cleanup_fn();
 }
 }}}

 (2) The code comments still say "func should not return, but rather should
 call spawn_exit", but if you do this, then "tor_run_thread_cleanup_fn()"
 would be run twice (once in spawn_exit and once in tor_pthread_helper_fn).

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/32103#comment:15>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs