aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: SIGSEGV at 0x0000000000441452 in main (argc=1, argv=<optimized out>) at ...  (Read 5120 times)

morph

  • Full Member
  • ***
  • Karma: 2
  • Offline Offline
  • Posts: 213
    • http://matrixhasu.altervista.org/

Hello,
in Debian we received this bug: http://bugs.debian.org/772592 which refers to the version we have uploaded in unstable, which is a git snapshot at commit id 1a369e47

Code: [Select]
(gdb) bt
#0  g_source_unref_internal (source=source@entry=0x7fffe0002bc0, context=context@entry=0xa85020, have_lock=have_lock@entry=1) at /build/glib2.0-dt6trg/glib2.0-2.42.0/./glib/gmain.c:2027
#1  0x00007ffff2e5d1a9 in g_source_destroy_internal (source=0x7fffe0002bc0, context=0xa85020, have_lock=0) at /build/glib2.0-dt6trg/glib2.0-2.42.0/./glib/gmain.c:1201
#2  0x00007ffff2e5e925 in g_source_remove (tag=214464) at /build/glib2.0-dt6trg/glib2.0-2.42.0/./glib/gmain.c:2239
#3  0x00007ffff6515af7 in GSocketGUIFunctionsTableConcrete::Install_Callback(GSocket*, GSocketEvent) () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-2.8.so.0
#4  0x00007ffff6114712 in GSocket::Write(char const*, int) () from /usr/lib/x86_64-linux-gnu/libwx_baseu_net-2.8.so.0
#5  0x00007ffff610fe78 in wxSocketBase::_Write(void const*, unsigned int) () from /usr/lib/x86_64-linux-gnu/libwx_baseu_net-2.8.so.0
#6  0x00007ffff610feb4 in wxSocketBase::Write(void const*, unsigned int) () from /usr/lib/x86_64-linux-gnu/libwx_baseu_net-2.8.so.0
#7  0x00000000005aa514 in Write (nbytes=46, buffer=0x4381550, this=0x43f3890) at ../../src/LibSocket.h:266
#8  CSocketClientProxy::Write (this=this@entry=0x43f3890, buffer=0x4381550, nbytes=nbytes@entry=46) at ../../src/Proxy.cpp:1324
#9  0x00000000004a401f in CEncryptedStreamSocket::Write (this=this@entry=0x43f3890, lpBuf=<optimized out>, nBufLen=nBufLen@entry=46) at ../../src/EncryptedStreamSocket.cpp:210
#10 0x00000000004a2bc3 in CEMSocket::Send (this=0x43f3890, maxNumberOfBytesToSend=<optimized out>, minFragSize=<optimized out>, onlyAllowedToSendControlPacket=true) at ../../src/EMSocket.cpp:563
#11 0x0000000000480eb9 in SendControlData (minFragSize=<optimized out>, maxNumberOfBytesToSend=<optimized out>, this=0x43f3890) at ../../src/EMSocket.h:69
#12 CClientTCPSocket::SendControlData (this=0x43f3890, maxNumberOfBytesToSend=<optimized out>, overchargeMaxBytesToSend=<optimized out>) at ../../src/ClientTCPSocket.cpp:2045
#13 0x00000000004eb016 in UploadBandwidthThrottler::Entry (this=0x36c93e0) at ../../src/UploadBandwidthThrottler.cpp:381
#14 0x00007ffff5e774e5 in wxThreadInternal::PthreadStart(wxThread*) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-2.8.so.0
#15 0x00007ffff7bc70a4 in start_thread (arg=0x7fffec5a7700) at pthread_create.c:309
#16 0x00007ffff5070ccd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
(gdb) bt full
#0  g_source_unref_internal (source=source@entry=0x7fffe0002bc0, context=context@entry=0xa85020, have_lock=have_lock@entry=1) at /build/glib2.0-dt6trg/glib2.0-2.42.0/./glib/gmain.c:2027
        old_cb_data = 0x0
        old_cb_funcs = 0x0
        __FUNCTION__ = "g_source_unref_internal"
#1  0x00007ffff2e5d1a9 in g_source_destroy_internal (source=0x7fffe0002bc0, context=0xa85020, have_lock=0) at /build/glib2.0-dt6trg/glib2.0-2.42.0/./glib/gmain.c:1201
        tmp_list = <optimized out>
        old_cb_data = 0x7fffe0000fc0
        old_cb_funcs = <optimized out>
