aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: aMule crashes when there are many active downloads  (Read 5253 times)

lumi

  • Approved Newbie
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 16
aMule crashes when there are many active downloads
« on: December 01, 2014, 08:06:10 AM »

This story goes from 2.3.1 when it was true, but the crash happened from time to time and with more stress (more active downloads, like 100). With SVN version (2014-10-23) aMule does not live through the day with even less stress.

The key issue is here how many active downloads there are (active - they are actually downloading, not in idle, waiting, state). If they are about 30 (for SVN) the limit is reached and amule crashes. It is not related to download speed limits (IMHO), all downloads in total could take around 20% of the speed limit of amule, and the crash will happen as well. However I don't know what happens in the actual moment of crash, if there is no some spike of the download speed.

It could be just conincidence, but when I run amule from gdb in order to get the stack trace amule worked for several hours (without it it would be 2-3).

Here is the dump from gdb:

Code: [Select]
Program received signal SIGSEGV, Segmentation fault.
0x0000000000000061 in ?? ()
(gdb) #0  0x0000000000000061 in  ()
#1  0x00007ffff3d95e32 in  () at /usr/lib64/libglib-2.0.so.0
#2  0x00007ffff3d9603e in  () at /usr/lib64/libglib-2.0.so.0
#3  0x00007ffff3d9822b in g_main_context_prepare () at /usr/lib64/libglib-2.0.so.0
#4  0x00007ffff3d98b03 in  () at /usr/lib64/libglib-2.0.so.0
#5  0x00007ffff3d98f0a in g_main_loop_run () at /usr/lib64/libglib-2.0.so.0
#6  0x00007ffff48b7be7 in gtk_main () at /usr/lib64/libgtk-x11-2.0.so.0
#7  0x00007ffff635c6ea in wxEventLoop::Run() () at /usr/lib64/wx-2.8-wxcontainer/libwx_gtk2u_core-2.8.so.0
#8  0x00007ffff63ddaac in wxAppBase::MainLoop() () at /usr/lib64/wx-2.8-wxcontainer/libwx_gtk2u_core-2.8.so.0
#9  0x00007ffff5c53fcd in wxEntry(int&, wchar_t**) () at /usr/lib64/wx-2.8-wxcontainer/libwx_baseu-2.8.so.0
#10 0x000000000059acd7 in main(int, char**) (argc=1, argv=0x7fffffffdd28) at amule-gui.cpp:93
(gdb) #0  0x0000000000000061 in  ()
#1  0x00007ffff3d95e32 in  () at /usr/lib64/libglib-2.0.so.0
#2  0x00007ffff3d9603e in  () at /usr/lib64/libglib-2.0.so.0
#3  0x00007ffff3d9822b in g_main_context_prepare () at /usr/lib64/libglib-2.0.so.0
#4  0x00007ffff3d98b03 in  () at /usr/lib64/libglib-2.0.so.0
#5  0x00007ffff3d98f0a in g_main_loop_run () at /usr/lib64/libglib-2.0.so.0
#6  0x00007ffff48b7be7 in gtk_main () at /usr/lib64/libgtk-x11-2.0.so.0
#7  0x00007ffff635c6ea in wxEventLoop::Run() () at /usr/lib64/wx-2.8-wxcontainer/libwx_gtk2u_core-2.8.so.0
#8  0x00007ffff63ddaac in wxAppBase::MainLoop() () at /usr/lib64/wx-2.8-wxcontainer/libwx_gtk2u_core-2.8.so.0
#9  0x00007ffff5c53fcd in wxEntry(int&, wchar_t**) () at /usr/lib64/wx-2.8-wxcontainer/libwx_baseu-2.8.so.0
#10 0x000000000059acd7 in main(int, char**) (argc=1, argv=0x7fffffffdd28) at amule-gui.cpp:93
(gdb)
Thread 19 (Thread 0x7fffe5745700 (LWP 15929)):
#0  0x00007ffff4e9c3cd in poll () at /lib64/libc.so.6
#1  0x00007fffd69b1a41 in  () at /usr/lib64/libpulse.so.0
#2  0x00007fffd69a32ec in pa_mainloop_poll () at /usr/lib64/libpulse.so.0
#3  0x00007fffd69a395e in pa_mainloop_iterate () at /usr/lib64/libpulse.so.0
#4  0x00007fffd69a3a10 in pa_mainloop_run () at /usr/lib64/libpulse.so.0
#5  0x00007fffd69b19f3 in  () at /usr/lib64/libpulse.so.0
#6  0x00007fffd447b808 in  () at /usr/lib64/pulseaudio/libpulsecommon-5.0.so
#7  0x00007ffff7bc70a4 in start_thread () at /lib64/libpthread.so.0
#8  0x00007ffff4ea47fd in clone () at /lib64/libc.so.6

