aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Pages: [1] 2

Author Topic: amuled crashes after some time  (Read 8062 times)

Lenni

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 44
amuled crashes after some time
« on: January 16, 2005, 11:54:54 AM »

I'm running amuled from CVS-tarball 20050115 compiled with wx-gtk2.5.3 on a Vector-Linux 4.3-system.
After some time amuled crashes.

bt output:
Code: [Select]
#0  0x4042eac1 in kill () from /lib/libc.so.6
#1  0x400249ed in pthread_kill () from /lib/libpthread.so.0
#2  0x40024d0b in raise () from /lib/libpthread.so.0
#3  0x4042e6fa in raise () from /lib/libc.so.6
#4  0x40430127 in abort () from /lib/libc.so.6
#5  0x4016216e in wxFatalSignalHandler () from /usr/lib/libwx_base-2.5.so.3
#6  0x40027c45 in pthread_barrierattr_setpshared () from /lib/libpthread.so.0
#7  
#8  0x0805f037 in std::_Rb_tree_base_iterator::_M_increment (this=0xbedfe510)
    at stl_tree.h:141
#9  0x0809cc80 in std::_Rb_tree_iterator::operator++ (this=0xbedfe510) at stl_tree.h:207
#10 0x0809a3e6 in CDownloadQueue::GetDownloadClientByIP (this=0x849c408,
    dwIP=637135321) at DownloadQueue.cpp:914
#11 0x0808fac2 in CClientUDPSocket::ProcessPacket (this=0x84c3780,
    packet=0xbedfe6ae "", size=65534, opcode=145 '\221', host=637135321,
    port=65534) at ClientUDPSocket.cpp:200
#12 0x0808f4af in CClientUDPSocket::OnReceive (this=0x84c3780)
    at ClientUDPSocket.cpp:100
#13 0x0809006e in CClientUDPSocket::Entry (this=0x84c3780)
    at ClientUDPSocket.cpp:314
#14 0x40158adf in wxThreadInternal::PthreadStart ()
   from /usr/lib/libwx_base-2.5.so.3
#15 0x4015899c in wxPthreadStart () from /usr/lib/libwx_base-2.5.so.3
#16 0x40021ca3 in pthread_detach () from /lib/libpthread.so.0
#17 0x404e6c97 in clone () from /lib/libc.so.6
bt full-output:
Code: [Select]
#0  0x4042eac1 in kill () from /lib/libc.so.6
No symbol table info available.
#1  0x400249ed in pthread_kill () from /lib/libpthread.so.0
No symbol table info available.
#2  0x40024d0b in raise () from /lib/libpthread.so.0
No symbol table info available.
#3  0x4042e6fa in raise () from /lib/libc.so.6
No symbol table info available.
#4  0x40430127 in abort () from /lib/libc.so.6
No symbol table info available.
#5  0x4016216e in wxFatalSignalHandler () from /usr/lib/libwx_base-2.5.so.3
No symbol table info available.
#6  0x40027c45 in pthread_barrierattr_setpshared () from /lib/libpthread.so.0
No symbol table info available.
#7  
No symbol table info available.
#8  0x0805f037 in std::_Rb_tree_base_iterator::_M_increment (this=0xbedfe510)
    at stl_tree.h:141
No locals.
#9  0x0809cc80 in std::_Rb_tree_iterator::operator++ (this=0xbedfe510) at stl_tree.h:207
No locals.
#10 0x0809a3e6 in CDownloadQueue::GetDownloadClientByIP (this=0x849c408,    dwIP=637135321) at DownloadQueue.cpp:914
        it = { = {
    _M_node = 0x0}, }
        i = 9
        size = 28
#11 0x0808fac2 in CClientUDPSocket::ProcessPacket (this=0x84c3780,
    packet=0xbedfe6ae "", size=65534, opcode=145 '\221', host=637135321,
    port=65534) at ClientUDPSocket.cpp:200
        data_in = { = { = {_vptr.CFile = 0x85dac74,
      m_fd = 14, m_error = 4, fFilePath = },
    m_GrowBytes = 3202344588, m_position = 4619423500795380736,
    m_BufferSize = 4635199764984489540, m_FileSize = 1079201728,
    m_delete = false, m_buffer = 0x40537d24 "8,\023"}, = {
    _vptr.CFileDataIO = 0xbedfe65c}, }
        nRank = 65534
        sender = (CUpDownClient *) 0xfffe
