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 3

Author Topic: Latest amule svn w/wx 2.8.12 still crashes  (Read 28476 times)

staxx

  • Approved Newbie
  • *
  • Karma: 8
  • Offline Offline
  • Posts: 29
Latest amule svn w/wx 2.8.12 still crashes
« on: April 13, 2011, 03:56:35 PM »

Hello everybody.

I got latest wxGTK 2.8.12, compiled it with --disable-optimize; compiled amule svn 10525 build with --enable-debug --disable-optimize, but I still experience regular crashes.

Here is backtraces. Other package versions are same as in post http://forum.amule.org/index.php?topic=18777.0. Note that amule usually uses something like 600 mb virtual & 90-120 mb resident ram on my system, so I run it with wrapper which sets limits
ulimit -m 1048576 # 1 gb resident max
ulimit -v 3145728 # 3 gb virtual max
so amule is killed before it starts to eat lots of memory and swap heavily, just in case (though it doesn't seem to happen in latest versions). I'm not sure if this crash happened under these conditions (coredump size is 1.6 gb) but I just, well, can't allow amule to hog more resources.


Code: [Select]
Program terminated with signal 6, Aborted.
#0  0x00000030ece329e5 in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
64   return INLINE_SYSCALL (tgkill, 3, pid, selftid, sig);
Missing separate debuginfos, use: debuginfo-install gvfs-1.4.3-12.el6.x86_64 libart_lgpl-2.3.20-5.1.el6.x86_64 libcroco-0.6.2-5.el6.x86_64 libgnomecanvas-2.26.0-4.el6.x86_64 libgnomeprint22-2.18.6-4.el6.x86_64 libgnomeprintui22-2.18.4-3.el6.x86_64 libgsf-1.14.15-5.el6.x86_64 librsvg2-2.26.0-5.el6.x86_64 libxml2-2.7.6-1.el6.x86_64
(gdb)
(gdb) bt
#0  0x00000030ece329e5 in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1  0x00000030ece341c5 in abort () at abort.c:92
#2  0x000000000073975f in CFileAreaSigHandler::Handler (sig=11, info=0x7fff1ef892b0, ctx=0x7fff1ef89180) at FileArea.cpp:128
#3  <signal handler called>
#4  wxString::UngetWriteBuf (this=0x7fff1ef89750, nLen=0) at src/common/string.cpp:1104
#5  0x00007f8833d95fe9 in ~wxStringBuffer (this=0x7fff1ef89750, pszFormat=0x7e0938 L"%d", argptr=0x7fff1ef89670)
    at include/wx/string.h:1510
#6  wxString::PrintfV(const wxChar *, typedef __va_list_tag __va_list_tag *) (this=0x7fff1ef89750, pszFormat=0x7e0938 L"%d", argptr=
    0x7fff1ef89670) at src/common/string.cpp:1895
#7  0x00007f8833d9623c in wxString::Format (pszFormat=<value optimized out>) at src/common/string.cpp:1810
#8  0x00000000004771e2 in wxString::operator<< (this=0x7fff1ef897f0, i=<value optimized out>) at /usr/include/wx-2.8/wx/string.h:1061
#9  0x000000000063af8f in CLogger::AddLogLine (this=0xcd6c40, file=..., line=239, critical=false, type=<value optimized out>,
    str=<value optimized out>, toStdout=true, toGUI=true) at Logger.cpp:149
#10 0x000000000045d04b in CamuleApp::OnExit (this=0x2521960) at amule.cpp:239
#11 0x00007f8833d78200 in ~CallOnExit (argc=<value optimized out>, argv=<value optimized out>) at src/common/init.cpp:442
#12 wxEntry (argc=<value optimized out>, argv=<value optimized out>) at src/common/init.cpp:448
#13 0x00000000005c98e2 in main (argc=1, argv=<value optimized out>) at amule-gui.cpp:93
(gdb) bt full
#0  0x00000030ece329e5 in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
        resultvar = 0
        pid = <value optimized out>
        selftid = 1232
