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 CVS (2003/11/28 00:00) crashes  (Read 3620 times)

pure_ascii

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 16
aMule CVS (2003/11/28 00:00) crashes
« on: November 29, 2003, 11:03:02 AM »

Hi, I collected 3 different BTs, the first one is exactly the same as falso posted in http://amule.sourceforge.net/phpBB2/viewtopic.php?t=275. Here is the second one:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 30619)]
0x080ec7a1 in CEMSocket::DisableDownloadLimit() (this=0x0) at EMSocket.cpp:228
228             limitenabled = false;
(gdb) bt
#0  0x080ec7a1 in CEMSocket::DisableDownloadLimit() (this=0x0) at EMSocket.cpp:228
#1  0x0816fb73 in CPartFile::Process(unsigned) (this=0x8a73a58, reducedownload=131) at PartFile.cpp:1111
#2  0x080e6938 in CDownloadQueue::Process() (this=0x8a0caf0) at DownloadQueue.cpp:343
#3  0x081e3827 in TimerProc() () at UploadQueue.cpp:577
#4  0x082112a3 in CamuleDlg::OnUQTimer(wxTimerEvent&) (this=0x8527258, evt=@0xbffff190) at amuleDlg.cpp:298
#5  0x402e4f2b in wxEvtHandler::SearchEventTable(wxEventTable&, wxEvent&) () from /usr/lib/libwx_gtk-2.4.so.0
#6  0x402e4d2c in wxEvtHandler::ProcessEvent(wxEvent&) () from /usr/lib/libwx_gtk-2.4.so.0
#7  0x4037dcbc in wxTimerBase::Notify() () from /usr/lib/libwx_gtk-2.4.so.0
#8  0x40285a02 in timeout_callback () from /usr/lib/libwx_gtk-2.4.so.0
#9  0x408b1ae5 in g_timeout_dispatch () from /usr/lib/libglib-1.2.so.0
#10 0x408b0abe in g_main_dispatch () from /usr/lib/libglib-1.2.so.0
#11 0x408b0f99 in g_main_iterate () from /usr/lib/libglib-1.2.so.0
#12 0x408b1234 in g_main_run () from /usr/lib/libglib-1.2.so.0
#13 0x407b392f in gtk_main () from /usr/lib/libgtk-1.2.so.0
#14 0x4023b336 in wxApp::MainLoop() () from /usr/lib/libwx_gtk-2.4.so.0
#15 0x40294478 in wxAppBase::OnRun() () from /usr/lib/libwx_gtk-2.4.so.0
#16 0x4023ba98 in wxEntry(int, char**) () from /usr/lib/libwx_gtk-2.4.so.0
#17 0x08209e18 in main (argc=1, argv=0xbffff444) at amule.cpp:45
#18 0x406054c2 in __libc_start_main () from /lib/i686/libc.so.6
(gdb) bt full
#0  0x080ec7a1 in CEMSocket::DisableDownloadLimit() (this=0x0) at EMSocket.cpp:228
No locals.
#1  0x0816fb73 in CPartFile::Process(unsigned) (this=0x8a73a58, reducedownload=131) at PartFile.cpp:1111
        cur_datarate = 0
        cur_src = (CUpDownClient *) 0x9e09668
        sl = 0
        old_trans = 1
        dwCurTick = 565584034
        pos1 = (_POSITION *) 0x9f05498
        pos2 = (_POSITION *) 0x9cfc000
#2  0x080e6938 in CDownloadQueue::Process() (this=0x8a0caf0) at DownloadQueue.cpp:343
        cur_file = (class CPartFile *) 0x8a73a58
        pos = (_POSITION *) 0x8a9e5a8
        downspeed = 131
#3  0x081e3827 in TimerProc() () at UploadQueue.cpp:577
No locals.
#4  0x082112a3 in CamuleDlg::OnUQTimer(wxTimerEvent&) (this=0x8527258, evt=@0xbffff190) at amuleDlg.cpp:298
No locals.
#5  0x402e4f2b in wxEvtHandler::SearchEventTable(wxEventTable&, wxEvent&) () from /usr/lib/libwx_gtk-2.4.so.0
No symbol table info available.
#6  0x402e4d2c in wxEvtHandler::ProcessEvent(wxEvent&) () from /usr/lib/libwx_gtk-2.4.so.0
[...]


I did a dirty fix to stop this segfault:
[code:1]--- PartFile.cpp        27 Nov 2003 16:13:13 -0000      1.22
+++ PartFile.cpp        29 Nov 2003 09:58:25 -0000
@@ -1106,9 +1106,16 @@
                                                        } else if (limit < 1) {
                                                                limit = 1;
                                                        }