#12 0x0808f4af in CClientUDPSocket::OnReceive (this=0x84c3780)
    at ClientUDPSocket.cpp:100
        buffer = "Å\221\000\000\t\003ÿÿ;{\00379ûQ\177\r+\001", '\0' , "}\000\f,", '\0' , "\016H\002@\000\000\000\000$}S@î\n\002@\206-O@\030Ì\002@.S\002@î\n\002@\030Ì\002@ø÷ß¾ËR\002@°\a\002@\001\000\000\000äùß¾\017\204\002@\v\000\000\000äùß¾ô_\033@Pÿ\033@Cøß¾\001\000\000\000\002", '\0' , "Løß¾Ìøß¾\000\000\000\000Lùß¾", '\0' , "Å\001", '\0' , "\002", '\0' , "\002", '\0' , "ªÚ"...
        addr = {<> = {}, }
        length = 0
#13 0x0809006e in CClientUDPSocket::Entry (this=0x84c3780)
    at ClientUDPSocket.cpp:314
No locals.
#14 0x40158adf in wxThreadInternal::PthreadStart ()
   from /usr/lib/libwx_base-2.5.so.3
No symbol table info available.
#15 0x4015899c in wxPthreadStart () from /usr/lib/libwx_base-2.5.so.3
No symbol table info available.
#16 0x40021ca3 in pthread_detach () from /lib/libpthread.so.0
No symbol table info available.
#17 0x404e6c97 in clone () from /lib/libc.so.6
No symbol table info available.

I hope you can use it.
Lenni
Logged

lfroen

  • Guest
Re: amuled crashes after some time
« Reply #1 on: January 16, 2005, 12:35:47 PM »

It's looks like memory corruption. I have crashes in random places, but valgrind doesn't complain. Which means in tern, that there's syncronization problem (lock missing).
Logged

Xaignar

  • Admin and Code Junky
  • Hero Member
  • *****
  • Karma: 19
  • Offline Offline
  • Posts: 1103
Re: amuled crashes after some time
« Reply #2 on: January 16, 2005, 12:54:31 PM »

Not always no. Valgrind sadly does not catch everything, so it could still easily be normal memory corruption.
Logged

Lenni

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 44
Re: amuled crashes after some time
« Reply #3 on: January 16, 2005, 12:57:19 PM »

So my memory is broken? Is there a way to fix this?
Logged

Xaignar

  • Admin and Code Junky
  • Hero Member
  • *****
  • Karma: 19
  • Offline Offline
  • Posts: 1103
Re: amuled crashes after some time
« Reply #4 on: January 16, 2005, 01:37:28 PM »

No, no. Don't worry, it's not your memory that is broken, it's aMule doing odd things with it. Problems like this generally result in crashes like yours, and the term for that is simply memory-corruption which refers to the fact that the memory values used by aMule were corrupted due to a bug in aMule. So this is something we should worry about, not you.  ;)
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: amuled crashes after some time
« Reply #5 on: January 16, 2005, 04:50:29 PM »

Locking problem. is the same kind of prob I fixed some days ago with sorting, guys...
Logged

Xaignar

  • Admin and Code Junky
  • Hero Member
  • *****
  • Karma: 19
  • Offline Offline
  • Posts: 1103
Re: amuled crashes after some time
« Reply #6 on: January 16, 2005, 05:12:34 PM »

Meh, we need thread-safety in more classes ... I've added it to CIPfilter and I guess I'll start adding it to other classes as well now ...
Logged

Lenni

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 44
Re: amuled crashes after some time
« Reply #7 on: January 16, 2005, 05:35:27 PM »

It crashed again, bt-outputs seem a bit different, so I post them here:

bt-output:
Code: [Select]
#0  0x4042eac1 in kill () from /lib/libc.so.6
#1  0x400249ed in pthread_kill () from /lib/libpthread.so.0
#2  0x40024d0b in raise () from /lib/libpthread.so.0
#3  0x4042e6fa in raise () from /lib/libc.so.6
#4  0x40430127 in abort () from /lib/libc.so.6
#5  0x4016216e in wxFatalSignalHandler () from /usr/lib/libwx_base-2.5.so.3
#6  0x40027c45 in pthread_barrierattr_setpshared () from /lib/libpthread.so.0
#7  
#8  0x400e1d56 in wxBaseArrayShort::GetCount ()
   from /usr/lib/libwx_base-2.5.so.3