#1  0x00000030ece341c5 in abort () at abort.c:92
        save_stage = 2
        act = {__sigaction_handler = {sa_handler = 0x7f8834067955, sa_sigaction = 0x7f8834067955}, sa_mask = {__val = {9462727472,
    210248880640, 140222965119305, 140733712996080, 140733712994400, 210132560720, 140222961418240, 140222965112597, 4294967295,
    140222965072688, 5, 13026768, 0, 0, 1, 0}}, sa_flags = -329195776, sa_restorer = 0x5}
        sigs = {__val = {32, 0 <repeats 15 times>}}
#2  0x000000000073975f in CFileAreaSigHandler::Handler (sig=11, info=0x7fff1ef892b0, ctx=0x7fff1ef89180) at FileArea.cpp:128
        cur = 0x0
        sa = <value optimized out>
#3  <signal handler called>
No symbol table info available.
#4  wxString::UngetWriteBuf (this=0x7fff1ef89750, nLen=0) at src/common/string.cpp:1104
        pData = 0x7f8833debbc0
#5  0x00007f8833d95fe9 in ~wxStringBuffer (this=0x7fff1ef89750, pszFormat=0x7e0938 L"%d", argptr=0x7fff1ef89670)
    at include/wx/string.h:1510
No locals.
#6  wxString::PrintfV(const wxChar *, typedef __va_list_tag __va_list_tag *) (this=0x7fff1ef89750, pszFormat=0x7e0938 L"%d", argptr=
    0x7fff1ef89670) at src/common/string.cpp:1895
        tmp = {m_str = @0x7fff1ef89750, m_buf = 0x0}
        buf = 0x0
        argptrcopy = {{gp_offset = 469762048, fp_offset = 32648, overflow_arg_area = 0x68, reg_save_area = 0x0}}
        len = <value optimized out>
        size = 1024
#7  0x00007f8833d9623c in wxString::Format (pszFormat=<value optimized out>) at src/common/string.cpp:1810
        argptr = {{gp_offset = 16, fp_offset = 48, overflow_arg_area = 0x7fff1ef89750, reg_save_area = 0x7fff1ef89690}}
        s = {<wxStringBase> = {static npos = 18446744073709551615, m_pchData =
    0x7fff1ef89750 L"\x33debbd8\u7f88\x1ef897f0\u7fff"}, <No data fields>}
#8  0x00000000004771e2 in wxString::operator<< (this=0x7fff1ef897f0, i=<value optimized out>) at /usr/include/wx-2.8/wx/string.h:1061
No locals.
#9  0x000000000063af8f in CLogger::AddLogLine (this=0xcd6c40, file=..., line=239, critical=false, type=<value optimized out>,
    str=<value optimized out>, toStdout=true, toGUI=true) at Logger.cpp:149
        msg = {<wxStringBase> = {static npos = 18446744073709551615, m_pchData =
    0x260ef08 L"\u0412\u044b\u0445\u043e\u0434\u0438\u043c \u0438\u0437 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f..."}, <No data fields>}
        Event = {<wxEvent> = {<wxObject> = {_vptr.wxObject = 0x0, static ms_classInfo = {m_className = 0x7f8833deaa28 L"wxObject",
                m_objectSize = 16, m_objectConstructor = 0, m_baseInfo1 = 0x0, m_baseInfo2 = 0x0, static sm_first = 0x7f8834b53860,
                m_next = 0x7f88340395c0, static sm_classTable = 0x24d9030}, m_refData = 0x90}, m_eventObject = 0x0, m_eventType = 0,
            m_timeStamp = 0, m_id = 7, m_callbackUserData = 0x7c0000005b, m_propagationLevel = 119, m_skipped = 110, m_isCommandEvent =
---Type <return> to continue, or q <return> to quit---
    false, static ms_classInfo = {m_className = 0x7f8833df0a18 L"wxEvent", m_objectSize = 64, m_objectConstructor = 0, m_baseInfo1 =
    0x7f88340394e0, m_baseInfo2 = 0x0, static sm_first = 0x7f8834b53860, m_next = 0x7f883403b4a0, static sm_classTable = 0x24d9030}},
          m_critical = false, m_stdout = false, m_GUI = 104, m_msg = {<wxStringBase> = {static npos = 18446744073709551615, m_pchData =
    0x7f881c000020 L""}, <No data fields>}}