#2  0x00007ffff2e5e925 in g_source_remove (tag=214464) at /build/glib2.0-dt6trg/glib2.0-2.42.0/./glib/gmain.c:2239
        source = 0x7fffe0002bc0
        __FUNCTION__ = "g_source_remove"
#3  0x00007ffff6515af7 in GSocketGUIFunctionsTableConcrete::Install_Callback(GSocket*, GSocketEvent) () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-2.8.so.0
No symbol table info available.
#4  0x00007ffff6114712 in GSocket::Write(char const*, int) () from /usr/lib/x86_64-linux-gnu/libwx_baseu_net-2.8.so.0
No symbol table info available.
#5  0x00007ffff610fe78 in wxSocketBase::_Write(void const*, unsigned int) () from /usr/lib/x86_64-linux-gnu/libwx_baseu_net-2.8.so.0
No symbol table info available.
#6  0x00007ffff610feb4 in wxSocketBase::Write(void const*, unsigned int) () from /usr/lib/x86_64-linux-gnu/libwx_baseu_net-2.8.so.0
No symbol table info available.
#7  0x00000000005aa514 in Write (nbytes=46, buffer=0x4381550, this=0x43f3890) at ../../src/LibSocket.h:266
No locals.
#8  CSocketClientProxy::Write (this=this@entry=0x43f3890, buffer=0x4381550, nbytes=nbytes@entry=46) at ../../src/Proxy.cpp:1324
        lock = {m_isOk = true, m_mutex = @0x43f39c8}
#9  0x00000000004a401f in CEncryptedStreamSocket::Write (this=this@entry=0x43f3890, lpBuf=<optimized out>, nBufLen=nBufLen@entry=46) at ../../src/EncryptedStreamSocket.cpp:210
No locals.
#10 0x00000000004a2bc3 in CEMSocket::Send (this=0x43f3890, maxNumberOfBytesToSend=<optimized out>, minFragSize=<optimized out>, onlyAllowedToSendControlPacket=true) at ../../src/EMSocket.cpp:563
        tosend = 46
        result = <optimized out>
        bWasLongTimeSinceSend = <optimized out>
        sentControlPacketBytesThisCall = 0
        returnVal = <optimized out>
        lock = {m_isOk = <optimized out>, m_mutex = @0x43f3d08}
        anErrorHasOccured = <optimized out>
        sentStandardPacketBytesThisCall = 0
#11 0x0000000000480eb9 in SendControlData (minFragSize=<optimized out>, maxNumberOfBytesToSend=<optimized out>, this=0x43f3890) at ../../src/EMSocket.h:69
No locals.
#12 CClientTCPSocket::SendControlData (this=0x43f3890, maxNumberOfBytesToSend=<optimized out>, overchargeMaxBytesToSend=<optimized out>) at ../../src/ClientTCPSocket.cpp:2045
        returnStatus = <optimized out>
#13 0x00000000004eb016 in UploadBandwidthThrottler::Entry (this=0x36c93e0) at ../../src/UploadBandwidthThrottler.cpp:381
        socketSentBytes = {success = false, sentBytesStandardPackets = 0, sentBytesControlPackets = 0}
        socket = 0x43f3ca0
        slots = <optimized out>
        spentBytes = 0
        spentOverhead = 0
        sendLock = {m_isOk = <optimized out>, m_mutex = @0x36c9400}
        minBytesToSpend = <optimized out>
        timeSinceLastLoop = <optimized out>
        minFragSize = 1300
        doubleSendSize = 2600
        sleepTime = <optimized out>
        thisLoopTick = 748032443
        bytesToSpend = 14
        extraSleepTime = 1
        lastLoopTick = 748032443
        allowedDataRate = <optimized out>
        rememberedSlotCounter = 1
        sendLock = <optimized out>
#14 0x00007ffff5e774e5 in wxThreadInternal::PthreadStart(wxThread*) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-2.8.so.0
No symbol table info available.
#15 0x00007ffff7bc70a4 in start_thread (arg=0x7fffec5a7700) at pthread_create.c:309
---Type <return> to continue, or q <return> to quit---
        __res = <optimized out>
        pd = 0x7fffec5a7700
        now = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140737158739712, -1311687854287267127, 1, 140737354125408, 57447392, 140737158739712, 1311720035986922185, 1311705966615026377}, mask_was_saved = 0}},
          priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
        pagesize_m1 = <optimized out>
        sp = <optimized out>
        freesize = <optimized out>
        __PRETTY_FUNCTION__ = "start_thread"