#9  0x080cb7ac in CPartFile::UpdatePartsFrequency (this=0x0, client=0x86f2068,
    increment=true) at PartFile.cpp:4007
#10 0x080911ce in CUpDownClient::ProcessFileStatus (this=0x86f2068,
    bUdpPacket=true, data=0xbedfe5ac, file=0x84c4ca0) at DownloadClient.cpp:422
#11 0x0808fb04 in CClientUDPSocket::ProcessPacket (this=0x84d2be8,
    packet=0xbedfe5ac "\b\033\026\bÿÿÿÿ", size=65534, opcode=145 '\221',
    host=3800060242, port=8296) at ClientUDPSocket.cpp:204
#12 0x0808f4af in CClientUDPSocket::OnReceive (this=0x84d2be8)
    at ClientUDPSocket.cpp:100
#13 0x0809006e in CClientUDPSocket::Entry (this=0x84d2be8)
    at ClientUDPSocket.cpp:314
#14 0x40158adf in wxThreadInternal::PthreadStart ()
   from /usr/lib/libwx_base-2.5.so.3
#15 0x4015899c in wxPthreadStart () from /usr/lib/libwx_base-2.5.so.3
#16 0x40021ca3 in pthread_detach () from /lib/libpthread.so.0
#17 0x404e6c97 in clone () from /lib/libc.so.6

bt full-output:
Code: [Select]
#0  0x4042eac1 in kill () from /lib/libc.so.6
No symbol table info available.
#1  0x400249ed in pthread_kill () from /lib/libpthread.so.0
No symbol table info available.
#2  0x40024d0b in raise () from /lib/libpthread.so.0
No symbol table info available.
#3  0x4042e6fa in raise () from /lib/libc.so.6
No symbol table info available.
#4  0x40430127 in abort () from /lib/libc.so.6
No symbol table info available.
#5  0x4016216e in wxFatalSignalHandler () from /usr/lib/libwx_base-2.5.so.3
No symbol table info available.
#6  0x40027c45 in pthread_barrierattr_setpshared () from /lib/libpthread.so.0
No symbol table info available.
#7  
No symbol table info available.
#8  0x400e1d56 in wxBaseArrayShort::GetCount ()
   from /usr/lib/libwx_base-2.5.so.3
No symbol table info available.
#9  0x080cb7ac in CPartFile::UpdatePartsFrequency (this=0x0, client=0x86f2068,
    increment=true) at PartFile.cpp:4007
        freq = (
    const BitVector &) @0x86f21f0: { >> = {, true>> = {
      _M_start = { = {> = {}, _M_p = 0x0,
          _M_offset = 0}, },
      _M_finish = { = {> = {}, _M_p = 0x0,
          _M_offset = 0}, },
      _M_end_of_storage = 0x0}, }, }
        size = 0
#10 0x080911ce in CUpDownClient::ProcessFileStatus (this=0x86f2068,
    bUdpPacket=true, data=0xbedfe5ac, file=0x84c4ca0) at DownloadClient.cpp:422
        nED2KPartCount = 0
        bPartsNeeded = true
#11 0x0808fb04 in CClientUDPSocket::ProcessPacket (this=0x84d2be8,
    packet=0xbedfe5ac "\b\033\026\bÿÿÿÿ", size=65534, opcode=145 '\221',
    host=3800060242, port=8296) at ClientUDPSocket.cpp:204
        data_in = { = { = {_vptr.CFile = 0x8161b08,
      m_fd = -1, m_error = false, fFilePath = },
    m_GrowBytes = 0, m_position = 2, m_BufferSize = 65534, m_FileSize = 65534,
    m_delete = false, m_buffer = 0xbedfe6ae ""}, = {
    _vptr.CFileDataIO = 0x8161b7c}, }
        nRank = 65534
        sender = (CUpDownClient *) 0x86f2068
