aMule Bug Tracker - aMule
View Issue Details
0000251aMuleMiscpublic2005-01-07 12:432005-02-07 05:18
blue_eclipse 
Kry 
normalmajoralways
resolvedfixed 
2.0.0-rc8 
SVN 
0000251: Possible non-closing of connections, Router stall

First of all, sorry for my English, I'll try to explain the best I can.
Running aMule with 200 max connections and 5 max connections every 5 seconds causes my router to stall every 12h
(more or less). One may think it's a matter of my router that just
can't handle all the connections. The thing is that it is a D-Link 504T, which is a Linux based router. I investigated further and I
discovered that accessing this router from telnet and doing a:

echo 2048 > /proc/sys/net/ipv4/ip_conntrack_max (1024 by default)

this doubles the time it tooks the router to crash (24h, 1 day more or less). So I just double the NAT table size and... (!) what suspicious (!) It's ok, after 24h the router crashes. I manage to
"unstall" it in two differents ways: a) closing amule b) increasing
the ip_conntrack_max to 2500, waha?!?

MLDonkey works just fine with this values (all the time). I believe
aMule could be flooding my router by non closing connections that acumulate and eventually become too much.

Regards.
No tags attached.
Issue History
2005-01-07 12:43blue_eclipseNew Issue
2005-01-19 18:22KryNote Added: 0000525
2005-01-19 18:26KryStatusnew => assigned
2005-01-19 18:26KryAssigned To => Kry
2005-01-19 18:59blue_eclipseNote Added: 0000530
2005-01-19 19:12blue_eclipseNote Added: 0000531
2005-02-01 22:38KryNote Added: 0000592
2005-02-07 05:18KryStatusassigned => resolved
2005-02-07 05:18KryFixed in Version => CVS
2005-02-07 05:18KryResolutionopen => fixed
2005-02-07 05:18KryNote Added: 0000609

Notes
(0000525)
Kry   
2005-01-19 18:22   
Might be related to a but I introduced on rc8. Can you try current CVS version?
(0000530)
blue_eclipse   
2005-01-19 18:59   
Sure! I'll try to test CVS if I get some time.
(0000531)
blue_eclipse   
2005-01-19 19:12   
By the way (on my D-link ADSL Linux router):

cat ip_conntrack | grep "tcp" -c
1950 <= O_o wow!

cat ip_conntrack | grep "CLOSE_WAIT" -c
1467 <= O_O wowow!

I managed to stabilize my router by setting aggressive close_wait
timeouts:

echo 120 > /proc/sys/net/ipv4/netfilter/ip_conntrack_tcp_timeout_close_wait

3 days running flawlessly. Is it expectable that aMule creates such massive
amount of close_wait state connections?

Regards
(0000592)
Kry   
2005-02-01 22:38   
No, it is not. Must be a bug I also have.
(0000609)
Kry   
2005-02-07 05:18   
AFICS, when Xaignar disabled the retries code, this got fixed :)