#16 0x00007ffff5070ccd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
No locals.
(gdb) thread apply all bt

Thread 5 (Thread 0x7fffea5a1700 (LWP 30874)):
#0  pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
#1  0x00007ffff5e761e6 in wxConditionInternal::WaitTimeout(unsigned long) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-2.8.so.0
#2  0x00007ffff5e76d6a in wxSemaphoreInternal::WaitTimeout(unsigned long) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-2.8.so.0
#3  0x00000000005dca1e in CTimerThread::Entry (this=0x41f5600) at ../../src/Timer.cpp:66
#4  0x00007ffff5e774e5 in wxThreadInternal::PthreadStart(wxThread*) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-2.8.so.0
#5  0x00007ffff7bc70a4 in start_thread (arg=0x7fffea5a1700) at pthread_create.c:309
#6  0x00007ffff5070ccd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 2 (Thread 0x7fffec5a7700 (LWP 30871)):
#0  g_source_unref_internal (source=source@entry=0x7fffe0002bc0, context=context@entry=0xa85020, have_lock=have_lock@entry=1) at /build/glib2.0-dt6trg/glib2.0-2.42.0/./glib/gmain.c:2027
#1  0x00007ffff2e5d1a9 in g_source_destroy_internal (source=0x7fffe0002bc0, context=0xa85020, have_lock=0) at /build/glib2.0-dt6trg/glib2.0-2.42.0/./glib/gmain.c:1201
#2  0x00007ffff2e5e925 in g_source_remove (tag=214464) at /build/glib2.0-dt6trg/glib2.0-2.42.0/./glib/gmain.c:2239
#3  0x00007ffff6515af7 in GSocketGUIFunctionsTableConcrete::Install_Callback(GSocket*, GSocketEvent) () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-2.8.so.0
#4  0x00007ffff6114712 in GSocket::Write(char const*, int) () from /usr/lib/x86_64-linux-gnu/libwx_baseu_net-2.8.so.0
#5  0x00007ffff610fe78 in wxSocketBase::_Write(void const*, unsigned int) () from /usr/lib/x86_64-linux-gnu/libwx_baseu_net-2.8.so.0
#6  0x00007ffff610feb4 in wxSocketBase::Write(void const*, unsigned int) () from /usr/lib/x86_64-linux-gnu/libwx_baseu_net-2.8.so.0
#7  0x00000000005aa514 in Write (nbytes=46, buffer=0x4381550, this=0x43f3890) at ../../src/LibSocket.h:266
#8  CSocketClientProxy::Write (this=this@entry=0x43f3890, buffer=0x4381550, nbytes=nbytes@entry=46) at ../../src/Proxy.cpp:1324
#9  0x00000000004a401f in CEncryptedStreamSocket::Write (this=this@entry=0x43f3890, lpBuf=<optimized out>, nBufLen=nBufLen@entry=46) at ../../src/EncryptedStreamSocket.cpp:210
#10 0x00000000004a2bc3 in CEMSocket::Send (this=0x43f3890, maxNumberOfBytesToSend=<optimized out>, minFragSize=<optimized out>, onlyAllowedToSendControlPacket=true) at ../../src/EMSocket.cpp:563
#11 0x0000000000480eb9 in SendControlData (minFragSize=<optimized out>, maxNumberOfBytesToSend=<optimized out>, this=0x43f3890) at ../../src/EMSocket.h:69
#12 CClientTCPSocket::SendControlData (this=0x43f3890, maxNumberOfBytesToSend=<optimized out>, overchargeMaxBytesToSend=<optimized out>) at ../../src/ClientTCPSocket.cpp:2045
#13 0x00000000004eb016 in UploadBandwidthThrottler::Entry (this=0x36c93e0) at ../../src/UploadBandwidthThrottler.cpp:381
#14 0x00007ffff5e774e5 in wxThreadInternal::PthreadStart(wxThread*) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-2.8.so.0
#15 0x00007ffff7bc70a4 in start_thread (arg=0x7fffec5a7700) at pthread_create.c:309
#16 0x00007ffff5070ccd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 1 (Thread 0x7ffff7f84a00 (LWP 30856)):
#0  syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1  0x00007ffff2ea39a9 in g_mutex_lock_slowpath (mutex=mutex@entry=0xa85020) at /build/glib2.0-dt6trg/glib2.0-2.42.0/./glib/gthread-posix.c:1314
#2  0x00007ffff2ea4372 in g_mutex_lock (mutex=mutex@entry=0xa85020) at /build/glib2.0-dt6trg/glib2.0-2.42.0/./glib/gthread-posix.c:1338
#3  0x00007ffff2e5f76f in g_main_context_check (context=context@entry=0xa85020, max_priority=2147483647, fds=fds@entry=0x43ddf10, n_fds=n_fds@entry=17)
    at /build/glib2.0-dt6trg/glib2.0-2.42.0/./glib/gmain.c:3568
