Opened 8 years ago

Closed 3 years ago

#3105 closed defect (wontfix)

Pushed bytes reported by Heartbeat are wrong with bufferevents enabled

Reported by: tornewbie Owned by: Sebastian
Priority: Medium Milestone: Tor: unspecified
Component: Core Tor/Tor Version:
Severity: Keywords: bufferevents tor-client
Cc: l+torproject.org_4@… Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

[notice] Tor 0.2.3.0-alpha-dev (git-b0a7e0d6ca45bef3)
...
[notice] Heartbeat: Tor's uptime is 6:00, with 2 circuits open. I've pushed 4.00 GB and received 18.01 MB.
...
[notice] Heartbeat: Tor's uptime is 12:00, with 2 circuits open. I've pushed 8.00 GB and received 23.94 MB

Child Tickets

Change History (20)

comment:1 Changed 8 years ago by rransom

Owner: set to asn
Status: newassigned

comment:2 Changed 8 years ago by asn

Owner: asn deleted

Hey,

I can't seem to reproduce this. Can I have some more information on your setup(like whether you use a 32-bit or a 64-bit CPU)? Is it reproducible?

[I did some brief tests on the type conversions of second_elapsed_callback() to see if I could cause a 32-bit underflow getting assigned to stats_n_bytes_written, but I couldn't reproduce it in a 64-bit machine of mine.]

(
I don't know what "assigned to asn" really means, but I have a feeling it mean "it's asn's responsibility to tackle this; no one else open this bug report ever!".
I hardly have any time to look at my emails lately, let alone handle Tor bugs, so I'll unassign this from myself. I don't like this bug and I would like it killed soon, with or without my help. I think I'll be able to play with this some time mid-next week. If someone wants to take a look at it before that, it would be great.
)

comment:3 Changed 8 years ago by tornewbie

32 bit Ubuntu maverick , libevent 2.0.10 , openssl 1.0.0d , shared library

The bug appeared after building a new git tor snap by adding --enable-bufferevents to the config options

After getting a new git snap and building tor without that config option , the bug in object seems to be disappeared :

[notice] Tor 0.2.3.0-alpha-dev (git-4c9bd06d0d3d0ce8) opening new log file
...
[notice] Heartbeat: Tor's uptime is 6:00, with 3 circuits open. I've pushed 1.84 MB and received 5.46 MB
...
[notice] Heartbeat: Tor's uptime is 12:00, with 2 circuits open. I've pushed 3.36 MB and received 10.01 MB

comment:4 Changed 8 years ago by Sebastian

Owner: set to Sebastian

thanks, that's a really good hint. Will try to track this down.

comment:5 Changed 8 years ago by Sebastian

Hrm, having not much luck reproducing this one. How is your Tor configured, and what version of libevent are you using?

comment:6 Changed 8 years ago by tornewbie

A little update :

  • libevent-2.0.11
  • Tor 0.2.3.1-alpha-dev (git-6f200b61b7effe81) compiled with --enable-bufferevents

Connecting through controlport with telnet , GETINFO traffic/read and GETINFO traffic/written show both the correct values.

Anyway I didn't wait the uptime mex to be logged also because tor works a little bit worse with that option ( at least on my machine environment )

comment:7 Changed 8 years ago by Sebastian

Resolution: fixed
Status: assignedclosed

I think this is probably fixed in 0.2.3.3-alpha ( #3803 ). Please reopen if it doesn't work for you.

comment:8 Changed 8 years ago by asn

Resolution: fixed
Status: closedreopened

Sebastian Lechte reported a variant of this bug to tor-talk on 0.2.3.7-alpha with bufferevents enabled:
https://lists.torproject.org/pipermail/tor-talk/2011-November/022004.html

I'm reopening this trac ticket but I'm not really sure on how to handle it.
It seems like the problem is caused by bufferevents and not by the heartbeat.

comment:9 Changed 8 years ago by leeps

Cc: l+torproject.org_4@… added

comment:10 in reply to:  9 Changed 8 years ago by asn

Replying to leeps:

Assuming you are Sebastian Lechte, could you maybe give provide us with some saucy information about your setup? Like platform, compiler, CPU info, compilation flags, etc.?
Also, is it reproducable?
Also, can you give us the previous heartbeat lines of that log, so that we can see how it reached the "48.04 GB"?

Thank you!

comment:11 Changed 8 years ago by arma

Summary: Pushed bytes reported by Heartbeat are wrongPushed bytes reported by Heartbeat are wrong with bufferevents enabled

comment:12 Changed 8 years ago by nickm

Milestone: Tor: 0.2.3.x-final

comment:13 Changed 7 years ago by nickm

Keywords: bufferevents added

comment:14 Changed 7 years ago by rransom

#5552 may be a duplicate of this bug.

comment:15 Changed 7 years ago by rransom

It still looks to me like this should be a duplicate of #5552 (the heartbeat code looks at stats_n_bytes_written), but I'm still suspicious that it isn't -- in the original report, the number of bytes Tor thinks it has written increases by 4 GiB in each of two heartbeat messages. I wouldn't expect #5552 to trigger exactly once every 6 hours.

comment:16 Changed 7 years ago by nickm

Milestone: Tor: 0.2.3.x-finalTor: 0.2.4.x-final

comment:17 Changed 7 years ago by nickm

Keywords: tor-client added

comment:18 Changed 7 years ago by nickm

Component: Tor ClientTor

comment:19 Changed 6 years ago by nickm

Milestone: Tor: 0.2.4.x-finalTor: unspecified

comment:20 Changed 3 years ago by nickm

Resolution: wontfix
Status: reopenedclosed

The bufferevents code and corresponding build options have been removed in 0.2.9.2-alpha

Note: See TracTickets for help on using tickets.