-                                                       cur_src->socket->SetDownloadLimit(limit);
+                                                       if (cur_src->socket)
+                                                           cur_src->socket->SetDownloadLimit(limit);
+                                                       else
+                                                           break;
+
                                                } else {
-                                                       cur_src->socket->DisableDownloadLimit();
+                                                       if (cur_src->socket)
+                                                           cur_src->socket->DisableDownloadLimit();
+                                                       else
+                                                           break;
                                                }
                                                cur_src->SetValidSource(true);
                                                break;
[/code:1]
But it should be determined, why this socket disappears to do a good fix.


And here comes the last one:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 2838)]
0x4065b0e4 in chunk_alloc () from /lib/i686/libc.so.6
(gdb) bt
#0  0x4065b0e4 in chunk_alloc () from /lib/i686/libc.so.6
#1  0x4065aeb2 in malloc () from /lib/i686/libc.so.6
#2  0x403702e6 in wxString::AllocBuffer(unsigned) () from /usr/lib/libwx_gtk-2.4.so.0
#3  0x40370cdd in wxString::AllocCopy(wxString&, int, int) const () from /usr/lib/libwx_gtk-2.4.so.0
#4  0x40370e4b in wxString::Right(unsigned) const () from /usr/lib/libwx_gtk-2.4.so.0
#5  0x081733a1 in CPartFile::IsArchive() (this=0x8a5aaa0) at PartFile.cpp:1894
#6  0x08170c57 in CPartFile::GetNextRequestedBlock(CUpDownClient*, Requested_Block_Struct**, unsigned short*) (this=0x8a5aaa0, sender=0x91338d8, newblocks=0x98d5cd0,
    count=0xbfffed52) at PartFile.cpp:1471
#7  0x080d55e9 in CUpDownClient::SendBlockRequests() (this=0x91338d8) at DownloadClient.cpp:441
#8  0x08110822 in CClientReqSocket::ProcessPacket(char*, unsigned, unsigned char) (this=0x8e654a0, packet=0x8ff32c8 "\020 p@\020 p@\020", size=0, opcode=85 'U')
    at ListenSocket.cpp:315
#9  0x08113b2f in CClientReqSocket::PacketReceived(Packet*) (this=0x8e654a0, packet=0x922f060) at ListenSocket.cpp:818
#10 0x080ec6e7 in CEMSocket::OnReceive(int) (this=0x8e654a0, nErrorCode=0) at EMSocket.cpp:208
#11 0x08113bc6 in CClientReqSocket::OnReceive(int) (this=0x8e654a0, nErrorCode=0) at ListenSocket.cpp:839
#12 0x082118ff in CamuleDlg::socketHandler(wxSocketEvent&) (this=0x8527238, event=@0x979f910) at amuleDlg.cpp:424
#13 0x402e4f2b in wxEvtHandler::SearchEventTable(wxEventTable&, wxEvent&) () from /usr/lib/libwx_gtk-2.4.so.0
#14 0x402e4d2c in wxEvtHandler::ProcessEvent(wxEvent&) () from /usr/lib/libwx_gtk-2.4.so.0
#15 0x402e4c58 in wxEvtHandler::ProcessPendingEvents() () from /usr/lib/libwx_gtk-2.4.so.0
#16 0x402945d6 in wxAppBase::ProcessPendingEvents() () from /usr/lib/libwx_gtk-2.4.so.0
#17 0x4023a893 in wxapp_pending_callback () from /usr/lib/libwx_gtk-2.4.so.0
#18 0x408b1c2f in g_idle_dispatch () from /usr/lib/libglib-1.2.so.0
#19 0x408b0abe in g_main_dispatch () from /usr/lib/libglib-1.2.so.0
#20 0x408b0f99 in g_main_iterate () from /usr/lib/libglib-1.2.so.0
#21 0x408b1234 in g_main_run () from /usr/lib/libglib-1.2.so.0
#22 0x407b392f in gtk_main () from /usr/lib/libgtk-1.2.so.0
#23 0x4023b336 in wxApp::MainLoop() () from /usr/lib/libwx_gtk-2.4.so.0
#24 0x40294478 in wxAppBase::OnRun() () from /usr/lib/libwx_gtk-2.4.so.0
#25 0x4023ba98 in wxEntry(int, char**) () from /usr/lib/libwx_gtk-2.4.so.0
#26 0x08209e20 in main (argc=1, argv=0xbffff444) at amule.cpp:45
#27 0x406054c2 in __libc_start_main () from /lib/i686/libc.so.6
(gdb) bt full
#0  0x4065b0e4 in chunk_alloc () from /lib/i686/libc.so.6
No symbol table info available.
#1  0x4065aeb2 in malloc () from /lib/i686/libc.so.6
No symbol table info available.
#2  0x403702e6 in wxString::AllocBuffer(unsigned) () from /usr/lib/libwx_gtk-2.4.so.0
No symbol table info available.
#3  0x40370cdd in wxString::AllocCopy(wxString&, int, int) const () from /usr/lib/libwx_gtk-2.4.so.0
No symbol table info available.
#4  0x40370e4b in wxString::Right(unsigned) const () from /usr/lib/libwx_gtk-2.4.so.0
No symbol table info available.
#5  0x081733a1 in CPartFile::IsArchive() (this=0x8a5aaa0) at PartFile.cpp:1894
        it_is = false
        extension =