#4  0x00007ffff2e5fe83 in g_main_context_iterate (context=0xa85020, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /build/glib2.0-dt6trg/glib2.0-2.42.0/./glib/gmain.c:3778
#5  0x00007ffff2e60272 in g_main_loop_run (loop=0x41bf8b0) at /build/glib2.0-dt6trg/glib2.0-2.42.0/./glib/gmain.c:3975
#6  0x00007ffff4a6d4b7 in IA__gtk_main () at /build/gtk+2.0-Gthrko/gtk+2.0-2.24.25/gtk/gtkmain.c:1257
#7  0x00007ffff65149ea in wxEventLoop::Run() () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-2.8.so.0
#8  0x00007ffff659e8ab in wxAppBase::MainLoop() () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-2.8.so.0
#9  0x00007ffff5e1d2fa in wxEntry(int&, wchar_t**) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-2.8.so.0
#10 0x0000000000441452 in main (argc=1, argv=<optimized out>) at ../../src/amule-gui.cpp:93

if you prefer a bug on mantis, just let me know and I'll report it there too.

Regards,
morph
Logged

GonoszTopi

  • The current man in charge of most things.
  • Administrator
  • Hero Member
  • *****
  • Karma: 169
  • Offline Offline
  • Posts: 2685

Just for the log (and a reminder for myself): git commit 1a369e47 is svn revision 10835.
Logged
concordia cum veritate

GonoszTopi

  • The current man in charge of most things.
  • Administrator
  • Hero Member
  • *****
  • Karma: 169
  • Offline Offline
  • Posts: 2685

Found seemingly this bug already reported:

[1] amule rev 10395 crashes on Unbuntu lucid.
[2] amd x64 ubuntu -24 kernel running svn 10424
[3] Crashes aMule 2.3.1 compiled with wxGTK2 v2.9.3

More reports may exists, I didn't bother looking deeper. So the bug is not new and also is not resolved, unfortunately.

However, one thing hit my eyes while looking through these old reports: In [1] and [2] there are these lines:
Code: [Select]
#11 0x0813d932 in CEMSocket::Send (this=0x97f9898, maxNumberOfBytesToSend=536, minFragSize=536, onlyAllowedToSendControlPacket=true) at EMSocket.cpp:572
#12 0x080ea8ec in CEMSocket::SendControlData (this=0x97f9898, maxNumberOfBytesToSend=66, minFragSize=536) at EMSocket.h:69
and
Code: [Select]
#8  0x000000000051e4d8 in CEMSocket::Send (this=0x823bfa0, maxNumberOfBytesToSend=536, minFragSize=536, onlyAllowedToSendControlPacket=true) at EMSocket.cpp:572
#9  0x00000000004bd6a8 in CEMSocket::SendControlData (this=0x823bfa0, maxNumberOfBytesToSend=7, minFragSize=536) at EMSocket.h:69

which is quite interesting, knowing that CEMSocket::SendControlData does nothing but passes on its arguments to CEMSocket::Send.
Code: [Select]
69 virtual SocketSentBytes SendControlData(uint32 maxNumberOfBytesToSend, uint32 minFragSize) { return Send(maxNumberOfBytesToSend, minFragSize, true); };

This cannot be checked in the debian backtrace, because the value is optimized out...


[1] and [2] is crashing on a __pthread_mutex_lock call, where the mutex value is plain garbage
Code: [Select]
Program received signal SIGSEGV, Segmentation fault.
__pthread_mutex_lock (mutex=0x7) at pthread_mutex_lock.c:50
and
Code: [Select]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffe6ca5700 (LWP 19703)]
__pthread_mutex_lock (mutex=0x545345445f45435a) at pthread_mutex_lock.c:50
(in the latter case the mutex value is an ASCII string reading 'ZCE_DEST')

I guess the different place for the crash is the consequence of the time elapsed and the libraries changed since. I'm not sure where the actual bug lies, in aMule, in wxWidgets, in glib or somewhere else (note that for [1] a kernel change seemingly solved the problem).
Logged
concordia cum veritate