Opened 4 years ago

#20239 new enhancement

Tor Browser should print error messages on startup failure

Reported by: cypherpunks Owned by: tbb-team
Priority: Medium Milestone:
Component: Applications/Tor Browser Version:
Severity: Normal Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


This is related to #20238 (and #20237 and #19851). 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.

Child Tickets

Change History (0)

Note: See TracTickets for help on using tickets.