#10 0x000000000045d04b in CamuleApp::OnExit (this=0x2521960) at amule.cpp:239
No locals.
#11 0x00007f8833d78200 in ~CallOnExit (argc=<value optimized out>, argv=<value optimized out>) at src/common/init.cpp:442
No locals.
#12 wxEntry (argc=<value optimized out>, argv=<value optimized out>) at src/common/init.cpp:448
        initializer = {m_ok = true}
#13 0x00000000005c98e2 in main (argc=1, argv=<value optimized out>) at amule-gui.cpp:93
No locals.
(gdb) thread apply all bt

Thread 2 (Thread 0x7f882b57f700 (LWP 1239)):
#0  0x00000030ed60ed4d in nanosleep () at ../sysdeps/unix/syscall-template.S:82
#1  0x00007f8833dcdefc in wxMicroSleep (microseconds=<value optimized out>) at src/unix/utilsunx.cpp:191
#2  0x000000000057208b in UploadBandwidthThrottler::Entry (this=0x520e1d0) at UploadBandwidthThrottler.cpp:323
#3  0x00007f8833dc94d1 in wxThreadInternal::PthreadStart (thread=0x520e1d0) at src/unix/threadpsx.cpp:766
#4  0x00000030ed6077e1 in start_thread (arg=0x7f882b57f700) at pthread_create.c:301
#5  0x00000030ecee5dcd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Thread 1 (Thread 0x7f8833ccc940 (LWP 1232)):
#0  0x00000030ece329e5 in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1  0x00000030ece341c5 in abort () at abort.c:92
#2  0x000000000073975f in CFileAreaSigHandler::Handler (sig=11, info=0x7fff1ef892b0, ctx=0x7fff1ef89180) at FileArea.cpp:128
#3  <signal handler called>
#4  wxString::UngetWriteBuf (this=0x7fff1ef89750, nLen=0) at src/common/string.cpp:1104
#5  0x00007f8833d95fe9 in ~wxStringBuffer (this=0x7fff1ef89750, pszFormat=0x7e0938 L"%d", argptr=0x7fff1ef89670)
    at include/wx/string.h:1510
#6  wxString::PrintfV(const wxChar *, typedef __va_list_tag __va_list_tag *) (this=0x7fff1ef89750, pszFormat=0x7e0938 L"%d", argptr=
    0x7fff1ef89670) at src/common/string.cpp:1895
#7  0x00007f8833d9623c in wxString::Format (pszFormat=<value optimized out>) at src/common/string.cpp:1810
#8  0x00000000004771e2 in wxString::operator<< (this=0x7fff1ef897f0, i=<value optimized out>) at /usr/include/wx-2.8/wx/string.h:1061
#9  0x000000000063af8f in CLogger::AddLogLine (this=0xcd6c40, file=..., line=239, critical=false, type=<value optimized out>,
    str=<value optimized out>, toStdout=true, toGUI=true) at Logger.cpp:149
#10 0x000000000045d04b in CamuleApp::OnExit (this=0x2521960) at amule.cpp:239
#11 0x00007f8833d78200 in ~CallOnExit (argc=<value optimized out>, argv=<value optimized out>) at src/common/init.cpp:442
#12 wxEntry (argc=<value optimized out>, argv=<value optimized out>) at src/common/init.cpp:448
#13 0x00000000005c98e2 in main (argc=1, argv=<value optimized out>) at amule-gui.cpp:93
Logged

btkaos

  • Global Moderator
  • Sr. Member
  • *****
  • Karma: 110
  • Offline Offline
  • Posts: 486
  • Kaos is infinite!
Re: Latest amule svn w/wx 2.8.12 still crashes
« Reply #1 on: April 13, 2011, 04:07:18 PM »

Weird. Any steps to reproduce the crash? It seems you are using some kind of Fedora system, please specify that.

Also, does the crash happens if you compile everything with --disable-debug and --enable-optimize?

Regards,
BTK
Logged

staxx

  • Approved Newbie
  • *
  • Karma: 8
  • Offline Offline
  • Posts: 29
Re: Latest amule svn w/wx 2.8.12 still crashes
« Reply #2 on: April 13, 2011, 09:50:08 PM »

This is redhat 6 system.
Versions of some packages

