Opened 13 years ago

Last modified 7 years ago

#369 closed defect (Fixed)

Bad GETINFO "accounting/bytes-left" data

Reported by: guest Owned by:
Priority: Low Milestone:
Component: Core Tor/Tor Version: 0.1.1.25
Severity: Keywords:
Cc: arma Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

# uname -a
OpenBSD fgsfds.local 4.0 GENERIC#0 i386

# tor -h
Dec 14 18:20:18.888 [notice] Tor v0.1.1.25. This is experimental software. Do not rely on it for strong anonymity.
Copyright 2001-2005 Roger Dingledine, Nick Mathewson.

torrc excerpt:

SocksPort 9050
SocksListenAddress 0.0.0.0
SocksPolicy accept 192.168.15.0/24
SocksPolicy reject *

Log notice syslog
Log info file /etc/tor/private/debug.log

RunAsDaemon 1
DataDirectory /etc/tor/private
ControlPort 9051
ORPort 9001
PublishServerDescriptor 1

AccountingMax 300MB
AccountingStart day 00:00

ExitPolicy reject *:*

User _tor
Group _tor

BandwidthRate 50KB

PidFile /etc/tor/tor.pid
SafeLogging 1

# grep hibernate debug.log
...
debug.log:Dec 14 00:00:00.683 [notice] hibernate_end(): Hibernation period ended. Resuming normal activity.
debug.log:Dec 14 12:25:54.369 [notice] consider_hibernation(): Bandwidth soft limit reached; commencing hibernation.
debug.log:Dec 14 12:25:54.371 [info] hibernate_begin(): Closing listener type 3
debug.log:Dec 14 12:25:54.372 [info] hibernate_begin(): Closing listener type 6
debug.log:Dec 14 12:36:32.850 [notice] hibernate_go_dormant(): Going dormant. Blowing away remaining connections.
debug.log:Dec 14 12:36:32.852 [info] hibernate_go_dormant(): Closing conn type 4
...

# telnet localhost 9051
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
authenticate
250 OK
getinfo accounting/hibernating
250-accounting/hibernating=hard
250 OK
getinfo accounting/bytes
250-accounting/bytes=316021088 308635003
250 OK
getinfo accounting/bytes-left
250-accounting/bytes-left=18446744073708103328 5937797 <--- wrong
250 OK
quit
250 closing connection
Connection closed by foreign host.

[Automatically added by flyspray2trac: Operating System: BSD]

Child Tickets

Change History (4)

comment:1 Changed 13 years ago by arma

This is happening because the "read bytes left" has gone negative, but
we're displaying it as unsigned.

Apparently this can occur since we batch up the bytes spent each second,
and in this case you used about a megabyte during that second.

Hm. I wonder how thoroughly we should try to fix this.

comment:2 Changed 13 years ago by nickm

I'm going to fix the GETINFO display, and leave it at that. A second's worth
of inaccuracy is probably okay; if people need more accuracy than that, they
need to add some safety factor in their accounting.

comment:3 Changed 13 years ago by nickm

flyspray2trac: bug closed.
Fix checked in as r9115, should appear in 0.1.2.5-alpha.

comment:4 Changed 7 years ago by nickm

Component: Tor RelayTor
Note: See TracTickets for help on using tickets.