[tor-bugs] #20239 [Applications/Tor Browser]: Tor Browser should print error messages on startup failure
Tor Bug Tracker & Wiki
blackhole at torproject.org
Sat Sep 24 17:41:44 UTC 2016
#20239: Tor Browser should print error messages on startup failure
------------------------------------------+----------------------
Reporter: cypherpunks | Owner: tbb-team
Type: enhancement | Status: new
Priority: Medium | Milestone:
Component: Applications/Tor Browser | Version:
Severity: Normal | Keywords:
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.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/20239>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list