meejah / txtorcon

Twisted-based asynchronous Tor control protocol implementation. Includes unit-tests, examples, state-tracking code and configuration abstraction.
http://fjblvrw2jrxnhtg67qpbzi45r7ofojaoo3orzykesly2j3c2m3htapid.onion/
MIT License
250 stars 72 forks source link

Handle limits better #391

Open meejah opened 1 year ago

meejah commented 1 year ago

In #389 (one) core problem turned out to be with Twisted's chosen limits in LineOnlyReceiver: if "too much" is buffered, the connection is closed.

We should provide a better error than this for txtorcon users so that it's more obvious in the future that limits may need to be increased again.

(A longer-term solution would be to determine what Tor's actual limits -- if any -- are here, and use those).

hellais commented 1 year ago

Just dropping a comment that how this looks like from the perspective of a txtorcon user is a traceback in the form of:

Tor unexpectedly disconnected while running: XXXX
Unhandled Error
Traceback (most recent call last):
Failure: builtins.RuntimeError: Tor exited with error-code 0

Hopefully this way future humans have an easier time finding this issue (that's what I was searching for in the issues when I ran into this bug).