[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-bugs] #9957 [Tor]: Tor should consider stderr output of transport proxies



#9957: Tor should consider stderr output of transport proxies
------------------------+--------------------------------
     Reporter:  wfn     |      Owner:
         Type:  defect  |     Status:  needs_review
     Priority:  minor   |  Milestone:  Tor: 0.2.6.x-final
    Component:  Tor     |    Version:
   Resolution:          |   Keywords:  tor-pt
Actual Points:          |  Parent ID:
       Points:          |
------------------------+--------------------------------

Comment (by wfn):

 Replying to [comment:7 asn]:


 > Patch looks plausible.
 >
 > Three comments:
 > a) `configure_proxy()` is getting pretty big. Maybe move stderr reading
 to a function, and call it from `configure_proxy()`?

 Hmm, it's not *that* big
 ([https://github.com/wfn/tor/blob/bug_9957/src/or/transports.c#L591-L698
 ~100 lines]), but I see what you mean - it's doing multiple things, so to
 say. There's some global state involved (e.g. we need to free
 `proxy_err_output` at a particular point dependent on the status of the
 stdout stream), so it might not be as clean as you'd like - but see
 attached patch. Something like that?

 >
 > b) With regards to the `log_notice()` message, maybe we should call it
 `standard error stream` or just `stderr`? I'm not sure if it's a pipe.

 Ah yes, indeed (tor seems to prefer to call it 'pipe' as a higher-level
 abstraction (i.e. it may be a handle, etc. depending on platform; but it's
 a pipe in general), but this shouldn't mean we should call it that when
 talking to a user.)

 > Maybe we should just suggest people to look into INFO-level logs, since
 obfsproxy doesn't log to a file by default, and some times it doesn't have
 time to write a logfile when this error appears (in ImportErrors, etc.).

 I agree (that was indeed the original problem anyway.) Log message tells
 them that, maybe it should be more clear about it? But this notice is
 there.

 >
 > c) I wonder what PTs currently output to stderr. Maybe if we are serious
 about this, we should add another convention to `pt-spec.txt` asking PTs
 to not print stuff in stderr except if they have error messages that the
 user should see.

 Yeah, I was wondering if this could not cause any trouble in some
 other/future PTs. Adding an explicit clause makes sense. Also, it'd be
 nice to make sure all current PTs already stick to this practice
 (obfsproxy does, I guess.)

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/9957#comment:9>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs