signal newnym and rate limiting
Scott Bennett
bennett at cs.niu.edu
Wed Jan 6 12:23:30 UTC 2010
On Wed, 6 Jan 2010 06:59:15 -0500 Roger Dingledine <arma at mit.edu>
wrote:
>On Mon, Jan 04, 2010 at 05:40:50AM -0600, Scott Bennett wrote:
>> On Mon, 04 Jan 2010 12:34:39 +0100 Nico Weinreich <info at web-unity.de>
>> wrote:
>> >Hi, in tor log I can see, that tor delayes sometimes the newnym signal.
>> >Is there a way to get this information (including the delayed time in
>> >seconds) trough control port after sending the newnym signal? Cheers
>>
>> I didn't know that tor could be so pokey about acknowledging input
>> from the control port,
>
>Actually, Tor is deliberately slow if you make newnym requests too close
>together. No use spamming the network with new circuits all the time.
>
>If you want to know whether your newnym has taken effect, you could watch
>for circuit events and parse them, or watch for log events and parse them.
>
>> but I've noted here in the past that tor often
>> ignores a SIGHUP or SIGINT for a rather long period of time before finally
>> accepting it. I've seen delays well over a minute and approaching two
>> minutes after sending tor either of those signals before it finally responds.
>> Why? I have no idea. The only way I know of to see the delay time
>> is to watch the log file.
>
>Hm. SIGHUP should respond quite quickly (well under a second). SIGINT
>should log quite quickly, but on relays won't actually take down your
>Tor relay for ShutdownWaitLength (typically 30) seconds.
I usually have that set for at least 10 minutes, usually more like
15 or 20, to allow at least some attrition of circuits before the rest get
blown away without warning.
>
>If your log responses are taking minutes to show up, there's something
>wrong. In fact, this problem sounds like the same problem you get around
>"clock jumped" events. Is your libevent not waking up correctly each
The "clock jump" events my relay was suffering over a year ago appear
to have been due to a totally flaky network connection.
>second? What version of libevent are you using?
I have no idea how often it wakes up. tor no longer states which
libevent versions it was linked with, so I can't be certain. However,
libevent-1.4.13 is currently installed and appears to have been installed
a week before the currently running version of tor, so I assume that that
is the version that tor is using. I do not know what version was in use
when I first complained on this list about the delayed responses, which
I think would have been over a year ago, but may have been a little bit
later than that.
>
>You could learn more by instrumenting the beginning of
>second_elapsed_callback() in src/or/main.c to log when it starts:
> log_fn(LOG_NOTICE, "Tick.");
>and instrumenting the bottom of that function with:
> log_fn(LOG_NOTICE, "End tick.");
>
>"Tick" should show up slightly more than once per second -- not exactly
>once per second due to bug 943:
>https://bugs.torproject.org/flyspray/index.php?do=details&id=943
>and "End tick" should show up quite soon (generally much less than a
>second) after "Tick".
>
I can give that a try, I guess. Please note, though, that the delayed
response is not the typical case. Most of the time, tor appears to respond
right away. IIRC, it is more likely to take its sweet time when it is running
as a relay and is actively dealing with traffic than when it is just a client.
Scott Bennett, Comm. ASMELG, CFIAG
**********************************************************************
* Internet: bennett at cs.niu.edu *
*--------------------------------------------------------------------*
* "A well regulated and disciplined militia, is at all times a good *
* objection to the introduction of that bane of all free governments *
* -- a standing army." *
* -- Gov. John Hancock, New York Journal, 28 January 1790 *
**********************************************************************
***********************************************************************
To unsubscribe, send an e-mail to majordomo at torproject.org with
unsubscribe or-talk in the body. http://archives.seul.org/or/talk/
More information about the tor-talk
mailing list