#12 0x0808f4af in CClientUDPSocket::OnReceive (this=0x84d2be8)
    at ClientUDPSocket.cpp:100
        buffer = "Å\221\000\000¦\000it\227ð¦79ûU\177\r@\001", '\0' , "#\001\002", '\0' , "\016H\002@\000\000\000\000$}S@î\n\002@\206-O@\030Ì\002@.S\002@î\n\002@\030Ì\002@ø÷ß¾ËR\002@°\a\002@\001\000\000\000äùß¾\017\204\002@\v\000\000\000äùß¾ô_\033@Pÿ\033@Cøß¾\001\000\000\000\002", '\0' , "Løß¾Ìøß¾\000\000\000\000Lùß¾", '\0' , "Å\001", '\0' , "@", '\0' , "@", '\0' , "ÖV\221"...
        addr = {<> = {}, }
        length = 0
#13 0x0809006e in CClientUDPSocket::Entry (this=0x84d2be8)
    at ClientUDPSocket.cpp:314
No locals.
#14 0x40158adf in wxThreadInternal::PthreadStart ()
   from /usr/lib/libwx_base-2.5.so.3
No symbol table info available.
#15 0x4015899c in wxPthreadStart () from /usr/lib/libwx_base-2.5.so.3
No symbol table info available.
#16 0x40021ca3 in pthread_detach () from /lib/libpthread.so.0
No symbol table info available.
#17 0x404e6c97 in clone () from /lib/libc.so.6
No symbol table info available.
Logged

lfroen

  • Guest
Re: amuled crashes after some time
« Reply #8 on: January 17, 2005, 06:55:38 AM »

Both crashes coming from UDP socket thread. I will check locking there
Logged

Lenni

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 44
Re: amuled crashes after some time
« Reply #9 on: January 17, 2005, 10:27:39 AM »

Can someone please post here when the problem is solved and I can download a new CVS? Thanks!
Lenni
Logged

stefanero

  • Some Support
  • Developer
  • Hero Member
  • *****
  • Karma: 8
  • Offline Offline
  • Posts: 4235
Re: amuled crashes after some time
« Reply #10 on: January 17, 2005, 02:01:00 PM »

lfroen: what about a test with disabled udp?

Lenni if you want you can checnge in prefs the usage of UDP in amule,
in your .eMule set
UDPDisable=0
to 1 and try it

maybe it works, maybe it does not.

stefanero
Logged
In its default setup, Windows XP on the Internet amounts to a car
parked in a bad part of town, with the doors unlocked, the key in
the ignition and a Post-It note on the dashboard saying, "Please
don't steal this."

Lenni

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 44
Re: amuled crashes after some time
« Reply #11 on: January 18, 2005, 10:44:40 AM »

I set UDPDisabled=1 but amuled crashed even more often  ?(
So I upgraded to today's CVS and will see...

Lenni
Logged

lfroen

  • Guest
Re: amuled crashes after some time
« Reply #12 on: January 18, 2005, 10:48:21 AM »

stefanero: I'm not sure what exactly "disabled UDP" does. Does it mean that socket is not created ? Or amule doesn't SEND udp packets ?
Logged

stefanero

  • Some Support
  • Developer
  • Hero Member
  • *****
  • Karma: 8
  • Offline Offline
  • Posts: 4235
Re: amuled crashes after some time
« Reply #13 on: January 18, 2005, 10:57:47 AM »

the 1st udp port is not creaded.... 4672
thats what it does, I think some udp packages still go over the 2nd udp port tcp+3
Logged
In its default setup, Windows XP on the Internet amounts to a car
parked in a bad part of town, with the doors unlocked, the key in
the ignition and a Post-It note on the dashboard saying, "Please
don't steal this."

Lenni

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 44
Re: amuled crashes after some time
« Reply #14 on: January 19, 2005, 10:46:50 AM »

I'm running CVS20050118, with UDPDisabled=1, for over 14hours now  :D
With UDPDisabled=0 it crashed after a short time (after using up all CPU-resources that was left).

bt-output:
Code: [Select]
#0  0x4042eac1 in kill () from /lib/libc.so.6
#1  0x400249ed in pthread_kill () from /lib/libpthread.so.0
#2  0x40024d0b in raise () from /lib/libpthread.so.0
#3  0x4042e6fa in raise () from /lib/libc.so.6
#4  0x40430127 in abort () from /lib/libc.so.6
#5  0x4016216e in wxFatalSignalHandler () from /usr/lib/libwx_base-2.5.so.3
#6  0x40027c45 in pthread_barrierattr_setpshared () from /lib/libpthread.so.0
#7  
#8  0x08060069 in CUpDownClient::SetSocket (this=0x0, socket=0x0)
    at updownclient.h:434
#9  0x0805384e in CClientReqSocket::Disconnect (this=0x8b0b588, strReason=@0x0)
    at ListenSocket.cpp:177
#10 0x0805b7f9 in CClientReqSocket::OnError (this=0x8b0b588,
    nErrorCode=135510208) at ListenSocket.cpp:2045