glibc-2.12-1.19.el6.x86_64
libstdc++-4.4.5-6.el6.x86_64
gcc-4.4.5-6.el6.x86_64
gtk2-2.18.9-6.el6.x86_64
wxGTK-2.8.12-1.el6.x86_64
cryptopp-5.6.1-4.el6.x86_64

Crash happens with amule just downloading/uploading files on some desktop, at some point it disappears, leaving coredump.

--disable-debug --enable-optimize for amule -yes, it happens, I used such version before, just rebuild it with --disable-optimize now to get possibly better crash dump.
I don't think wxGTK was ever built with --enable-optimize, because it seems that --disable-optimize is typical for fedora and epel wxGTK builds. However it doesn't mean that optimization flags aren't used, as rpm sets typical optimization flags anyway. I really don't know why it's build this way, it's just the way wxGTK is always built lately for these systems by package maintainers.
Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: Latest amule svn w/wx 2.8.12 still crashes
« Reply #3 on: April 14, 2011, 12:01:51 AM »

Not really a crash. Looks like it got killed and somehow stumbled on shutdown (shutting it down proper is not trivial and may easily fail when it gets killed). Question is, why is it still eating so much memory?
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

staxx

  • Approved Newbie
  • *
  • Karma: 8
  • Offline Offline
  • Posts: 29
Re: Latest amule svn w/wx 2.8.12 still crashes
« Reply #4 on: April 14, 2011, 10:52:11 AM »

Here is another one, crashed few hours after starting. This coredump is small, so amule wasn't killed because of memory limit:

