Opened 13 years ago

Last modified 7 years ago

#245 closed defect (Fixed)

tcp connection rollover still buggy

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


<weasel> hmm, weird
<weasel> tor26 uses 2500 FDs, but there are only 600 connections to its ORPort
<arma> dir connections?
<arma> kill -usr1 it and see what they are? :)
<weasel> no, those are well below 50
<weasel> netstat suggests there are about 1700 connections from tor26 to other nodes
<arma> 600 + 1700 + 50 + fudge = 2500
<weasel> yes, only 1700 is a bit much, isn't it?
<weasel> there aren't that many routers :)
<weasel> ouch
<arma> ?
<weasel> there's over 90 connections just to
<weasel> (rodos)
<weasel> bug?
<arma> does each connection have a circuit open?
<arma> or are all the circuits clustered on one or a few connections?

  • weasel USR1s tor

<arma> were they all born around the same time, or are they spaced evenly?
<weasel> grr
<weasel> they are all [scrubbed] :)
<weasel> | Jan 22 22:37:26.798 [info] OR rodos [DFF1D66324E1CD02DC7A594EB7DC5F573CDDBDE0]: 93/93 good connections; uptime 118912/118912 sec (100.00%)
<weasel> (it seems it never expired a single one of them tho)
<arma> exciting.
<weasel> there are several that don't have any connections,
<arma> i keep oscillating between fixing this bug and creating new ones.
<weasel> and also several that have connections
<arma> you mean circuits
<weasel> yes
<arma> Jan 22 16:43:46.483 [notice] Average bandwidth: 288565965253/426289 = 676925 byt
<arma> es/sec reading
<arma> Jan 22 16:43:46.483 [notice] Average bandwidth: 377444609668/426289 = 885419 byt
<arma> es/sec writing
<arma> Jan 22 16:43:46.483 [notice] --------------- Dumping memory information:
<arma> Jan 22 16:43:46.483 [notice] In buffers: 8255274 used/86016000 allocated (5803 c
<arma> onns).
<arma> Jan 22 16:43:46.483 [notice] In rephist: 4579240 used by 62619 Tors.
<arma> Jan 22 16:43:46.483 [notice] In 605 live descriptors: 1485855 bytes. In 2247 ol
<arma> d descriptors: 5706345 bytes.
<weasel> 59 without circuits. 32 with circuits
<weasel> most circuits any connection has is 17. then 11, 10, 8, 4, 4, 4, 4, 3, 3, 3, 3, 2, 2, 2, and the rest has 1 or 0
<arma> moria2 has 5803 conns open.

[Automatically added by flyspray2trac: Operating System: All]

Child Tickets

Change History (5)

comment:1 Changed 13 years ago by arma

The bug here is that conn->n_circuits went negative in some cases.

The side-effect was that when checking whether a conn has no circuits attached
to it (and can be safely closed), we were asking conn->n_circuits == 0.

comment:2 Changed 13 years ago by arma

There's a related bug in It appears that we're mostly making lots of connections
to other servers. I've reopened this task.

Another hint here is that it seems we have only one connection to pre- servers,
and all of the duplicate connections have circuits open on them. It looks like we're
getting a circuit before we expire it, so we're choosing not to expire it.

comment:3 Changed 13 years ago by arma

The new bug appears to be fixed in CVS now too.

comment:4 Changed 13 years ago by arma

flyspray2trac: bug closed.

comment:5 Changed 7 years ago by nickm

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