aMule Bug Tracker - aMule
View Issue Details
0000326aMuleFeature Requestpublic2005-03-13 02:092005-04-21 16:38
resolvednot fixable 
0000326: amule leaves sockets unclosed
I have a lot of sockets with state "CLOSING" from port 4662. That is really a lot of sockets: after a day from amule's starts there are 600 sockets in that state. There were messages in syslog 'kernel: Out of socket memory' for TEN minutes a couple of days ago and after that even mouse stopped responding in my X and I needed to press 'reset'. All that sockets come from amule (they are on 4662 port), and as I said after a day I have already 0000276:0000600 of them again.
No tags attached.
gz config.log.gz (14,777) 2005-03-26 07:03
gz nohup.out.gz (3,156) 2005-03-26 07:04
Issue History
2005-03-13 02:09dkaNew Issue
2005-03-15 13:15XaignarNote Added: 0000745
2005-03-15 13:16XaignarNote Added: 0000746
2005-03-15 13:22dkaNote Added: 0000747
2005-03-15 17:00XaignarNote Added: 0000748
2005-03-16 10:43dkaNote Added: 0000749
2005-03-16 14:28XaignarNote Added: 0000750
2005-03-16 22:13dkaNote Added: 0000751
2005-03-18 14:34KryNote Added: 0000756
2005-03-18 23:16dkaNote Added: 0000757
2005-03-19 00:26XaignarNote Added: 0000758
2005-03-19 13:09dkaNote Added: 0000759
2005-03-22 17:26stefaneroNote Added: 0000774
2005-03-22 17:26stefaneroNote Deleted: 0000774
2005-03-23 19:13KryNote Added: 0000785
2005-03-26 07:03dkaFile Added: config.log.gz
2005-03-26 07:04dkaFile Added: nohup.out.gz
2005-03-26 07:06dkaNote Added: 0000791
2005-04-07 13:52dkaNote Added: 0000826
2005-04-10 21:02sLiCeRNote Added: 0000847
2005-04-10 21:06KryNote Deleted: 0000847
2005-04-10 21:07KryNote Added: 0000848
2005-04-11 02:56dkaNote Added: 0000852
2005-04-21 16:38XaignarStatusnew => resolved
2005-04-21 16:38XaignarResolutionopen => not fixable
2005-04-21 16:38XaignarAssigned To => Xaignar
2005-04-21 16:38XaignarNote Added: 0000877

2005-03-15 13:15   
Please report version of aMule used. ;)
2005-03-15 13:16   
Ah, Sorry, missed the "product version" field.
I'd recommend that you grab yourself a CVS snapshot, as there have been many fixed between rc7 and rc8, and many fixes between rc8 and now. Please let us know if that resolves the problem. :)
2005-03-15 13:22   
aMule 2.0.0rc7 using wxGTK1 v2.5.2
2005-03-15 17:00   
Yes, as mentioned above, rc7 is rather old, so you'd probably be better off if you compile yourself a CVS snapshot: [^]
2005-03-16 10:43   
I moved to rc8 today, and this brought me another problem. Firstly, the problem with sockets remained: after 8 hours I have already 290 of them. Sencondly, amule crashed, backtrace follows

