aMule Forum

English => aMule crashes => Topic started by: yabbies on August 14, 2008, 02:53:23 PM

Title: GLib Warning
Post by: yabbies on August 14, 2008, 02:53:23 PM
My amule has been crashing in hibernation
got this error message when checking for problems
I know there is a bad file command in line 9 but not sure where to go from here
can anyone help please?
much thanks


(amule:5910): GLib-WARNING **: /build/buildd/glib2.0-2.16.4/glib/giounix.c:400Error while getting flags for FD: Bad file descriptor (9)
Title: Re: GLib Warning
Post by: llama on November 09, 2008, 10:39:45 AM
 My amule (full gui version, not the separate frontend or backend) crashed in the same place.  Although this has nothing to do with hibernation for me.

 It may be a race condition, because I did have some serious disk activity.  (I accidentally held down Print Screen for several seconds while running GNOME, which started a flood of gnome-print-screen processes.  My machine didn't start thrashing, since I have plenty of RAM, but it got pretty bogged down for a while.  I run nice ionice -n6 amule, so amule probably ended up waiting for a while.  I don't know for sure if amule crashed right while I was doing that, since that load spike happened for maybe a couple minutes in a maybe 2 hour window where I didn't check on amule.

Code: [Select]
(amule:21943): GLib-WARNING **: /build/buildd/glib2.0-2.18.2/glib/giounix.c:400Error while getting flags for FD: Bad file descriptor (9)

FD 9 is the control socket:  ll /proc/.../fd, and lsof:
lrwx------ 1 peter-unpriv peter 64 2008-11-09 04:51 /proc/21943/fd/9 -> socket:[9028141]
amule   21943 peter-unpriv    9u  IPv4            9028141                  TCP localhost:4712 (LISTEN)

 I use amule v2.2.2 (--enable-debug, with wxGTK 2.8.9 both built with -D__WXDEBUG__), on AMD64 Ubuntu Intrepid (gcc 4.3) on a dual-core Intel CPU.  I run amule inside a Xvnc.

 amule was just sitting there, not iconified, showing the transfers window.  There were 39 incomplete downloads, 7 of those in the stopped state, and a few others that will probably never find any sources.  (none of the downloads have more than a few sources, and are coming in _very_ slowly.)  I'm sharing ~2800 files.

 I didn't connect to port 4712 on purpose, and I'd be very surprised if anything else I was doing on the machine connected to localhost:4712.  I was browsing the web with firefox for some of the time window amule crashed in, so it's _possible_ something might have had a localhost:4712 URL!  I'm pretty confident my network is secure, and I run amule on a machine in my LAN with ports tcp:14662, udp:14665, and udp:14672 forwarded from my Linux firewall/server machine.

Code: [Select]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffd77991780 (LWP 21943)]
0x00007ffd7649e0cd in _GSocket_GDK_Input (data=0x5a2ea00, source=82, condition=GDK_INPUT_WRITE) at ../src/gtk/gsockgtk.cpp:36
36          socket->Detected_Write();
Current language:  auto; currently c++
(gdb) thread apply all bt full

Thread 4 (Thread 0x422a3950 (LWP 21967)):
#0  0x00007ffd775a155d in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
No symbol table info available.  (forgot to  set env LD_LIBRARY_PATH=/usr/lib/debug...)
#1  0x00007ffd75d64fdd in wxConditionInternal::WaitTimeout (this=0x7ffd64000a40, milliseconds=100)
    at ../src/unix/threadpsx.cpp:405
        curtime = {m_ll = 1226214946230}
        temp = {m_ll = 230}
        sec = 1226214946
        millis = 230
        tspec = {tv_sec = 1226214946, tv_nsec = 230000000}
        err = 0
#2  0x00007ffd75d650a9 in wxCondition::WaitTimeout (this=0x7ffd640009d8, milliseconds=100) at ../include/wx/thrimpl.cpp:256
        __FUNCTION__ = "WaitTimeout"
#3  0x00007ffd75d65d5b in wxSemaphoreInternal::WaitTimeout (this=0x7ffd640009d0, milliseconds=100)
    at ../src/unix/threadpsx.cpp:552
        elapsed = {m_ll = 0}
        remainingTime = 100
        locker = {m_isOk = true, m_mutex = @0x7ffd640009d0}
        startTime = {m_ll = 1226214946130}
#4  0x00007ffd75d65e3f in wxSemaphore::WaitTimeout (this=0x10b1d30, milliseconds=100) at ../include/wx/thrimpl.cpp:320
        __FUNCTION__ = "WaitTimeout"
