Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Trac Trac
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #33087
Closed (moved) (moved)
Open
Issue created Jan 28, 2020 by Taylor Yu@catalyst

closing stdio fds on exit can interfere with LeakSanitizer, etc

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.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking