Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
T
Tor Browser
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,533
    • Issues 1,533
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 1
    • Merge Requests 1
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar

GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

  • The Tor Project
  • Applications
  • Tor Browser
  • Issues
  • #20239

Closed
Open
Opened Sep 24, 2016 by cypherpunks@cypherpunks

Tor Browser should print error messages on startup failure

This is related to legacy/trac#20238 (moved) (and legacy/trac#20237 (moved) and legacy/trac#19851 (moved)). When the Browser failed to start, it produced absolutely no output. It just exited with an error status like 134, which luckily I was able to see because my $PS1 includes $?.

I understand you don't want the browser leaking data into .xsession-errors or whatever, but this is clearly not the ideal way to do it. Nobody who's unfamiliar with Unix debugging would figure out what's happening.

Could you redirect these fds later in the startup process? I don't know if the Browser uses fork()--it would have to happen before that, and obviously before any network access might happen. You'd need to do something like this in the C code: fd=open("/dev/null",O_WRONLY|O_CLOEXEC); dup2(fd, 1); dup2(fd, 2); close(fd); but with proper error checking.

Even better, write a wrapper process that does not use ASan or other experimental features, that will execute the browser and pop a GUI window with stdout/stderr text on a nonzero exit status. And offer to restart it, like the Browser does when Tor crashes. Maybe even try to detect what's wrong--using the error text, or exit status, or by "unit-testing" some features that have caused trouble in the past--and work around it or suggest the fix.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: tpo/applications/tor-browser#20239