[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-bugs] #33087 [Core Tor/Tor]: closing stdio fds on exit can interfere with LeakSanitizer, etc
#33087: closing stdio fds on exit can interfere with LeakSanitizer, etc
------------------------------+------------------------------
Reporter: catalyst | Owner: (none)
Type: defect | Status: new
Priority: Medium | Milestone: Tor: unspecified
Component: Core Tor/Tor | Version:
Severity: Normal | Keywords: tor-log
Actual Points: | Parent ID:
Points: | Reviewer:
Sponsor: |
------------------------------+------------------------------
At tor exit time, `tor_log_close_sigsafe_err_fds()` winds up closing
stderr or stdout if they're being log destinations. This can close stderr
before tools like LeakSanitizer can output useful information, e.g., if
there's a config setting like `Log notice stderr`. (valgrind doesn't seem
to have this problem, maybe because it runs a separate process?)
Is it correct for us to close a default fd like stderr or stdout if we're
not running as a daemon? Other tools that do runtime interception might
also be affected. If we think we have a good reason to explicitly close
these fds, we probably should document how tor's closing of these fds can
interfere with debugging tools.
nickm thinks this behavior might be new in 0.4.2 with the signal safety
work. I haven't had time to investigate further.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/33087>
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