#5  0x000000000068e008 in CTimerThread::Entry (this=0x10b1cf0) at ../../src/Timer.cpp:64
        now = 18446744073709551100
        sinceLast = 3640461
        timeout = 0
        evt = {<wxEvent> = {<wxObject> = {_vptr.wxObject = 0x821b10, static ms_classInfo = {m_className = 0x7ffd75da40e0,
        m_objectSize = 16, m_objectConstructor = 0, m_baseInfo1 = 0x0, m_baseInfo2 = 0x0, static sm_first = 0x7ffd76cacb80,
        m_next = 0x7ffd7601a940, static sm_classTable = 0x10384d0}, m_refData = 0x0}, m_eventObject = 0x0, m_eventType = 10244,
    m_timeStamp = 0, m_id = 6128, m_callbackUserData = 0x0, m_propagationLevel = 0, m_skipped = false, m_isCommandEvent = false,
    static ms_classInfo = {m_className = 0x7ffd75dbba30, m_objectSize = 64, m_objectConstructor = 0,
      m_baseInfo1 = 0x7ffd7601a840, m_baseInfo2 = 0x0, static sm_first = 0x7ffd76cacb80, m_next = 0x7ffd7601c7e0,
      static sm_classTable = 0x10384d0}}, <No data fields>}
        lastEvent = 2149266770
#6  0x00007ffd75d66f32 in wxThreadInternal::PthreadStart (thread=0x10b1cf0) at ../src/unix/threadpsx.cpp:766
        __clframe = {__cancel_routine = 0x7ffd75d66de2 <wxPthreadCleanup>, __cancel_arg = 0x10b1cf0, __do_it = 1,
  __cancel_type = 0}
        pthread = (wxThreadInternal *) 0x10b1ad0
        rc = 0
        dontRunAtAll = false
        __FUNCTION__ = "PthreadStart"
#7  0x00007ffd75d67092 in wxPthreadStart (ptr=0x10b1cf0) at ../src/unix/threadpsx.cpp:718
No locals.
#8  0x00007ffd7759d3ea in start_thread () from /lib/libpthread.so.0
#9  0x00007ffd74fb1c6d in clone () from /lib/libc.so.6
#10 0x0000000000000000 in ?? ()

Thread 2 (Thread 0x40c62950 (LWP 21949)):
#0  0x00007ffd775a4851 in nanosleep () from /lib/libpthread.so.0
#1  0x00007ffd75d71992 in wxMicroSleep (microseconds=71000) at ../src/unix/utilsunx.cpp:191
        tmReq = {tv_sec = 0, tv_nsec = 71000000}
#2  0x00007ffd75d719b0 in wxMilliSleep (milliseconds=71) at ../src/unix/utilsunx.cpp:212
No locals.
#3  0x00007ffd75d64d31 in wxThread::Sleep (milliseconds=71) at ../src/unix/threadpsx.cpp:986
No locals.
#4  0x0000000000559891 in UploadBandwidthThrottler::Entry (this=0x2644910) at ../../src/UploadBandwidthThrottler.cpp:324
        timeSinceLastLoop = 0
        minFragSize = 1300
        doubleSendSize = 2600
        bytesToSpend = 12
        sleepTime = 71
        thisLoopTick = 2149266763
        lastLoopTick = 2149266763
        realBytesToSpend = -2587465
        allowedDataRate = 36864
        rememberedSlotCounter = 4
        extraSleepTime = 1
        sendLock = {m_isOk = 208, m_mutex = @0x7ffd75d021a9}
#5  0x00007ffd75d66f32 in wxThreadInternal::PthreadStart (thread=0x2644910) at ../src/unix/threadpsx.cpp:766
        __clframe = {__cancel_routine = 0x7ffd75d66de2 <wxPthreadCleanup>, __cancel_arg = 0x2644910, __do_it = 1,
  __cancel_type = 0}
        pthread = (wxThreadInternal *) 0x2421320
        rc = 0
        dontRunAtAll = false
        __FUNCTION__ = "PthreadStart"
#6  0x00007ffd75d67092 in wxPthreadStart (ptr=0x2644910) at ../src/unix/threadpsx.cpp:718
No locals.
#7  0x00007ffd7759d3ea in start_thread () from /lib/libpthread.so.0
#8  0x00007ffd74fb1c6d in clone () from /lib/libc.so.6
#9  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7ffd77991780 (LWP 21943)):
#0  0x00007ffd7649e0cd in _GSocket_GDK_Input (data=0x5a2ea00, source=82, condition=GDK_INPUT_WRITE) at ../src/gtk/gsockgtk.cpp:36
        socket = (class GSocket *) 0x5a2ea00
#1  0x00007ffd7446280f in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#2  0x00007ffd7297bd3b in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#3  0x00007ffd7297f50d in ?? () from /usr/lib/libglib-2.0.so.0
#4  0x00007ffd7297fa3d in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#5  0x00007ffd7480c7a7 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#6  0x00007ffd7649bfa9 in wxEventLoop::Run (this=0x7ffd64000c80) at ../src/gtk/evtloop.cpp:76
        activate = {m_evtLoopOld = 0x0}
        exitcode = 32765
        __FUNCTION__ = "Run"
#7  0x00007ffd7653cb00 in wxAppBase::MainLoop (this=0x1075080) at ../src/common/appcmn.cpp:312
        mainLoop = {<wxEventLoopPtr> = {m_ptr = 0x7ffd64000c80}, m_pp = 0x10750f8, m_pOld = 0x0}