[0] CamuleApp::OnFatalException() in amule.cpp:979
[1] wxFatalSignalHandler in /usr/local/lib/[0x405f5b58]
[2] ?? in /lib/ [0x4002d825]
[3] ?? in /lib/ [0x40b5d678]
[4] CClientReqSocket::PacketReceived(Packet*) in ListenSocket.cpp:2070
[5] CEMSocket::OnReceive(int) in EMSocket.cpp:262
[6] CEMSocket::DisableDownloadLimit() in EMSocket.cpp:293
[7] CUpDownClient::DisableDownloadLimit() in BaseClient.cpp:2101
[8] CPartFile::Process(unsigned, unsigned char) in PartFile.cpp:1611
[9] CDownloadQueue::Process() in DownloadQueue.cpp:378
[10] CamuleApp::OnCoreTimer(wxTimerEvent&) in amule.cpp:1380
[11] wxAppConsole::HandleEvent(wxEvtHandler*, void (wxEvtHandler::*)(wxEvent&), wxEvent&) const in /usr/local/
[12] wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) in /usr/local/
[13] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) in /usr/local/lib/[0x405ef7ef]
[14] wxEvtHandler::ProcessEvent(wxEvent&) in /usr/local/lib/[0x405f0510]
[15] wxTimerBase::Notify() in /usr/local/lib/[0x403b6f2a]
[16] timeout_callback in /usr/local/lib/[0x402b469d]
[17] ?? in /usr/lib/ [0x40960ec4]
[18] ?? in /usr/lib/ [0x4096003d]
[19] ?? in /usr/lib/ [0x409604f4]
[20] g_main_run in /usr/lib/[0x40960724]
[21] gtk_main in /usr/lib/[0x4086c25f]
[22] wxEventLoop::Run() in /usr/local/lib/[0x402a9608]
[23] wxAppBase::MainLoop() in /usr/local/lib/[0x40333d93]
[24] wxAppBase::OnRun() in /usr/local/lib/[0x40333efa]
[25] wxEntry(int&, char**) in /usr/local/lib/[0x40599ea3]
[26] main in amule-gui.cpp:161
[27] __libc_start_main in /lib/[0x40b49dc6]
[28] wxGenericTreeCtrl::OnCompareItems(wxTreeItemId const&, wxTreeItemId const&) in start.S:105
2005-03-16 14:28   
Both of those AFAIK are known and fixed bugs, which is why I told you to use a CVS snapshot. ;)
2005-03-16 22:13   
now, i have aMule-CVS-20050316.tar.bz2, and i still HAVE sockets problem above. No crashes so far.
2005-03-18 14:34   
Do you still have it with wx 2.5.4?
2005-03-18 23:16   
aMule CVS using wxGTK1 v2.5.2 (Snapshot: Wed Mar 16 07:01:26 CET 2005) (OS: Linux)
2005-03-19 00:26   
That wasn't the question. ;)
Try recompiling aMule with wxWidgets version 2.5.4 and report back if it helps or not.

2005-03-19 13:09   
Now, I have "aMule CVS using wxGTK1 v2.5.4 (Snapshot: Wed Mar 16 07:01:26 CET 2005) (OS: Linux)" and 330 "dead" sockets already.
2005-03-23 19:13   
I fixed an iussue on daemon, but plain amule is still working properly here. No sockets are left on "CLOSING" here.
2005-03-26 07:06   
Guys, may be this bug is fixed for long time already, but I have it yet, sorry :-). I uploaded config.log together with output of ./configure. May be I configure something wrong? Anyway I have a lot of dead sockets regardless of amule or amuled. Still hope you can help me.

aMule CVS using wxGTK1 v2.5.4 (Snapshot: Tue Mar 22 07:01:22 CET 2005) (OS: Linux)
2005-04-07 13:52   
I think now I know why these sockets appear. I have a shaping discipline

tc qdisc add dev ppp0 parent 1:2 tbf latency 50ms burst 1450 rate 50kbit

and that is the reason why I have the problem discribed above. When I turn this discipline off the problem disappears. What can you say now, guys? Is it normal behaviour of amule to conflict with QoS?
2005-04-10 21:07   
I am sorry if you ever got to see sLiCeR's post.

We're still discussing the sockets not closed with this discipline and if it's really aMule's fault.
2005-04-11 02:56   
Hi, the problem was caused by `burst 1450', as I was suggested in LARTC mailing list because discipline dropped all packets with size >1449. Now I changed my shaping discipline into

tc qdisc add dev ppp0 parent 1:2 tbf latency 50ms burst 1510 rate 50k
and it works. Guys, I am quite happy now, it was so annoying to reboot PC every 5 days. I chose value 1510 because I have MTU on eth0 =1500. Thanks for your time.
2005-04-21 16:38   
Thanks for letting us know what the source of the problem was. I'm marking this bug as "resolved/not fixable" as this is an issue outside of aMule, which I don't believe we can resolve through changes to aMule. If anyone disagrees, feel free to re-open it.