Thread 18 (Thread 0x7fffd67fc700 (LWP 15928)):
#0  0x00007ffff7bcb408 in pthread_cond_timedwait@@GLIBC_2.3.2 () at /lib64/libpthread.so.0
#1  0x00007ffff5ca43b6 in wxConditionInternal::WaitTimeout(unsigned long) () at /usr/lib64/wx-2.8-wxcontainer/libwx_baseu-2.8.so.0
#2  0x00007ffff5ca4f48 in wxSemaphoreInternal::WaitTimeout(unsigned long) () at /usr/lib64/wx-2.8-wxcontainer/libwx_baseu-2.8.so.0
---Type <return> to continue, or q <return> to quit---Python Exception <type 'exceptions.KeyboardInterrupt'> Quit:
#4  0x00007ffff5ca5663 in wxThreadInternal::PthreadStart(wxThread*) () at /usr/lib64/wx-2.8-wxcontainer/libwx_baseu-2.8.so.0
#5  0x00007ffff7bc70a4 in start_thread () at /lib64/libpthread.so.0
#6  0x00007ffff4ea47fd in clone () at /lib64/libc.so.6

Thread 15 (Thread 0x7fffd58ac700 (LWP 15760)):
#0  0x00007ffff4df430d in __libc_sigaction () at /lib64/libc.so.6
#1  0x00007ffff4df4116 in ssignal () at /lib64/libc.so.6
#2  0x00007ffff5f3fbba in GSocket::Send_Stream(char const*, int) () at /usr/lib64/wx-2.8-wxcontainer/libwx_baseu_net-2.8.so.0
#3  0x00007ffff5f40695 in GSocket::Write(char const*, int) () at /usr/lib64/wx-2.8-wxcontainer/libwx_baseu_net-2.8.so.0
#4  0x00007ffff5f3c2f9 in wxSocketBase::_Write(void const*, unsigned int) () at /usr/lib64/wx-2.8-wxcontainer/libwx_baseu_net-2.8.so.0
#5  0x00007ffff5f3c334 in wxSocketBase::Write(void const*, unsigned int) () at /usr/lib64/wx-2.8-wxcontainer/libwx_baseu_net-2.8.so.0
#6  0x00000000004f4441 in CLibSocket::Write(void const*, unsigned int) (this=0xe02aa60, buffer=0xc225650, nbytes=46) at ./libs/ec/cpp/../../../LibSocket.h:266
#7  0x000000000064ac0c in CSocketClientProxy::Write(void const*, unsigned int) (this=0xe02aa60, buffer=0xc225650, nbytes=46) at Proxy.cpp:1324
#8  0x00000000004e4e76 in CEncryptedStreamSocket::Write(void const*, unsigned int) (this=0xe02aa60, lpBuf=0xc225650, nBufLen=46) at EncryptedStreamSocket.cpp:210
#9  0x00000000004e3639 in CEMSocket::Send(unsigned int, unsigned int, bool) (this=0xe02aa60, maxNumberOfBytesToSend=1300, minFragSize=1300, onlyAllowedToSendControlPacket=true)
    at EMSocket.cpp:563
#10 0x00000000004aea69 in CEMSocket::SendControlData(unsigned int, unsigned int) (this=0xe02aa60, maxNumberOfBytesToSend=43, minFragSize=1300) at EMSocket.h:69
#11 0x00000000004ae610 in CClientTCPSocket::SendControlData(unsigned int, unsigned int) (this=0xe02aa60, maxNumberOfBytesToSend=43, overchargeMaxBytesToSend=1300)
    at ClientTCPSocket.cpp:2045
