aMule Forum
English => Backtraces => Topic started by: Supersnail on January 26, 2010, 11:00:20 PM
-
As of today amule started crashing irregularly while it always worked fine. I installed it again with debug enabled and here are the backtraces. To reproduce the crash all I have to do is wait and it will crash somewhere in between 5 mins and an hour.
(gdb) bt
#0 0x08085f8f in CUpDownClient::ClearDownloadBlockRequests (this=0xd96dac8) at BaseClient.cpp:1174
#1 0x080df6d4 in CUpDownClient::SetDownloadState (this=0xd96dac8, byNewState=1 '\001') at DownloadClient.cpp:542
#2 0x08086586 in CUpDownClient::Disconnected (this=0xd96dac8, strReason=@0xbf88ec68, bFromSocket=false) at BaseClient.cpp:1238
#3 0x080993dc in CClientList::ProcessDirectCallbackList (this=0xa97fd08) at ClientList.cpp:1114
#4 0x0809d144 in CClientList::Process (this=0xa97fd08) at ClientList.cpp:748
#5 0x08075a1c in CamuleApp::OnCoreTimer (this=0xa818d28) at amule.cpp:1461
#6 0xb7957913 in wxAppConsole::HandleEvent ()
---Type <return> to continue, or q <return> to quit---
from /usr/local/lib/libwx_baseu-2.8.so.0
#7 0xb79f8555 in wxEvtHandler::ProcessEventIfMatches ()
from /usr/local/lib/libwx_baseu-2.8.so.0
#8 0xb79f869e in wxEventHashTable::HandleEvent ()
from /usr/local/lib/libwx_baseu-2.8.so.0
#9 0xb79f87ff in wxEvtHandler::ProcessEvent ()
from /usr/local/lib/libwx_baseu-2.8.so.0
#10 0xb79f8cef in wxEvtHandler::ProcessPendingEvents ()
from /usr/local/lib/libwx_baseu-2.8.so.0
#11 0xb79581c5 in wxAppConsole::ProcessPendingEvents ()
from /usr/local/lib/libwx_baseu-2.8.so.0
#12 0xb7c37b39 in wxAppBase::ProcessIdle ()
from /usr/local/lib/libwx_gtk2u_core-2.8.so.0
#13 0xb7b93a08 in ?? ()
from /usr/local/lib/libwx_gtk2u_core-2.8.so.0
---Type <return> to continue, or q <return> to quit---
#14 0xb714c551 in ?? () from /usr/lib/libglib-2.0.so.0
#15 0x00000000 in ?? ()
(gdb) bt full
#0 0x08085f8f in CUpDownClient::ClearDownloadBlockRequests (
this=0xd96dac8) at BaseClient.cpp:1174
cur_block = (Requested_Block_Struct *) 0xbf88eb28
it = {<__gnu_debug::_Safe_iterator_base> = {
_M_sequence = 0xd96dc78, _M_version = 0, _M_prior = 0x0,
_M_next = 0x0}, _M_current = {_M_node = 0x0}}
#1 0x080df6d4 in CUpDownClient::SetDownloadState (
this=0xd96dac8, byNewState=1 '\001')
at DownloadClient.cpp:542
No locals.
#2 0x08086586 in CUpDownClient::Disconnected (this=0xd96dac8,
strReason=@0xbf88ec68, bFromSocket=false)
at BaseClient.cpp:1238
bDelete = 13
#3 0x080993dc in CClientList::ProcessDirectCallbackList (
---Type <return> to continue, or q <return> to quit---
this=0xa97fd08) at ClientList.cpp:1114
it2 = {<__gnu_debug::_Safe_iterator_base> = {
_M_sequence = 0xa97fe70, _M_version = 0, _M_prior = 0x0,
_M_next = 0xbf88ec18}, _M_current = {_M_node = 0xb3732d0}}
curClient = (CUpDownClient *) 0xd96dac8
it = {<__gnu_debug::_Safe_iterator_base> = {
_M_sequence = 0xa97fe70, _M_version = 1,
_M_prior = 0xbf88ec04, _M_next = 0x0}, _M_current = {
_M_node = 0xa97fe68}}
cur_tick = 1822306756
#4 0x0809d144 in CClientList::Process (this=0xa97fd08)
at ClientList.cpp:748
cur_tick = 1822306756
buddy = Disconnected
current_it = {<__gnu_debug::_Safe_iterator_base> = {
---Type <return> to continue, or q <return> to quit---
_M_sequence = 0xa97fe40, _M_version = 1, _M_prior = 0x0,
_M_next = 0x0}, _M_current = {_M_node = 0xa97fe2c}}
#5 0x08075a1c in CamuleApp::OnCoreTimer (this=0xa818d28)
at amule.cpp:1461
msCur = 844559
msPrev1 = 844559
msPrev5 = 842179
msPrevSave = 840779
msPrevHist = 844000
msPrevOS = 842179
msPrevKnownMet = 0
#6 0xb7957913 in wxAppConsole::HandleEvent ()
from /usr/local/lib/libwx_baseu-2.8.so.0
No symbol table info available.
#7 0xb79f8555 in wxEvtHandler::ProcessEventIfMatches ()
---Type <return> to continue, or q <return> to quit---
from /usr/local/lib/libwx_baseu-2.8.so.0
No symbol table info available.
#8 0xb79f869e in wxEventHashTable::HandleEvent ()
from /usr/local/lib/libwx_baseu-2.8.so.0
No symbol table info available.
#9 0xb79f87ff in wxEvtHandler::ProcessEvent ()
from /usr/local/lib/libwx_baseu-2.8.so.0
No symbol table info available.
#10 0xb79f8cef in wxEvtHandler::ProcessPendingEvents ()
from /usr/local/lib/libwx_baseu-2.8.so.0
No symbol table info available.
#11 0xb79581c5 in wxAppConsole::ProcessPendingEvents ()
from /usr/local/lib/libwx_baseu-2.8.so.0
No symbol table info available.
#12 0xb7c37b39 in wxAppBase::ProcessIdle ()
---Type <return> to continue, or q <return> to quit---
from /usr/local/lib/libwx_gtk2u_core-2.8.so.0
No symbol table info available.
#13 0xb7b93a08 in ?? ()
from /usr/local/lib/libwx_gtk2u_core-2.8.so.0
No symbol table info available.
#14 0xb714c551 in ?? () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#15 0x00000000 in ?? ()
No symbol table info available.
(gdb) thread apply all bt
Thread 4 (Thread -1254642800 (LWP 14464)):
#0 0xb7f4c622 in pthread_cond_timedwait@@GLIBC_2.3.2 ()
from /lib/libpthread.so.0
#1 0xb79f5e40 in wxConditionInternal::WaitTimeout ()
from /usr/local/lib/libwx_baseu-2.8.so.0
#2 0xb79f5e91 in wxCondition::WaitTimeout ()
from /usr/local/lib/libwx_baseu-2.8.so.0
#3 0xb79f69cc in wxSemaphoreInternal::WaitTimeout ()
from /usr/local/lib/libwx_baseu-2.8.so.0
#4 0xb79f6a53 in wxSemaphore::WaitTimeout ()
from /usr/local/lib/libwx_baseu-2.8.so.0
#5 0x0835f1a3 in CTimerThread::Entry (this=0xbf0d958)
at Timer.cpp:64
#6 0xb79f6fc3 in wxThreadInternal::PthreadStart ()
---Type <return> to continue, or q <return> to quit---
from /usr/local/lib/libwx_baseu-2.8.so.0
#7 0xb79f702f in wxPthreadStart ()
from /usr/local/lib/libwx_baseu-2.8.so.0
#8 0xb7f481b3 in start_thread () from /lib/libpthread.so.0
#9 0xb775a03e in clone () from /lib/libc.so.6
Thread 2 (Thread -1237865584 (LWP 14462)):
#0 0xb7f4f40c in ?? () from /lib/libpthread.so.0
#1 0xb79fc7e5 in wxMicroSleep ()
from /usr/local/lib/libwx_baseu-2.8.so.0
#2 0xb79fc81a in wxMilliSleep ()
from /usr/local/lib/libwx_baseu-2.8.so.0
#3 0xb79f56b5 in wxThread::Sleep ()
from /usr/local/lib/libwx_baseu-2.8.so.0
#4 0x081c75b5 in UploadBandwidthThrottler::Entry (
---Type <return> to continue, or q <return> to quit---
this=0xd72fe58) at UploadBandwidthThrottler.cpp:324
#5 0xb79f6fc3 in wxThreadInternal::PthreadStart ()
from /usr/local/lib/libwx_baseu-2.8.so.0
#6 0xb79f702f in wxPthreadStart ()
from /usr/local/lib/libwx_baseu-2.8.so.0
#7 0xb7f481b3 in start_thread () from /lib/libpthread.so.0
#8 0xb775a03e in clone () from /lib/libc.so.6
Thread 1 (Thread -1227655472 (LWP 14453)):
#0 0x08085f8f in CUpDownClient::ClearDownloadBlockRequests (
this=0xd96dac8) at BaseClient.cpp:1174
#1 0x080df6d4 in CUpDownClient::SetDownloadState (
this=0xd96dac8, byNewState=1 '\001')
at DownloadClient.cpp:542
#2 0x08086586 in CUpDownClient::Disconnected (this=0xd96dac8,
---Type <return> to continue, or q <return> to quit---
strReason=@0xbf88ec68, bFromSocket=false)
at BaseClient.cpp:1238
#3 0x080993dc in CClientList::ProcessDirectCallbackList (
this=0xa97fd08) at ClientList.cpp:1114
#4 0x0809d144 in CClientList::Process (this=0xa97fd08)
at ClientList.cpp:748
#5 0x08075a1c in CamuleApp::OnCoreTimer (this=0xa818d28)
at amule.cpp:1461
#6 0xb7957913 in wxAppConsole::HandleEvent ()
from /usr/local/lib/libwx_baseu-2.8.so.0
#7 0xb79f8555 in wxEvtHandler::ProcessEventIfMatches ()
from /usr/local/lib/libwx_baseu-2.8.so.0
#8 0xb79f869e in wxEventHashTable::HandleEvent ()
from /usr/local/lib/libwx_baseu-2.8.so.0
#9 0xb79f87ff in wxEvtHandler::ProcessEvent ()
---Type <return> to continue, or q <return> to quit---
from /usr/local/lib/libwx_baseu-2.8.so.0
#10 0xb79f8cef in wxEvtHandler::ProcessPendingEvents ()
from /usr/local/lib/libwx_baseu-2.8.so.0
#11 0xb79581c5 in wxAppConsole::ProcessPendingEvents ()
from /usr/local/lib/libwx_baseu-2.8.so.0
#12 0xb7c37b39 in wxAppBase::ProcessIdle ()
from /usr/local/lib/libwx_gtk2u_core-2.8.so.0
#13 0xb7b93a08 in ?? ()
from /usr/local/lib/libwx_gtk2u_core-2.8.so.0
#14 0xb714c551 in ?? () from /usr/lib/libglib-2.0.so.0
#15 0x00000000 in ?? ()
-
ClearDownloadBlockRequestsTM (crashing aMule since 2004). Haven't seen the sucker for a while, and haven't missed it.
IIRC it's a corrupted list. BT shows when the app crashes, but not when the list was corrupted of course. So we are stumped. :(
-
Thank you for the answer. The list you're mentioning is the download list?
In other words will the problem be solved if I remove all downloads?
[edit]I just noticed that the first message in gdb is pretty weird
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1227589936 (LWP 15641)]
0x08085f8f in CUpDownClient::ClearDownloadBlockRequests (this=0xd6bc7a8) at BaseClient.cpp:1174
1174 BaseClient.cpp: No such file or directory.
in BaseClient.cpp
why "No such file or directory"?[/edit]
-
It is looking for the source code files to display the source code section, where the error occurred. Since you probably aren't running aMule out of the source directory, it can't find the file.
Since it only affects the output of gdb and one can still look at the affected file outside of gdb, it's no problem.
-
Ok, thank you. So that has nothing to do with this.
Is there anything I can do? Other than restarting amule when it crashes?
-
In other words will the problem be solved if I remove all downloads?
No. That's a different list.
Well, aMule is not crashing for all people all of the time. It's well possible that the problem is somehow related to the files you are downloading (or rather to the clients that are uploading it to you). So if you'd cancel all your downloads and start downloading something completely different it might well go away. Or not. Hard to tell without insight to the reason.
You can reproduce it well? How many downloads do you have? Can you maybe track it down to a single one of them? Stopping the others should do the trick (no need to cancel). If you can do that pm me the link, maybe I can reproduce it then.
We actually nailed hopeless seeming problems in the past. The last one took almost a year though. :-\
Otherwise I could start sending you weird patches that try things to get closer to the problem.
Edit: I'd like to base them on the SVN version however. Um - have you tried if the SVN version also crashes?
-
We actually nailed hopeless seeming problems in the past. The last one took almost a year though.
;D Yes, and that made me one of those people >>>
aMule is not crashing for all people all of the time.
Actually, aMule hasnt crashed even once since your final patch,
even though its working like aHorse 24/7.....
-
Yes, I can reproduce the crash. All I have to do is wait.
I'll download and install the svn version to see if that one crashes as well.
-
I have now installed aMule-SVN-9971 and it crashes as well, but with a different backtrace:
(gdb) bt
#0 0x08307494 in CPartFile::ClientStateChanged (this=0x6f, oldState=0, newState=1) at PartFile.cpp:3476
#1 0x080ef2fb in CUpDownClient::SetDownloadState (this=0xae46f70, byNewState=1 '\001') at DownloadClient.cpp:526
#2 0x08086e9a in CUpDownClient::Disconnected (this=0xae46f70, strReason=@0xbfeebf18, bFromSocket=false)
at BaseClient.cpp:1261
#3 0x0809f0e8 in CClientList::ProcessDirectCallbackList (this=0xa59ca20) at ClientList.cpp:1118
#4 0x080a2556 in CClientList::Process (this=0xa59ca20) at ClientList.cpp:752
#5 0x08078ef2 in CamuleApp::OnCoreTimer (this=0xa4335f0) at amule.cpp:1186
#6 0xb79b4913 in wxAppConsole::HandleEvent () from /usr/local/lib/libwx_baseu-2.8.so.0
#7 0xb7a55555 in wxEvtHandler::ProcessEventIfMatches () from /usr/local/lib/libwx_baseu-2.8.so.0
#8 0xb7a5569e in wxEventHashTable::HandleEvent () from /usr/local/lib/libwx_baseu-2.8.so.0
#9 0xb7a557ff in wxEvtHandler::ProcessEvent () from /usr/local/lib/libwx_baseu-2.8.so.0
#10 0xb7a55cef in wxEvtHandler::ProcessPendingEvents () from /usr/local/lib/libwx_baseu-2.8.so.0
#11 0xb79b51c5 in wxAppConsole::ProcessPendingEvents () from /usr/local/lib/libwx_baseu-2.8.so.0
#12 0xb7c94b39 in wxAppBase::ProcessIdle () from /usr/local/lib/libwx_gtk2u_core-2.8.so.0
#13 0xb7bf0a08 in ?? () from /usr/local/lib/libwx_gtk2u_core-2.8.so.0
#14 0xb71a9551 in ?? () from /usr/lib/libglib-2.0.so.0
#15 0x00000000 in ?? ()
(gdb) bt full
#0 0x08307494 in CPartFile::ClientStateChanged (this=0x6f, oldState=0, newState=1) at PartFile.cpp:3476
No locals.
#1 0x080ef2fb in CUpDownClient::SetDownloadState (this=0xae46f70, byNewState=1 '\001') at DownloadClient.cpp:526
No locals.
#2 0x08086e9a in CUpDownClient::Disconnected (this=0xae46f70, strReason=@0xbfeebf18, bFromSocket=false)
at BaseClient.cpp:1261
bDelete = 10
#3 0x0809f0e8 in CClientList::ProcessDirectCallbackList (this=0xa59ca20) at ClientList.cpp:1118
it2 = {<__gnu_debug::_Safe_iterator_base> = {_M_sequence = 0xa59cb88, _M_version = 0, _M_prior = 0x0,
_M_next = 0xbfeebec8}, _M_current = {_M_node = 0xad848c0}}
curClient = (CUpDownClient *) 0xae46f70
it = {<__gnu_debug::_Safe_iterator_base> = {_M_sequence = 0xa59cb88, _M_version = 1, _M_prior = 0xbfeebeb4,
_M_next = 0x0}, _M_current = {_M_node = 0xa59cb80}}
cur_tick = 1911949469
#4 0x080a2556 in CClientList::Process (this=0xa59ca20) at ClientList.cpp:752
cur_tick = 1911949469
buddy = Disconnected
current_it = {<__gnu_debug::_Safe_iterator_base> = {_M_sequence = 0xa59cb58, _M_version = 1, _M_prior = 0x0,
_M_next = 0x0}, _M_current = {_M_node = 0xa59cb44}}
#5 0x08078ef2 in CamuleApp::OnCoreTimer (this=0xa4335f0) at amule.cpp:1186
msCur = 1191501
msPrev1 = 1191501
msPrev5 = 1189401
msPrevSave = 1141193
msPrevHist = 1191000
msPrevOS = 1187798
msPrevKnownMet = 0
recurse = true
#6 0xb79b4913 in wxAppConsole::HandleEvent () from /usr/local/lib/libwx_baseu-2.8.so.0
No symbol table info available.
#7 0xb7a55555 in wxEvtHandler::ProcessEventIfMatches () from /usr/local/lib/libwx_baseu-2.8.so.0
No symbol table info available.
#8 0xb7a5569e in wxEventHashTable::HandleEvent () from /usr/local/lib/libwx_baseu-2.8.so.0
No symbol table info available.
#9 0xb7a557ff in wxEvtHandler::ProcessEvent () from /usr/local/lib/libwx_baseu-2.8.so.0
---Type <return> to continue, or q <return> to quit---
No symbol table info available.
#10 0xb7a55cef in wxEvtHandler::ProcessPendingEvents () from /usr/local/lib/libwx_baseu-2.8.so.0
No symbol table info available.
#11 0xb79b51c5 in wxAppConsole::ProcessPendingEvents () from /usr/local/lib/libwx_baseu-2.8.so.0
No symbol table info available.
#12 0xb7c94b39 in wxAppBase::ProcessIdle () from /usr/local/lib/libwx_gtk2u_core-2.8.so.0
No symbol table info available.
#13 0xb7bf0a08 in ?? () from /usr/local/lib/libwx_gtk2u_core-2.8.so.0
No symbol table info available.
#14 0xb71a9551 in ?? () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#15 0x00000000 in ?? ()
No symbol table info available.
(gdb) thread apply all bt
Thread 4 (Thread -1263998064 (LWP 22527)):
#0 0xb7fa9622 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1 0xb7a52e40 in wxConditionInternal::WaitTimeout () from /usr/local/lib/libwx_baseu-2.8.so.0
#2 0xb7a52e91 in wxCondition::WaitTimeout () from /usr/local/lib/libwx_baseu-2.8.so.0
#3 0xb7a539cc in wxSemaphoreInternal::WaitTimeout () from /usr/local/lib/libwx_baseu-2.8.so.0
#4 0xb7a53a53 in wxSemaphore::WaitTimeout () from /usr/local/lib/libwx_baseu-2.8.so.0
#5 0x083928d2 in CTimerThread::Entry (this=0xa971498) at Timer.cpp:66
#6 0xb7a53fc3 in wxThreadInternal::PthreadStart () from /usr/local/lib/libwx_baseu-2.8.so.0
#7 0xb7a5402f in wxPthreadStart () from /usr/local/lib/libwx_baseu-2.8.so.0
#8 0xb7fa51b3 in start_thread () from /lib/libpthread.so.0
#9 0xb77b703e in clone () from /lib/libc.so.6
Thread 2 (Thread -1237484656 (LWP 22525)):
#0 0xb7fac40c in ?? () from /lib/libpthread.so.0
#1 0xb7a597e5 in wxMicroSleep () from /usr/local/lib/libwx_baseu-2.8.so.0
#2 0xb7a5981a in wxMilliSleep () from /usr/local/lib/libwx_baseu-2.8.so.0
#3 0xb7a526b5 in wxThread::Sleep () from /usr/local/lib/libwx_baseu-2.8.so.0
#4 0x081de5d4 in UploadBandwidthThrottler::Entry (this=0xa7f54e8) at UploadBandwidthThrottler.cpp:323
#5 0xb7a53fc3 in wxThreadInternal::PthreadStart () from /usr/local/lib/libwx_baseu-2.8.so.0
#6 0xb7a5402f in wxPthreadStart () from /usr/local/lib/libwx_baseu-2.8.so.0
#7 0xb7fa51b3 in start_thread () from /lib/libpthread.so.0
#8 0xb77b703e in clone () from /lib/libc.so.6
Thread 1 (Thread -1227274544 (LWP 22520)):
#0 0x08307494 in CPartFile::ClientStateChanged (this=0x6f, oldState=0, newState=1) at PartFile.cpp:3476
#1 0x080ef2fb in CUpDownClient::SetDownloadState (this=0xae46f70, byNewState=1 '\001') at DownloadClient.cpp:526
#2 0x08086e9a in CUpDownClient::Disconnected (this=0xae46f70, strReason=@0xbfeebf18, bFromSocket=false)
at BaseClient.cpp:1261
#3 0x0809f0e8 in CClientList::ProcessDirectCallbackList (this=0xa59ca20) at ClientList.cpp:1118
#4 0x080a2556 in CClientList::Process (this=0xa59ca20) at ClientList.cpp:752
#5 0x08078ef2 in CamuleApp::OnCoreTimer (this=0xa4335f0) at amule.cpp:1186
#6 0xb79b4913 in wxAppConsole::HandleEvent () from /usr/local/lib/libwx_baseu-2.8.so.0
#7 0xb7a55555 in wxEvtHandler::ProcessEventIfMatches () from /usr/local/lib/libwx_baseu-2.8.so.0
#8 0xb7a5569e in wxEventHashTable::HandleEvent () from /usr/local/lib/libwx_baseu-2.8.so.0
---Type <return> to continue, or q <return> to quit---
#9 0xb7a557ff in wxEvtHandler::ProcessEvent () from /usr/local/lib/libwx_baseu-2.8.so.0
#10 0xb7a55cef in wxEvtHandler::ProcessPendingEvents () from /usr/local/lib/libwx_baseu-2.8.so.0
#11 0xb79b51c5 in wxAppConsole::ProcessPendingEvents () from /usr/local/lib/libwx_baseu-2.8.so.0
#12 0xb7c94b39 in wxAppBase::ProcessIdle () from /usr/local/lib/libwx_gtk2u_core-2.8.so.0
#13 0xb7bf0a08 in ?? () from /usr/local/lib/libwx_gtk2u_core-2.8.so.0
#14 0xb71a9551 in ?? () from /usr/lib/libglib-2.0.so.0
#15 0x00000000 in ?? ()
[edit]After restarting amule it crashed again in a few minutes with a similar backtrace as amule 2.2.6
(gdb) bt
#0 0x0808683b in CUpDownClient::ClearDownloadBlockRequests (this=0xab0dbe0) at BaseClient.cpp:1196
#1 0x080ef394 in CUpDownClient::SetDownloadState (this=0xab0dbe0, byNewState=1 '\001') at DownloadClient.cpp:543
#2 0x08086e9a in CUpDownClient::Disconnected (this=0xab0dbe0, strReason=@0xbfa4c6b8, bFromSocket=false)
at BaseClient.cpp:1261
#3 0x0809f0e8 in CClientList::ProcessDirectCallbackList (this=0xa604a20) at ClientList.cpp:1118
#4 0x080a2556 in CClientList::Process (this=0xa604a20) at ClientList.cpp:752
#5 0x08078ef2 in CamuleApp::OnCoreTimer (this=0xa49b5f0) at amule.cpp:1186
#6 0xb7915913 in wxAppConsole::HandleEvent () from /usr/local/lib/libwx_baseu-2.8.so.0
#7 0xb79b6555 in wxEvtHandler::ProcessEventIfMatches () from /usr/local/lib/libwx_baseu-2.8.so.0
#8 0xb79b669e in wxEventHashTable::HandleEvent () from /usr/local/lib/libwx_baseu-2.8.so.0
#9 0xb79b67ff in wxEvtHandler::ProcessEvent () from /usr/local/lib/libwx_baseu-2.8.so.0
#10 0xb79b6cef in wxEvtHandler::ProcessPendingEvents () from /usr/local/lib/libwx_baseu-2.8.so.0
#11 0xb79161c5 in wxAppConsole::ProcessPendingEvents () from /usr/local/lib/libwx_baseu-2.8.so.0
#12 0xb7bf5b39 in wxAppBase::ProcessIdle () from /usr/local/lib/libwx_gtk2u_core-2.8.so.0
#13 0xb7b51a08 in ?? () from /usr/local/lib/libwx_gtk2u_core-2.8.so.0
#14 0xb710a551 in ?? () from /usr/lib/libglib-2.0.so.0
#15 0x00000000 in ?? ()
(gdb) bt full
#0 0x0808683b in CUpDownClient::ClearDownloadBlockRequests (this=0xab0dbe0) at BaseClient.cpp:1196
cur_block = (Requested_Block_Struct *) 0xbfa4c568
it = {<__gnu_debug::_Safe_iterator_base> = {_M_sequence = 0xab0dda0, _M_version = 0, _M_prior = 0x0,
_M_next = 0x0}, _M_current = {_M_node = 0x0}}
#1 0x080ef394 in CUpDownClient::SetDownloadState (this=0xab0dbe0, byNewState=1 '\001') at DownloadClient.cpp:543
No locals.
#2 0x08086e9a in CUpDownClient::Disconnected (this=0xab0dbe0, strReason=@0xbfa4c6b8, bFromSocket=false)
at BaseClient.cpp:1261
bDelete = 10
#3 0x0809f0e8 in CClientList::ProcessDirectCallbackList (this=0xa604a20) at ClientList.cpp:1118
it2 = {<__gnu_debug::_Safe_iterator_base> = {_M_sequence = 0xa604b88, _M_version = 0, _M_prior = 0x0,
_M_next = 0xbfa4c668}, _M_current = {_M_node = 0xab13b68}}
curClient = (CUpDownClient *) 0xab0dbe0
it = {<__gnu_debug::_Safe_iterator_base> = {_M_sequence = 0xa604b88, _M_version = 1, _M_prior = 0xbfa4c654,
_M_next = 0x0}, _M_current = {_M_node = 0xa604b80}}
cur_tick = 1912391961
#4 0x080a2556 in CClientList::Process (this=0xa604a20) at ClientList.cpp:752
cur_tick = 1912391961
buddy = Disconnected
current_it = {<__gnu_debug::_Safe_iterator_base> = {_M_sequence = 0xa604b58, _M_version = 1, _M_prior = 0x0,
_M_next = 0x0}, _M_current = {_M_node = 0xa604b44}}
#5 0x08078ef2 in CamuleApp::OnCoreTimer (this=0xa49b5f0) at amule.cpp:1186
msCur = 55980
msPrev1 = 55980
msPrev5 = 53816
msPrevSave = 0
msPrevHist = 55000
msPrevOS = 53816
msPrevKnownMet = 0
recurse = true
#6 0xb7915913 in wxAppConsole::HandleEvent () from /usr/local/lib/libwx_baseu-2.8.so.0
No symbol table info available.
#7 0xb79b6555 in wxEvtHandler::ProcessEventIfMatches () from /usr/local/lib/libwx_baseu-2.8.so.0
No symbol table info available.
#8 0xb79b669e in wxEventHashTable::HandleEvent () from /usr/local/lib/libwx_baseu-2.8.so.0
---Type <return> to continue, or q <return> to quit---
No symbol table info available.
#9 0xb79b67ff in wxEvtHandler::ProcessEvent () from /usr/local/lib/libwx_baseu-2.8.so.0
No symbol table info available.
#10 0xb79b6cef in wxEvtHandler::ProcessPendingEvents () from /usr/local/lib/libwx_baseu-2.8.so.0
No symbol table info available.
#11 0xb79161c5 in wxAppConsole::ProcessPendingEvents () from /usr/local/lib/libwx_baseu-2.8.so.0
No symbol table info available.
#12 0xb7bf5b39 in wxAppBase::ProcessIdle () from /usr/local/lib/libwx_gtk2u_core-2.8.so.0
No symbol table info available.
#13 0xb7b51a08 in ?? () from /usr/local/lib/libwx_gtk2u_core-2.8.so.0
No symbol table info available.
#14 0xb710a551 in ?? () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#15 0x00000000 in ?? ()
No symbol table info available.
(gdb) thread apply all bt
Thread 4 (Thread -1254917232 (LWP 23055)):
#0 0xb7f0a622 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1 0xb79b3e40 in wxConditionInternal::WaitTimeout () from /usr/local/lib/libwx_baseu-2.8.so.0
#2 0xb79b3e91 in wxCondition::WaitTimeout () from /usr/local/lib/libwx_baseu-2.8.so.0
#3 0xb79b49cc in wxSemaphoreInternal::WaitTimeout () from /usr/local/lib/libwx_baseu-2.8.so.0
#4 0xb79b4a53 in wxSemaphore::WaitTimeout () from /usr/local/lib/libwx_baseu-2.8.so.0
#5 0x083928d2 in CTimerThread::Entry (this=0xa9e5420) at Timer.cpp:66
#6 0xb79b4fc3 in wxThreadInternal::PthreadStart () from /usr/local/lib/libwx_baseu-2.8.so.0
#7 0xb79b502f in wxPthreadStart () from /usr/local/lib/libwx_baseu-2.8.so.0
#8 0xb7f061b3 in start_thread () from /lib/libpthread.so.0
#9 0xb771803e in clone () from /lib/libc.so.6
Thread 2 (Thread -1238135920 (LWP 23053)):
#0 0xb7f0d40c in ?? () from /lib/libpthread.so.0
#1 0xb79ba7e5 in wxMicroSleep () from /usr/local/lib/libwx_baseu-2.8.so.0
#2 0xb79ba81a in wxMilliSleep () from /usr/local/lib/libwx_baseu-2.8.so.0
#3 0xb79b36b5 in wxThread::Sleep () from /usr/local/lib/libwx_baseu-2.8.so.0
#4 0x081de5d4 in UploadBandwidthThrottler::Entry (this=0xa81ec80) at UploadBandwidthThrottler.cpp:323
#5 0xb79b4fc3 in wxThreadInternal::PthreadStart () from /usr/local/lib/libwx_baseu-2.8.so.0
#6 0xb79b502f in wxPthreadStart () from /usr/local/lib/libwx_baseu-2.8.so.0
#7 0xb7f061b3 in start_thread () from /lib/libpthread.so.0
#8 0xb771803e in clone () from /lib/libc.so.6
Thread 1 (Thread -1227925808 (LWP 23045)):
#0 0x0808683b in CUpDownClient::ClearDownloadBlockRequests (this=0xab0dbe0) at BaseClient.cpp:1196
#1 0x080ef394 in CUpDownClient::SetDownloadState (this=0xab0dbe0, byNewState=1 '\001') at DownloadClient.cpp:543
#2 0x08086e9a in CUpDownClient::Disconnected (this=0xab0dbe0, strReason=@0xbfa4c6b8, bFromSocket=false)
at BaseClient.cpp:1261
#3 0x0809f0e8 in CClientList::ProcessDirectCallbackList (this=0xa604a20) at ClientList.cpp:1118
#4 0x080a2556 in CClientList::Process (this=0xa604a20) at ClientList.cpp:752
#5 0x08078ef2 in CamuleApp::OnCoreTimer (this=0xa49b5f0) at amule.cpp:1186
#6 0xb7915913 in wxAppConsole::HandleEvent () from /usr/local/lib/libwx_baseu-2.8.so.0
#7 0xb79b6555 in wxEvtHandler::ProcessEventIfMatches () from /usr/local/lib/libwx_baseu-2.8.so.0
#8 0xb79b669e in wxEventHashTable::HandleEvent () from /usr/local/lib/libwx_baseu-2.8.so.0
---Type <return> to continue, or q <return> to quit---
#9 0xb79b67ff in wxEvtHandler::ProcessEvent () from /usr/local/lib/libwx_baseu-2.8.so.0
#10 0xb79b6cef in wxEvtHandler::ProcessPendingEvents () from /usr/local/lib/libwx_baseu-2.8.so.0
#11 0xb79161c5 in wxAppConsole::ProcessPendingEvents () from /usr/local/lib/libwx_baseu-2.8.so.0
#12 0xb7bf5b39 in wxAppBase::ProcessIdle () from /usr/local/lib/libwx_gtk2u_core-2.8.so.0
#13 0xb7b51a08 in ?? () from /usr/local/lib/libwx_gtk2u_core-2.8.so.0
#14 0xb710a551 in ?? () from /usr/lib/libglib-2.0.so.0
#15 0x00000000 in ?? ()
I'll see if I can track it down to a single download.[/edit]
-
I think we are dealing with a client that has already been deleted. That's how the list gets corrupted. Look at the value of m_reqfile - 0x6f is no valid pointer.
I'll think of some extra debug messages and post a patch for you.
-
Try this:
Index: ClientList.cpp
===================================================================
--- ClientList.cpp (revision 9971)
+++ ClientList.cpp (working copy)
@@ -1094,6 +1094,9 @@
void CClientList::AddDirectCallbackClient(CUpDownClient* toAdd)
{
wxASSERT(toAdd->GetDirectCallbackTimeout() != 0);
+ if (toAdd->HasBeenDeleted()) {
+ return;
+ }
for (DirectCallbackList::const_iterator it = m_currentDirectCallbacks.begin(); it != m_currentDirectCallbacks.end(); ++it) {
if (*it == toAdd) {
wxFAIL; // might happen very rarely on multiple connection tries, could be fixed in the client class, till then it's not much of a problem though
-
Thank you. I have applied the patch and amule is now running for over 40 minutes straight without any crashes. So, the workaround(?) seems to work.
-
Fine. :D
Please switch back to the old crashing client, wait till it crashes, switch to the good one, wait much longer, repeat.
I would not like to call the bug fixed just because some remote client causing the problem just turned off his computer, or you just finished the critical download.
-
So, the workaround(?) seems to work.
You're right, it's much more a workaround than a real fix. We should check why at all can we pass a dying client object to CClientList::AddDirectCallbackClient().
-
I think (without backing it up with thorough analysis) it's a race condition, when a response comes just at timeout and enters the event queue right after the client got disconnected. So I think it's more of a fix than a workaround. Actually, why is there a delayed delete at all? Just for cases like this, so that pending events don't crash on deleted clients. Therefore, any action entering a client into a list should check first if it isn't dying already.
And the users will be happy with anything that prevents the client from crashing. :)
-
Please switch back to the old crashing client, wait till it crashes, switch to the good one, wait much longer, repeat.
I have reinstalled amule 2.2.6 and it ran without crashing for a couple of hours. I will continue to use it and see if it still crashes, although I have finished a couple of files with the patched version. If any of these files was causing the crash it may not occur anymore.
-
Too bad. Well, I committed it anyway and declare it fixed until further notice.