#6  0x08170c57 in CPartFile::GetNextRequestedBlock(CUpDownClient*, Requested_Block_Struct**, unsigned short*) (this=0x8a5aaa0, sender=0x91338d8, newblocks=0x98d5cd0,
    count=0xbfffed52) at PartFile.cpp:1471
        foundPriorityPart = false
        gettingParts = {<> = {}, }
        usedlist = (CList *) 0xffffffff
        nRarest = 117
        usedpart = 27
        requestedCount = 0
        newblockcount = 2085
        partsav = (uint8 *) 0x9af7f78 '\001' , "a"
        randomness = 64
        liGoodParts = {<> = {}, internalList = 0x0, tail = 0x0, count = 0}
        liPossibleParts = {<> = {}, internalList = 0x0, tail = 0x0, count = 0}
        finished = false
#7  0x080d55e9 in CUpDownClient::SendBlockRequests() (this=0x91338d8) at DownloadClient.cpp:441
        count = 0
        toadd = (Requested_Block_Struct **) 0x98d5cd0
        packet = (Packet *) 0x30
        data = (class CMemFile *) 0x98d5cd0
        pos = (_POSITION *) 0x8217869
        null = 162868848
        block = (Requested_Block_Struct *) 0xad4e30c
#8  0x08110822 in CClientReqSocket::ProcessPacket(char*, unsigned, unsigned char) (this=0x8e654a0, packet=0x8ff32c8 "\020 p@\020 p@\020", size=0, opcode=85 'U')
    at ListenSocket.cpp:315
No locals.
#9  0x08113b2f in CClientReqSocket::PacketReceived(Packet*) (this=0x8e654a0, packet=0x922f060) at ListenSocket.cpp:818
No locals.
#10 0x080ec6e7 in CEMSocket::OnReceive(int) (this=0x8e654a0, nErrorCode=0) at EMSocket.cpp:208
        packet = (Packet *) 0x922f060
        packetBuffer = 0x8ff32c8 "\020 p@\020 p@\020"
        GlobalReadBuffer = "ã\001\0\0\0Uã\031\002\0\0FðÃ?Ó\217õ¿2ùL?³Å\\(¢\a¡V+\a£V+\227\210Â`£?Ð`õ\223A\006\t#òîyZ\210°»ê_T­ã°\031-ôFôGÄ3\030Kø\227úÚ\212Kø]âñ\034°\227òìÜÎâ\212Þ\023üv`¬\224Ư\216\nþ\r\202L\021Õ~>\201åk<Ã\227p\214tñÑ\032B 1Ê\001\bEA¡Î==z\231Ç\021Ö\220&8lÚEH\211í\222 \204VÓ\rN?úä\202Nô\224ÉgM Ýe\207Ρ\225\025\003\001Ñì \207Á\023ÃÇ:i\"FN\222Cë\006\221uP\212mr&"...
        readMax = 2000000
        ret = 1632
        rptr = 0x82f5586 "ã\031\002"
        rend = 0x82f5be0 "z¿g7²íbÇO\210>ø\204\ay*z?\223MOh\003\r1f\226\227Y{\001Ü\027PËôýÝ®YïÂ,e?µ>Ó³\214·\202a'\233^VDì5·\0349øÖo\216õ]Õ\\Y\207\230OM\215·\226>R\027\"ð­Ì>Õh¿\226¿\rj,éM;À\213\225o^ÕÌ\032Ç«\206i\222üó\034\036W\021î?pÛ·\aLxç\004ÝÉ×\233â¿rl$:ÑÇ\2157n\202Ý%[:&?\\±k#ÆònK6\233\215³kò]?i\024\236xDnÛÇï/?&c?àÄ2NmZV{õ¹K\204ÚÒªÞC?\201Ýz"...
#11 0x08113bc6 in CClientReqSocket::OnReceive(int) (this=0x8e654a0, nErrorCode=0) at ListenSocket.cpp:839
No locals.
#12 0x082118ff in CamuleDlg::socketHandler(wxSocketEvent&) (this=0x8527238, event=@0x979f910) at amuleDlg.cpp:424
        soc = (class CClientReqSocket *) 0x8e654a0
#13 0x402e4f2b in wxEvtHandler::SearchEventTable(wxEventTable&, wxEvent&) () from /usr/lib/libwx_gtk-2.4.so.0
No symbol table info available.
[...]

HTH, PA.
Logged