Code: [Select]
Core was generated by `/usr/bin/amule'.
Program terminated with signal 6, Aborted.
#0  0x00000030ece329e5 in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
64   return INLINE_SYSCALL (tgkill, 3, pid, selftid, sig);
Missing separate debuginfos, use: debuginfo-install libart_lgpl-2.3.20-5.1.el6.x86_64 libgnomecanvas-2.26.0-4.el6.x86_64 libgnomeprint22-2.18.6-4.el6.x86_64 libgnomeprintui22-2.18.4-3.el6.x86_64 libxml2-2.7.6-1.el6.x86_64
(gdb) bt
#0  0x00000030ece329e5 in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1  0x00000030ece341c5 in abort () at abort.c:92
#2  0x000000000073975f in CFileAreaSigHandler::Handler (sig=11, info=0x7fff3d4028f0, ctx=0x7fff3d4027c0)
    at FileArea.cpp:128
#3  <signal handler called>
#4  0x0000000008231880 in ?? ()
#5  0x00000030f822462f in gdk_io_invoke (source=<value optimized out>, condition=<value optimized out>, data=
    0x7fd588001880) at gdkevents.c:1082
#6  0x00000030eca38f0e in g_main_dispatch (context=0x194bf30) at gmain.c:1960
#7  IA__g_main_context_dispatch (context=0x194bf30) at gmain.c:2513
#8  0x00000030eca3c938 in g_main_context_iterate (context=0x194bf30, block=1, dispatch=1,
    self=<value optimized out>) at gmain.c:2591
#9  0x00000030eca3cd55 in IA__g_main_loop_run (loop=0x552f280) at gmain.c:2799
#10 0x00000030f974c2c7 in IA__gtk_main () at gtkmain.c:1218
#11 0x00000036bbfe78f8 in wxEventLoop::Run (this=0x19f2a80) at src/gtk/evtloop.cpp:76
#12 0x00000036bc06216b in wxAppBase::MainLoop (this=0x194b960) at src/common/appcmn.cpp:312
#13 0x00000036bb6961c5 in wxEntry (argc=<value optimized out>, argv=<value optimized out>)
    at src/common/init.cpp:448
#14 0x00000000005c98e2 in main (argc=1, argv=<value optimized out>) at amule-gui.cpp:93
(gdb) bt full
#0  0x00000030ece329e5 in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
        resultvar = 0
        pid = <value optimized out>
        selftid = 24495
#1  0x00000030ece341c5 in abort () at abort.c:92
        save_stage = 2
        act = {__sigaction_handler = {sa_handler = 0x1, sa_sigaction = 0x1}, sa_mask = {__val = {1, 26619152, 0,
    79, 210166197551, 26619152, 0, 79, 210166197551, 0, 210128513053, 1, 75925488, 1, 26619152,
    140734221002800}}, sa_flags = 79, sa_restorer = 0x30ecce5180 <g_threads_got_initialized>}
        sigs = {__val = {32, 0 <repeats 15 times>}}
#2  0x000000000073975f in CFileAreaSigHandler::Handler (sig=11, info=0x7fff3d4028f0, ctx=0x7fff3d4027c0)
    at FileArea.cpp:128
        cur = 0x0
        sa = <value optimized out>
#3  <signal handler called>
No symbol table info available.
#4  0x0000000008231880 in ?? ()
No symbol table info available.
#5  0x00000030f822462f in gdk_io_invoke (source=<value optimized out>, condition=<value optimized out>, data=
    0x7fd588001880) at gdkevents.c:1082
        closure = 0x7fd588001880
        gdk_cond = GDK_INPUT_WRITE
#6  0x00000030eca38f0e in g_main_dispatch (context=0x194bf30) at gmain.c:1960
        dispatch = 0x30eca6e2f0 <g_io_unix_dispatch>
        was_in_call = 0
        user_data = 0x7fd588001880
        callback = 0x30f82245e0 <gdk_io_invoke>
        cb_funcs = 0x30ecce4970
        cb_data = 0x7fd588002630
        current_source_link = {data = 0x7fd5880026a0, next = 0x0}
        need_destroy = <value optimized out>
        source = 0x7fd5880026a0
        current = 0x46a4340
        i = <value optimized out>
---Type <return> to continue, or q <return> to quit---
#7  IA__g_main_context_dispatch (context=0x194bf30) at gmain.c:2513
No locals.
#8  0x00000030eca3c938 in g_main_context_iterate (context=0x194bf30, block=1, dispatch=1,
    self=<value optimized out>) at gmain.c:2591
        max_priority = 2147483647
        timeout = 9
        some_ready = 1
        nfds = 523
        allocated_nfds = <value optimized out>
        fds = <value optimized out>
        __PRETTY_FUNCTION__ = "g_main_context_iterate"
#9  0x00000030eca3cd55 in IA__g_main_loop_run (loop=0x552f280) at gmain.c:2799
        self = 0x194cd80
        __PRETTY_FUNCTION__ = "IA__g_main_loop_run"
#10 0x00000030f974c2c7 in IA__gtk_main () at gtkmain.c:1218
        tmp_list = <value optimized out>
        functions = 0x0
        init = <value optimized out>
        loop = 0x552f280
#11 0x00000036bbfe78f8 in wxEventLoop::Run (this=0x19f2a80) at src/gtk/evtloop.cpp:76
        activate = {m_evtLoopOld = 0x0}
        exitcode = <value optimized out>
#12 0x00000036bc06216b in wxAppBase::MainLoop (this=0x194b960) at src/common/appcmn.cpp:312
        mainLoop = {<wxEventLoopPtr> = {m_ptr = 0x19f2a80}, m_pp = 0x194b9d8, m_pOld = 0x0}
#13 0x00000036bb6961c5 in wxEntry (argc=<value optimized out>, argv=<value optimized out>)
    at src/common/init.cpp:448
        initializer = {m_ok = true}
#14 0x00000000005c98e2 in main (argc=1, argv=<value optimized out>) at amule-gui.cpp:93
No locals.
(gdb) thread apply all bt

Thread 3 (Thread 0x7fd597285700 (LWP 24512)):
#0  pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:216
#1  0x00000036bb6e5be6 in wxConditionInternal::WaitTimeout (this=0x1a39130, milliseconds=100)
    at src/unix/threadpsx.cpp:405
#2  0x00000036bb6e7063 in wxSemaphoreInternal::WaitTimeout (this=0x510dfc0, milliseconds=100)
    at src/unix/threadpsx.cpp:552
#3  0x00000000006987bd in CTimerThread::Entry (this=0x5520710) at Timer.cpp:66
#4  0x00000036bb6e74d1 in wxThreadInternal::PthreadStart (thread=0x5520710) at src/unix/threadpsx.cpp:766
#5  0x00000030ed6077e1 in start_thread (arg=0x7fd597285700) at pthread_create.c:301
#6  0x00000030ecee5dcd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Thread 2 (Thread 0x7fd59cba7700 (LWP 24508)):
#0  0x00000030ed60ed4d in nanosleep () at ../sysdeps/unix/syscall-template.S:82
#1  0x00000036bb6ebefc in wxMicroSleep (microseconds=<value optimized out>) at src/unix/utilsunx.cpp:191
#2  0x000000000057208b in UploadBandwidthThrottler::Entry (this=0x4652fc0) at UploadBandwidthThrottler.cpp:323
#3  0x00000036bb6e74d1 in wxThreadInternal::PthreadStart (thread=0x4652fc0) at src/unix/threadpsx.cpp:766
#4  0x00000030ed6077e1 in start_thread (arg=0x7fd59cba7700) at pthread_create.c:301
#5  0x00000030ecee5dcd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Thread 1 (Thread 0x7fd5a52f1940 (LWP 24495)):
#0  0x00000030ece329e5 in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1  0x00000030ece341c5 in abort () at abort.c:92
#2  0x000000000073975f in CFileAreaSigHandler::Handler (sig=11, info=0x7fff3d4028f0, ctx=0x7fff3d4027c0)
    at FileArea.cpp:128
#3  <signal handler called>
#4  0x0000000008231880 in ?? ()
#5  0x00000030f822462f in gdk_io_invoke (source=<value optimized out>, condition=<value optimized out>, data=
    0x7fd588001880) at gdkevents.c:1082
#6  0x00000030eca38f0e in g_main_dispatch (context=0x194bf30) at gmain.c:1960
#7  IA__g_main_context_dispatch (context=0x194bf30) at gmain.c:2513
#8  0x00000030eca3c938 in g_main_context_iterate (context=0x194bf30, block=1, dispatch=1,
    self=<value optimized out>) at gmain.c:2591
#9  0x00000030eca3cd55 in IA__g_main_loop_run (loop=0x552f280) at gmain.c:2799
---Type <return> to continue, or q <return> to quit---
#10 0x00000030f974c2c7 in IA__gtk_main () at gtkmain.c:1218
#11 0x00000036bbfe78f8 in wxEventLoop::Run (this=0x19f2a80) at src/gtk/evtloop.cpp:76
#12 0x00000036bc06216b in wxAppBase::MainLoop (this=0x194b960) at src/common/appcmn.cpp:312
#13 0x00000036bb6961c5 in wxEntry (argc=<value optimized out>, argv=<value optimized out>)
    at src/common/init.cpp:448
#14 0x00000000005c98e2 in main (argc=1, argv=<value optimized out>) at amule-gui.cpp:93
Logged

btkaos

  • Global Moderator
  • Sr. Member
  • *****
  • Karma: 110
  • Offline Offline
  • Posts: 486
  • Kaos is infinite!
Re: Latest amule svn w/wx 2.8.12 still crashes
« Reply #5 on: April 14, 2011, 11:30:58 AM »

Here is another one, crashed few hours after starting. This coredump is small, so amule wasn't killed because of memory limit:

Code: [Select]
#3  <signal handler called>
#4  0x0000000008231880 in ?? ()
#5  0x00000030f822462f in gdk_io_invoke (source=<value optimized out>, condition=<value optimized out>, data=
    0x7fd588001880) at gdkevents.c:1082
#6  0x00000030eca38f0e in g_main_dispatch (context=0x194bf30) at gmain.c:1960
#7  IA__g_main_context_dispatch (context=0x194bf30) at gmain.c:2513
#8  0x00000030eca3c938 in g_main_context_iterate (context=0x194bf30, block=1, dispatch=1,
    self=<value optimized out>) at gmain.c:2591
Umm, more glib context corruption problems. The problem may be complicated to debug, as wxsockets layer mess with events in every read and write. (which is part of the bad performance of aMule)

Every read performs a Disable/Enable pair, and in some place the context gets corrupted. We have another race in wx no doubt. (Assuming the user did really use wx 2.8.12, maybe static linking prevented that)

We should check that those operations are really thread safe.
Logged

btkaos

  • Global Moderator
  • Sr. Member
  • *****
  • Karma: 110
  • Offline Offline
  • Posts: 486
  • Kaos is infinite!
Re: Latest amule svn w/wx 2.8.12 still crashes
« Reply #6 on: April 14, 2011, 04:43:56 PM »

A pointer to investigate is the following code in glib's gmain.c:

Code: [Select]
  UNLOCK_CONTEXT (context);

  current->depth++;
  /* The on-stack allocation of the GSList is unconventional, but
   * we know that the lifetime of the link is bounded to this
   * function as the link is kept in a thread specific list and
   * not manipulated outside of this function and its descendants.
   * Avoiding the overhead of a g_slist_alloc() is useful as many
   * applications do little more than dispatch events.
   *
   * This is a performance hack - do not revert to g_slist_prepend()!
   */
  current_source_link.data = source;
  current_source_link.next = current->dispatching_sources;
  current->dispatching_sources = &current_source_link;
  need_destroy = ! dispatch (source,
     callback,
     user_data);
  g_assert (current->dispatching_sources == &current_source_link);
  current->dispatching_sources = current_source_link.next;
  current->depth--;
 
  if (cb_funcs)
    cb_funcs->unref (cb_data);

    LOCK_CONTEXT (context);

This is the only place I can see the context could get corrupted. But how? I need to investigate more on wx threads and events. Note however that the upload thread may manipulate the context when doing a Read (Write too?) via Disable, so here may be the source of the crashes.

Local lock in Kry's patch may not be enough, as the context is shared for all thread, wx socket layer may need a global lock.

My explanations are not very good, please ask for more if needed.
Logged

staxx

  • Approved Newbie
  • *
  • Karma: 8
  • Offline Offline
  • Posts: 29
Re: Latest amule svn w/wx 2.8.12 still crashes
« Reply #7 on: April 18, 2011, 04:34:37 AM »

Well it's definitely dynamically linked with wx 2.8.12 built by me. Looks like there is more "official" build in epel-testing repository now, though I don't see a reason why it would work differently, as I used same spec.  Glib version is glib2-2.22.5-6.el6.x86_64

Is there any fix for this problem planned, or you need some more info from me? I'm getting these crashes very often, since Apr 14 amule has crashed 5 times already for me :( All the backtraces look just like these ones, sometimes with order of threads different. Function "UploadBandwidthThrottler::Entry" can be seen in all backtraces, but it would be impossible to disable upload limit, I don't want amule to hog whole channel.. I don't mind rebuilding amule with some other options, if needed, these crashes are way more annoying than anything else.
Logged

btkaos

  • Global Moderator
  • Sr. Member
  • *****
  • Karma: 110
  • Offline Offline
  • Posts: 486
  • Kaos is infinite!
Re: Latest amule svn w/wx 2.8.12 still crashes
« Reply #8 on: April 18, 2011, 05:57:01 PM »

Is there any fix for this problem planned, or you need some more info from me? I'm getting these crashes very often, since Apr 14 amule has crashed 5 times already for me :( All the backtraces look just like these ones, sometimes with order of threads different. Function "UploadBandwidthThrottler::Entry" can be seen in all backtraces, but it would be impossible to disable upload limit, I don't want amule to hog whole channel.. I don't mind rebuilding amule with some other options, if needed, these crashes are way more annoying than anything else.
staxx, I have some idea of what is causing these kind of problems, (different threads enabling/disabling events on the same socket) but the fix will be hard and take a lot of time.

For now, I recommend running amule without download limit and not a lot of files. To do so, pause the less important files and the crash should disappear. The more people you are uploading/downloading, the more likely the crash will occur.
Logged

kristof

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 20
Re: Latest amule svn w/wx 2.8.12 still crashes
« Reply #9 on: April 29, 2011, 06:30:26 AM »

Quote
staxx, I have some idea of what is causing these kind of problems, (different threads enabling/disabling events on the same socket) but the fix will be hard and take a lot of time.

I have this bug too.  aMule 2.3.1.rc1 with wx 2.8.12 on Ubuntu Maverick.  With download limit set and many downloads aMule crashes in 1-2 hours.  All bt have a thread that is inside UploadBandwidthThrottler::Entry.

Would you share your idea for a fix?  Some desperate users might to try to implement on their own while waiting for official fix. Even a temporary dirty hack we can do on our own would be better than crashes.  Maybe a global mutex in some critical places? I am not above hacking at wx. :)
Logged

btkaos

  • Global Moderator
  • Sr. Member
  • *****
  • Karma: 110
  • Offline Offline
  • Posts: 486
  • Kaos is infinite!
Re: Latest amule svn w/wx 2.8.12 still crashes
« Reply #10 on: April 29, 2011, 03:21:04 PM »

Quote
staxx, I have some idea of what is causing these kind of problems, (different threads enabling/disabling events on the same socket) but the fix will be hard and take a lot of time.

I have this bug too.  aMule 2.3.1.rc1 with wx 2.8.12 on Ubuntu Maverick.  With download limit set and many downloads aMule crashes in 1-2 hours.  All bt have a thread that is inside UploadBandwidthThrottler::Entry.

Would you share your idea for a fix?  Some desperate users might to try to implement on their own while waiting for official fix. Even a temporary dirty hack we can do on our own would be better than crashes.  Maybe a global mutex in some critical places? I am not above hacking at wx. :)
I believe that the problem is basically that the event handling/disabling code is not safe even in glib/gtk, there may be a small window somewhere.

kristof, are you sure you are using wx 2.8.12?
Logged

kristof

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 20
Re: Latest amule svn w/wx 2.8.12 still crashes
« Reply #11 on: April 29, 2011, 09:22:51 PM »

I believe that the problem is basically that the event handling/disabling code is not safe even in glib/gtk, there may be a small window somewhere.

kristof, are you sure you are using wx 2.8.12?

I will build and deploy amule on a machine that does not have wx distribution packages so that I can be completely certain.  I thought I had done this already but I see that my compile machine has distribution packages installed.  I am surprised to see until I remembered that I am lazy.  I installed complete builddeps for amule instead of installing required dependencies one by one.

Thanks for asking this!
Logged

btkaos

  • Global Moderator
  • Sr. Member
  • *****
  • Karma: 110
  • Offline Offline
  • Posts: 486
  • Kaos is infinite!
Re: Latest amule svn w/wx 2.8.12 still crashes
« Reply #12 on: April 30, 2011, 12:06:13 AM »

I believe that the problem is basically that the event handling/disabling code is not safe even in glib/gtk, there may be a small window somewhere.

kristof, are you sure you are using wx 2.8.12?

I will build and deploy amule on a machine that does not have wx distribution packages so that I can be completely certain.  I thought I had done this already but I see that my compile machine has distribution packages installed.  I am surprised to see until I remembered that I am lazy.  I installed complete builddeps for amule instead of installing required dependencies one by one.

Thanks for asking this!

kristof, you may use the ldd command in order to see what libraries you are using.
Logged

btkaos

  • Global Moderator
  • Sr. Member
  • *****
  • Karma: 110
  • Offline Offline
  • Posts: 486
  • Kaos is infinite!
Re: Latest amule svn w/wx 2.8.12 still crashes
« Reply #13 on: April 30, 2011, 12:07:28 AM »

By the way, this is difficult to fix right now because wx 2.9 had a rewrite of sockets code, so I'm waiting until wx can be built against gtk head to start writing patches.
Logged

kristof

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 20
Re: Latest amule svn w/wx 2.8.12 still crashes
« Reply #14 on: April 30, 2011, 05:30:40 PM »

I removed all distribution wx packages and rebuilt.  I am certain aMule uses wx 2.8.12 which I compile myself.  It is also verified with ldd.

There were three crashes in one evening and one over the nighttime.  I checked bt each time and all have the usual pattern with segv just after
Code: [Select]
_GSocket_GDK_Input (data=0x2db1b90, source=45, condition=GDK_INPUT_WRITE) at ./src/gtk/gsockgtk.cpp:43
Quote
By the way, this is difficult to fix right now because wx 2.9 had a rewrite of sockets code, so I'm waiting until wx can be built against gtk head to start writing patches.

It is understandable that you must wait to attack the bug.  External dependencies force such things.

Can crash probability be decreased by restricting total connection count?  I think of disabling kad, reducing maximum connection count in preferences, etc.  Else is it only the number of uploads and downloads at each instant that matters?  I understand it may be a guess!  :)
Logged
Pages: [1] 2 3