[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #25614 [Core Tor/Tor]: tor sets `TOR_PT_EXIT_ON_STDIN_CLOSE=1` only for server transports, not client transports
#25614: tor sets `TOR_PT_EXIT_ON_STDIN_CLOSE=1` only for server transports, not
client transports
--------------------------+----------------------------------
Reporter: dcf | Owner: (none)
Type: defect | Status: new
Priority: Medium | Milestone: Tor: unspecified
Component: Core Tor/Tor | Version:
Severity: Minor | Resolution:
Keywords: | Actual Points:
Parent ID: | Points:
Reviewer: | Sponsor:
--------------------------+----------------------------------
Comment (by dcf):
Replying to [comment:2 arma]:
> David, is this bug preventing specific expected behavior from client-
side transports right now? Assuming yes, can you give us some specifics?
No, it's not causing any problems. On non-Windows platforms, tor sends a
SIGTERM, which the client transport plugin can catch and terminate
cleanly. On Windows, tor has no choice but to call `TerminateProcess`,
which doesn't give the child process a chance to terminate cleanly.
Unclean termination isn't a problem for obfs4proxy, because it doesn't
manage any external resources. Unclean termination ''is'' a problem for
meek-client, because meek-client starts its own child processes that would
be left orphaned. That's the reason for the now three-year-old
[https://gitweb.torproject.org/pluggable-transports/meek.git/tree
/terminateprocess-buffer/terminateprocess-buffer.go?h=0.30
terminateprocess-buffer] hack, which interposes a process between tor and
meek-client that absorbs `TerminateProcess` and allows meek-client to
terminate cleanly. [[comment:21:ticket:15435|I thought]] we would be able
to get rid of terminateprocess-buffer eventually, once tor started
supporting `TOR_PT_EXIT_ON_STDIN_CLOSE` for clients. But it turns out that
hasn't happened yet.
It just seems like an oversight, as there's nothing in the spec that says
it's only for server transports. I know I always anticipated that it would
work for clients as well, and was surprised to learn that it wasn't the
case.
> (E.g. "when meek-browser closes on the client side, Tor doesn't notice
that it's finished so it doesn't report any problems to the user")
You have it backwards: `TOR_PT_EXIT_ON_STDIN_CLOSE` is for tor to ''tell''
a child process to terminate, not to detect when a child process has
decided to terminate on its own.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/25614#comment:3>
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