[tor-bugs] #32034 [Core Tor/Tor]: tor reads PT protocol messages from stderr
Tor Bug Tracker & Wiki
blackhole at torproject.org
Mon Jan 20 18:25:53 UTC 2020
#32034: tor reads PT protocol messages from stderr
--------------------------+------------------------------------
Reporter: dcf | Owner: neel
Type: defect | Status: new
Priority: Medium | Milestone: Tor: 0.4.3.x-final
Component: Core Tor/Tor | Version: Tor: 0.4.2.2-alpha
Severity: Normal | Resolution:
Keywords: tor-pt | Actual Points:
Parent ID: | Points:
Reviewer: | Sponsor:
--------------------------+------------------------------------
Comment (by ahf):
I think the example script have a bug: The `echo`'s in the subshell writes
to standard out and you redirect all output from the subshell from
standard error to standard out, where instead it should be redirect all
output from the subshell's standard out to standard error, so `1>&2`
instead of `2>&1`.
The example with `wc` also shows this, as the redirect to `/dev/null`
should still show the three lines to standard error:
{{{
user at tor-dev:~$ ./test-fake-pt.sh > /dev/null | wc -l
0
VERSION 1
SMETHOD testpt 127.0.0.1:9999
SMETHODS DONE
}}}
Tor's PT standard error handler does not send the standard error messages
into the PT state machine handler and logs the errors with the warning log
level. I do think that's a bit higher than what we want for this kind of
event, so I'm submitting a patch in a moment that lowers the log level for
PT standard error messages from warning to debug.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/32034#comment:5>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list