#12 0x00000000005597a2 in UploadBandwidthThrottler::Entry() (this=0x7d711d0) at UploadBandwidthThrottler.cpp:381
#13 0x00007ffff5ca5663 in wxThreadInternal::PthreadStart(wxThread*) () at /usr/lib64/wx-2.8-wxcontainer/libwx_baseu-2.8.so.0
#14 0x00007ffff7bc70a4 in start_thread () at /lib64/libpthread.so.0
#15 0x00007ffff4ea47fd in clone () at /lib64/libc.so.6

Thread 12 (Thread 0x7fffd77fe700 (LWP 15755)):
#0  0x00007ffff4e9c3cd in poll () at /lib64/libc.so.6
#1  0x00007ffff3d98be4 in  () at /usr/lib64/libglib-2.0.so.0
#2  0x00007ffff3d98cec in g_main_context_iteration () at /usr/lib64/libglib-2.0.so.0
#3  0x00007ffff3d98d29 in  () at /usr/lib64/libglib-2.0.so.0
#4  0x00007ffff3dbdb85 in  () at /usr/lib64/libglib-2.0.so.0
#5  0x00007ffff7bc70a4 in start_thread () at /lib64/libpthread.so.0
#6  0x00007ffff4ea47fd in clone () at /lib64/libc.so.6

Thread 11 (Thread 0x7fffd7fff700 (LWP 15754)):
#0  0x00007ffff4e9c3cd in poll () at /lib64/libc.so.6
#1  0x00007ffff3d98be4 in  () at /usr/lib64/libglib-2.0.so.0
#2  0x00007ffff3d98f0a in g_main_loop_run () at /usr/lib64/libglib-2.0.so.0
#3  0x00007ffff1f0b586 in  () at /usr/lib64/libgio-2.0.so.0
#4  0x00007ffff3dbdb85 in  () at /usr/lib64/libglib-2.0.so.0
#5  0x00007ffff7bc70a4 in start_thread () at /lib64/libpthread.so.0
#6  0x00007ffff4ea47fd in clone () at /lib64/libc.so.6

Thread 9 (Thread 0x7fffe5f46700 (LWP 15751)):
#0  0x00007ffff7bcb408 in pthread_cond_timedwait@@GLIBC_2.3.2 () at /lib64/libpthread.so.0
#1  0x00007ffff6c9775c in  () at /usr/lib64/libthreadutil.so.6
#2  0x00007ffff7bc70a4 in start_thread () at /lib64/libpthread.so.0
#3  0x00007ffff4ea47fd in clone () at /lib64/libc.so.6

Thread 8 (Thread 0x7fffe6747700 (LWP 15750)):
#0  0x00007ffff7bcb408 in pthread_cond_timedwait@@GLIBC_2.3.2 () at /lib64/libpthread.so.0
#1  0x00007ffff6c9775c in  () at /usr/lib64/libthreadutil.so.6
#2  0x00007ffff7bc70a4 in start_thread () at /lib64/libpthread.so.0
#3  0x00007ffff4ea47fd in clone () at /lib64/libc.so.6

Thread 7 (Thread 0x7fffe6f48700 (LWP 15749)):
#0  0x00007ffff4e9da63 in select () at /lib64/libc.so.6
---Type <return> to continue, or q <return> to quit---#1  0x00007ffff6ea9fe1 in  () at /usr/lib64/libupnp.so.6
#2  0x00007ffff6c97974 in  () at /usr/lib64/libthreadutil.so.6
#3  0x00007ffff7bc70a4 in start_thread () at /lib64/libpthread.so.0
#4  0x00007ffff4ea47fd in clone () at /lib64/libc.so.6

Thread 5 (Thread 0x7fffe7f4a700 (LWP 15747)):
#0  0x00007ffff7bcb408 in pthread_cond_timedwait@@GLIBC_2.3.2 () at /lib64/libpthread.so.0
#1  0x00007ffff6c9775c in  () at /usr/lib64/libthreadutil.so.6
#2  0x00007ffff7bc70a4 in start_thread () at /lib64/libpthread.so.0
#3  0x00007ffff4ea47fd in clone () at /lib64/libc.so.6

