[tor-relays] Bandwidth Accounting troubles

teor teor2345 at gmail.com
Fri Mar 24 08:07:02 UTC 2017


> On 22 Mar 2017, at 07:46, Tyler Johnson <tylrcjhnsn at gmail.com> wrote:
> 
> Hello!
> 
> I've enabled bandwidth accounting on my tor relay, but encountering
> issues when the relay attempts to wake from hibernation....
> 
> Mar 20 23:47:25 tcj Tor[74346]: Bandwidth soft limit reached;
> commencing hibernation. No new connections will be accepted
> Mar 20 23:52:30 tcj Tor[74346]: Heartbeat: Tor's uptime is 10 days
> 12:00 hours, with 150 circuits open. I've sent 90.20 GB and received
> 90.30 GB. We are currently hibernating.
> Mar 20 23:52:30 tcj Tor[74346]: Circuit handshake stats since last
> time: 2745/2745 TAP, 15557/15557 NTor.
> Mar 20 23:52:30 tcj Tor[74346]: Since startup, we have initiated 0 v1
> connections, 0 v2 connections, 0 v3 connections, and 113565 v4
> connections; and received 1100 v1 connections,130 v2 connections, 41
> v3 connections, and 249967 v4 connections.
> Mar 21 00:00:00 tcj Tor[74346]: Configured hibernation.  This interval
> began at 2017-03-21 00:00:00; the scheduled wake-up time was
> 2017-03-21 00:00:00; we expect to exhaust our quota for this interval
> around 2017-03-22 00:00:00; the next interval begins at 2017-03-22
> 00:00:00 (all times local)
> Mar 21 00:00:00 tcj Tor[74346]: Hibernation period ended. Resuming
> normal activity.
> Mar 21 00:00:00 tcj Tor[74346]: Opening OR listener on 185.92.223.3:8080
> Mar 21 00:00:00 tcj Tor[74346]: Could not bind to 185.92.223.3:8080:
> Address already in use. Is Tor already running?
> Mar 21 00:01:00 tcj Tor[74346]: Opening OR listener on 185.92.223.3:8080
> Mar 21 00:01:00 tcj Tor[74346]: Could not bind to 185.92.223.3:8080:
> Address already in use. Is Tor already running?
> Mar 21 00:02:01 tcj Tor[74346]: Opening OR listener on 185.92.223.3:8080
> Mar 21 00:02:01 tcj Tor[74346]: Could not bind to 185.92.223.3:8080:
> Address already in use. Is Tor already running?
> 
> It will continue in this manner until I manually intervene and restart
> the relay instance.

This seems to be an internal state management issue.
I have opened ticket #21810 to track it.
https://trac.torproject.org/projects/tor/ticket/21810

I would like to confirm tor's behaviour when this happens:

Is there something listening on 185.92.223.3:8080?
Is it this tor process, or another tor process?
If it is this tor process, is tor still working as a relay despite the
warnings?

> snippet from torrc:
> 
> ## Set a maximum of 30 gigabytes each way per period.
> AccountingMax 30 GBytes
> 
> ## Each period starts daily at midnight (AccountingMax is per day)
> AccountingStart day 00:00
> 
> ## Required: what port to advertise for incoming Tor connections.
> ORPort 185.92.223.3:8080
> 
> ## The IP address or full DNS name for incoming connections to your
> ## relay. Leave commented out and Tor will guess.
> Address 185.92.223.3
> 
> ## If you have multiple network interfaces, you can specify one for
> ## outgoing traffic to use.
> OutboundBindAddress 185.92.223.3
> 
> 
> Tor version and OS:
> $ tor --version
> Tor version 0.2.9.10 (git-1f6c8eda0073f464).
> $ uname -a
> OpenBSD tcj.me 6.1 GENERIC#224 amd64

We sometimes have bugs on OpenBSD because it's one of our rarer
platforms.

Do you happen to know if SO_RERUSEADDR has unusual semantics on OpenBSD?
(Or is it disabled entirely?)

> Has anyone else experienced this issue?

This code has had similar issues in the past, particularly on rarer
platforms.

> I have only one outbound
> interface, so is setting the OutboundBindAddress unnecessary and
> possibly causing the problem?

No, OutboundBindAddress is completely unrelated.
OutboundBindAddress is used for connections initiated by your relay.
ORPort is used for connections accepted by your relay.

T

--
Tim Wilson-Brown (teor)

teor2345 at gmail dot com
PGP C855 6CED 5D90 A0C5 29F6 4D43 450C BA7F 968F 094B
ricochet:ekmygaiu4rzgsk6n
xmpp: teor at torproject dot org
------------------------------------------------------------------------

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: Message signed with OpenPGP
URL: <http://lists.torproject.org/pipermail/tor-relays/attachments/20170324/d7af42c5/attachment.sig>


More information about the tor-relays mailing list