#8  0x00007ffd7653c89d in wxAppBase::OnRun (this=0x1075080) at ../src/common/appcmn.cpp:367
No locals.
#9  0x00007ffd75cf0eee in wxEntry (argc=@0x7ffd76019470, argv=0x1062de0) at ../src/common/init.cpp:460
        callOnExit = {<No data fields>}
        cleanupOnExit = {<No data fields>}
#10 0x00007ffd75cf1124 in wxEntry (argc=@0x7fff7f9d0fa4, argv=0x7fff7f9d1078) at ../src/common/init.cpp:472
No locals.
#11 0x00000000005ba202 in main (argc=1, argv=0x52) at ../../src/amule-gui.cpp:95
No locals.


(gdb) fr
#0  0x00007ffd7649e0cd in _GSocket_GDK_Input (data=0x5a2ea00, source=82, condition=GDK_INPUT_WRITE) at ../src/gtk/gsockgtk.cpp:36
36          socket->Detected_Write();
(gdb) l
31        GSocket *socket = (GSocket *)data;
32
33        if (condition & GDK_INPUT_READ)
34          socket->Detected_Read();
35        if (condition & GDK_INPUT_WRITE)
36          socket->Detected_Write();
37      }
38      }
39
40      bool GSocketGUIFunctionsTableConcrete::CanUseEventLoop()

(gdb) p *socket
$2 = {_vptr.GSocket = 0x0, m_ok = 134, m_fd = 84, m_local = 0x7e00000000, m_peer = 0xe700000586, m_error = GSOCK_NOERROR,
  m_non_blocking = 17, m_server = true, m_stream = false, m_establishing = false, m_reusable = 134, m_timeout = 2615635083264,
  m_detected = 1414, m_cbacks = {0x50, 0x28600000586, 0x27600000000, 0x28600000586}, m_data = {
    0x27600000000 <Address 0x27600000000 out of bounds>, 0x28600000586 <Address 0x28600000586 out of bounds>,
    0x4b3351052430326a <Address 0x4b3351052430326a out of bounds>, 0x5b10e <Address 0x5b10e out of bounds>},
  m_gui_dependent = 0x7ffd717a2770 "L\211d$ðL\211l$øI\211üH\211\\$àH\211l$èH\203ì(H\205öI\211õt]\213W0\211Ð\vG(\203è\001tp\203\177\f\002\017\204\226"}

(gdb) c
...
----------------------------=| BACKTRACE FOLLOWS: |=----------------------------
Current version is: aMule 2.2.2 using wxGTK2 v2.8.9 (Debugging)
Running on: Linux 2.6.27-7-generic x86_64

[2] CamuleApp::OnFatalException() in stdio2.h:99
[3] wxFatalSignalHandler in /usr/local/src/amule/wxGTK-2.8.9/buildgtk/lib/libwx_baseud-2.8.so.0[0x7ffd75d6f078]
[4] ?? in /lib/libpthread.so.0 [0x7ffd775a50f0]
[5] ?? in /usr/local/src/amule/wxGTK-2.8.9/buildgtk/lib/libwx_gtk2ud_core-2.8.so.0 [0x7ffd7649e0cd]
[6] ?? in /usr/lib/libgdk-x11-2.0.so.0 [0x7ffd7446280f]
[7] g_main_context_dispatch in /usr/lib/libglib-2.0.so.0[0x7ffd7297bd3b]
[8] ?? in /usr/lib/libglib-2.0.so.0 [0x7ffd7297f50d]
[9] g_main_loop_run in /usr/lib/libglib-2.0.so.0[0x7ffd7297fa3d]
[10] gtk_main in /usr/lib/libgtk-x11-2.0.so.0[0x7ffd7480c7a7]
[11] wxEventLoop::Run() in /usr/local/src/amule/wxGTK-2.8.9/buildgtk/lib/libwx_gtk2ud_core-2.8.so.0[0x7ffd7649bfa9]
[12] wxAppBase::MainLoop() in /usr/local/src/amule/wxGTK-2.8.9/buildgtk/lib/libwx_gtk2ud_core-2.8.so.0[0x7ffd7653cb00]
[13] wxAppBase::OnRun() in /usr/local/src/amule/wxGTK-2.8.9/buildgtk/lib/libwx_gtk2ud_core-2.8.so.0[0x7ffd7653c89d]
[14] wxEntry(int&, wchar_t**) in /usr/local/src/amule/wxGTK-2.8.9/buildgtk/lib/libwx_baseud-2.8.so.0[0x7ffd75cf0eee]
[15] wxEntry(int&, char**) in /usr/local/src/amule/wxGTK-2.8.9/buildgtk/lib/libwx_baseud-2.8.so.0[0x7ffd75cf1124]
[16] main in amule-gui.cpp:95
[17] __libc_start_main in /lib/libc.so.6[0x7ffd74ee9466]
[18] _start in /usr/local/src/amule/amule-2.2.2/debian/tmp/usr/bin/amule [0x4511d9]


--------------------------------------------------------------------------------

Program received signal SIGABRT, Aborted.
0x00007ffd74efdfd5 in raise () from /lib/libc.so.6