Thread 4 (Thread 0x7fffe874b700 (LWP 15746)):
#0  0x00007ffff7bcb408 in pthread_cond_timedwait@@GLIBC_2.3.2 () at /lib64/libpthread.so.0
#1  0x00007ffff6c9775c in  () at /usr/lib64/libthreadutil.so.6
#2  0x00007ffff7bc70a4 in start_thread () at /lib64/libpthread.so.0
#3  0x00007ffff4ea47fd in clone () at /lib64/libc.so.6

Thread 3 (Thread 0x7fffe8f4c700 (LWP 15745)):
#0  0x00007ffff7bcb05f in pthread_cond_wait@@GLIBC_2.3.2 () at /lib64/libpthread.so.0
#1  0x00007ffff6c98f82 in  () at /usr/lib64/libthreadutil.so.6
#2  0x00007ffff6c97974 in  () at /usr/lib64/libthreadutil.so.6
#3  0x00007ffff7bc70a4 in start_thread () at /lib64/libpthread.so.0
#4  0x00007ffff4ea47fd in clone () at /lib64/libc.so.6

Thread 1 (Thread 0x7ffff7fada00 (LWP 15736)):
#0  0x0000000000000061 in  ()
#1  0x00007ffff3d95e32 in  () at /usr/lib64/libglib-2.0.so.0
#2  0x00007ffff3d9603e in  () at /usr/lib64/libglib-2.0.so.0
#3  0x00007ffff3d9822b in g_main_context_prepare () at /usr/lib64/libglib-2.0.so.0
#4  0x00007ffff3d98b03 in  () at /usr/lib64/libglib-2.0.so.0
#5  0x00007ffff3d98f0a in g_main_loop_run () at /usr/lib64/libglib-2.0.so.0
#6  0x00007ffff48b7be7 in gtk_main () at /usr/lib64/libgtk-x11-2.0.so.0
#7  0x00007ffff635c6ea in wxEventLoop::Run() () at /usr/lib64/wx-2.8-wxcontainer/libwx_gtk2u_core-2.8.so.0
#8  0x00007ffff63ddaac in wxAppBase::MainLoop() () at /usr/lib64/wx-2.8-wxcontainer/libwx_gtk2u_core-2.8.so.0
#9  0x00007ffff5c53fcd in wxEntry(int&, wchar_t**) () at /usr/lib64/wx-2.8-wxcontainer/libwx_baseu-2.8.so.0
#10 0x000000000059acd7 in main(int, char**) (argc=1, argv=0x7fffffffdd28) at amule-gui.cpp:93

Please let me know if you need some other information.
Logged

GonoszTopi

  • The current man in charge of most things.
  • Administrator
  • Hero Member
  • *****
  • Karma: 169
  • Offline Offline
  • Posts: 2685
Re: aMule crashes when there are many active downloads
« Reply #1 on: December 01, 2014, 10:40:32 PM »

Hmm... Could you try and test aMule with Boost ASIO networking? For that you'll need to have Boost >= 1.47 installed and configure aMule with --with-boost (or if you don't want to install Boost, use --with-boost=/path/to/boost/sources).
Logged
concordia cum veritate

lumi

  • Approved Newbie
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 16
Re: aMule crashes when there are many active downloads
« Reply #2 on: December 03, 2014, 08:07:14 AM »

Thank you for the reply and hints how to rebuild aMule. I hope it is not just pure good luck, but I rebuilt aMule with boost and it works just fine for several hours now without single crash. So it seems boost did a trick.
Logged

GonoszTopi

  • The current man in charge of most things.
  • Administrator
  • Hero Member
  • *****
  • Karma: 169
  • Offline Offline
  • Posts: 2685
Re: aMule crashes when there are many active downloads
« Reply #3 on: December 03, 2014, 08:36:44 AM »

Looking at your backtrace it seems that the crash was related to wxWidgets networking code. That's why I suggested Boost.Asio. It's good to hear that it seems to work.

Another thing that might worth a try, compiling aMule with the latest stable version of wxWidgets, 3.0.2. However, please note that wx-3 support in aMule is currently in the "experimental" state...
Logged
concordia cum veritate