#11 0x08068aec in CEMSocket::Send (this=0x8b0b588, lpBuf=0x0, nBufLen=0)
    at EMSocket.cpp:403
#12 0x080685d9 in CEMSocket::SendPacket (this=0x8b0b588, packet=0x40861dc0,
    controlpacket=true) at EMSocket.cpp:320
#13 0x08072dab in CUpDownClient::SendPacket (this=0x401668b8,
    packet=0x40861dc0, delpacket=false, controlpacket=false)
    at BaseClient.cpp:2076
#14 0x08090bd6 in CUpDownClient::SendFileRequest (this=0x8a31de8)
    at DownloadClient.cpp:259
#15 0x08070554 in CUpDownClient::ConnectionEstablished (this=0x8a31de8)
    at BaseClient.cpp:1388
#16 0x08070069 in CUpDownClient::TryToConnect (this=0x8a31de8,
    bIgnoreMaxCon=false) at BaseClient.cpp:1304
#17 0x08090717 in CUpDownClient::AskForDownload (this=0x8a31de8)
    at DownloadClient.cpp:154
#18 0x080c45ee in CPartFile::Process (this=0x84f7b40, reducedownload=200,
    m_icounter=1 '\001') at PartFile.cpp:1707
#19 0x08098984 in CDownloadQueue::Process (this=0x84d42f8)
    at DownloadQueue.cpp:379
#20 0x080fe54c in CamuleApp::OnCoreTimer (this=0x839fc60) at amule.cpp:1434
#21 0x08100e58 in CamuleDaemonApp::OnRun (this=0x839fc60) at amuled.cpp:162
#22 0x40109393 in wxEntry () from /usr/lib/libwx_base-2.5.so.3
#23 0x08100c79 in main (argc=1, argv=0xbffffc64) at amuled.cpp:134

bt full-output:
Code: [Select]
#0  0x4042eac1 in kill () from /lib/libc.so.6
No symbol table info available.
#1  0x400249ed in pthread_kill () from /lib/libpthread.so.0
No symbol table info available.
#2  0x40024d0b in raise () from /lib/libpthread.so.0
No symbol table info available.
#3  0x4042e6fa in raise () from /lib/libc.so.6
No symbol table info available.
#4  0x40430127 in abort () from /lib/libc.so.6
No symbol table info available.
#5  0x4016216e in wxFatalSignalHandler () from /usr/lib/libwx_base-2.5.so.3
No symbol table info available.
#6  0x40027c45 in pthread_barrierattr_setpshared () from /lib/libpthread.so.0
No symbol table info available.
#7  
No symbol table info available.
#8  0x08060069 in CUpDownClient::SetSocket (this=0x0, socket=0x0)
    at updownclient.h:434
No locals.
#9  0x0805384e in CClientReqSocket::Disconnect (this=0x8b0b588, strReason=@0x0)
    at ListenSocket.cpp:177
No locals.
#10 0x0805b7f9 in CClientReqSocket::OnError (this=0x8b0b588,
---Type to continue, or q to quit---
    nErrorCode=135510208) at ListenSocket.cpp:2045
        strError =
#11 0x08068aec in CEMSocket::Send (this=0x8b0b588, lpBuf=0x0, nBufLen=0)
    at EMSocket.cpp:403
        error = 0
#12 0x080685d9 in CEMSocket::SendPacket (this=0x8b0b588, packet=0x40861dc0,
    controlpacket=true) at EMSocket.cpp:320
        delpacket = Cannot access memory at address 0x0
Are these backtraces usefull for you in any way? Otherwise I'll stop posting them here.
Lenni
Logged
Pages: [1] 2