aMule Forum

English => en_Bugs => Topic started by: jpv950 on April 15, 2009, 01:22:08 AM

Title: Serious Memory Leak
Post by: jpv950 on April 15, 2009, 01:22:08 AM
Often when I have amule's window minimized and I restore it (click on the panel bar). it starts leaking memory badly and crashes (or takes down the system if the kernel doesn't kill the process). I suppose it might have something to do with WxWidgets or some other library. Is this a know bug? How can I debug this? Is there a way to see where and how memory is allocated when a process dies?

aMule 2.2.4 compiled from source using Ubuntu 9.04 beta (Linux 2.6.28-11-generic #41-Ubuntu SMP x86_64 GNU/Linux).
Title: Re: Serious Memory Leak
Post by: Stu Redman on April 18, 2009, 07:04:08 PM
How many cats do you have ?
Title: Re: Serious Memory Leak
Post by: Kry on April 18, 2009, 08:19:58 PM
(http://farm1.static.flickr.com/160/387667598_ea86c93d81.jpg)

?
Title: Re: Serious Memory Leak
Post by: Stu Redman on April 18, 2009, 09:51:55 PM
 :D

http://www.amule.org/amule/index.php?topic=16785.0
Title: Re: Serious Memory Leak
Post by: jpv950 on May 02, 2009, 11:50:51 PM
No cats. Anything else I forgot to mention?

:D

http://www.amule.org/amule/index.php?topic=16785.0

Not sure why you linked to that, it is not similar at all to what I'm experiencing.

EDIT: Just to be clear, I'm experiencing 100% memory usage. This is a serious bug that happens not infrequently and brings down the whole system. Memory exhaustion protection with the Linux kernel is awfully inadequate from my brief research.
Title: Re: Serious Memory Leak
Post by: Stu Redman on May 03, 2009, 12:20:44 AM
Just wanted to rule that issue out.
How do you know it's leaking memory? Do you get any backtrace?
Title: Re: Serious Memory Leak
Post by: jpv950 on May 03, 2009, 04:07:55 AM
Just wanted to rule that issue out.
How do you know it's leaking memory? Do you get any backtrace?

I have the Gnome system monitor applet showing the memory usage. It's not even leaking memory, it's gobbling memory. Memory usage shoots to 100% very fast (I have 4GiB of RAM), then it fills the swap file and the system hangs. I don't even have time to kill the process manually.

It's probably not a bug in aMule itself though, I just wanted to know if anyone else was having this issue and how to get a backtrace.
Title: Re: Serious Memory Leak
Post by: Kry on May 03, 2009, 06:37:00 PM
Have you compiled wx from source?
Title: Re: Serious Memory Leak
Post by: jpv950 on May 05, 2009, 10:11:11 PM
Have you compiled wx from source?

Not since upgrading to jaunty. I got a backtrace by setting ulimit in the shell.

Code: [Select]
Unexpected error.

Program received signal SIGABRT, Aborted.
[Switching to Thread 0x7f6f83e227e0 (LWP 13468)]
0x00007f6f80c72fb5 in raise () from /lib/libc.so.6
(gdb) bt
#0  0x00007f6f80c72fb5 in raise () from /lib/libc.so.6
#1  0x00007f6f80c74bc3 in abort () from /lib/libc.so.6
#2  0x00007f6f80c6bf09 in __assert_fail () from /lib/libc.so.6
#3  0x00007f6f7cce6e90 in _XSend () from /usr/lib/libX11.so.6
#4  0x00007f6f7cce6f21 in _XReply () from /usr/lib/libX11.so.6
#5  0x00007f6f7ccc4246 in XGetWindowProperty () from /usr/lib/libX11.so.6
#6  0x00007f6f80202210 in gdk_window_get_frame_extents ()
   from /usr/lib/libgdk-x11-2.0.so.0
#7  0x00007f6f8020284b in gdk_window_get_root_origin ()
   from /usr/lib/libgdk-x11-2.0.so.0
#8  0x00007f6f820ffc12 in ?? () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#9  0x00007f6f8057bdf8 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#10 0x00007f6f7ef7d27d in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#11 0x00007f6f7ef92e3b in ?? () from /usr/lib/libgobject-2.0.so.0
#12 0x00007f6f7ef942bd in g_signal_emit_valist ()
   from /usr/lib/libgobject-2.0.so.0
#13 0x00007f6f7ef94953 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#14 0x00007f6f8068409e in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#15 0x00007f6f80575811 in gtk_main_do_event ()
   from /usr/lib/libgtk-x11-2.0.so.0
#16 0x00007f6f801eef3c in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#17 0x00007f6f7e6d420a in g_main_context_dispatch ()
   from /usr/lib/libglib-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#18 0x00007f6f7e6d78e0 in ?? () from /usr/lib/libglib-2.0.so.0
#19 0x00007f6f7e6d7dad in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#20 0x00007f6f80575bc7 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#21 0x00007f6f820f5068 in wxEventLoop::Run ()
   from /usr/lib/libwx_gtk2u_core-2.8.so.0
#22 0x00007f6f8217e57b in wxAppBase::MainLoop ()
   from /usr/lib/libwx_gtk2u_core-2.8.so.0
#23 0x00007f6f81a16a8d in wxEntry () from /usr/lib/libwx_baseu-2.8.so.0
#24 0x0000000000683589 in main (argc=1, argv=0x7fff8be5d2d8)
    at amule-gui.cpp:95
Title: Re: Serious Memory Leak
Post by: Kry on May 05, 2009, 10:51:10 PM
Correlation != causation.
Title: Re: Serious Memory Leak
Post by: jpv950 on May 06, 2009, 12:50:36 AM
Correlation != causation.

I take it you mean the backtrace may not be related to this bug, but I think there is causation.

bug => amule memory usage jumps over ~2GB RAM => ulimit -v ~2GB exceeded => abort when allocating more memory

Under normal circumstances the memory usage never gets so high and the usage pattern I saw was the same as before when the system hung up (excepted the process aborted this time). Also, the crash happened again when "unminimizing" the window and the buggy call is somewhere in the wxGTK mainloop, as would be expected.

If you mean this might not happen if compiling wxGTK from source, true enough.
Title: Re: Serious Memory Leak
Post by: Kry on May 06, 2009, 12:53:34 AM
It probably won't. Please try.
Title: Re: Serious Memory Leak
Post by: jpv950 on May 06, 2009, 01:17:12 AM
I will.

I noticed this only happens when I leave the window minimized for a long time, typically overnight or after being away for the day. This makes me suspect libX11 because it seems more time dependent than the rest of the stack. It could be looping on XGetWindowProperty(). Maybe the window property gets lost after some hours. If the problem was in wx I'd expect it would be more likely to happen every time the window is unminimized. Just a thought.
Title: Re: Serious Memory Leak
Post by: jpv950 on May 06, 2009, 04:47:22 AM
Actually I suspect this is happening because I had redefined my $HOME variable to point somewhere else when running amule, to use the same settings from different systems sharing a partition and completely forgot about it until now. I have compiled wx from source too and I'll confirm later if this is solved (still a bug in the libraries though, even if it is).

Is there a safe runtime way to move $HOME/.aMule somewhere else?

This reminds me, it'd be nice if amule followed freedesktop's Base Directory Specification (http://standards.freedesktop.org/basedir-spec/latest/index.html).
Title: Re: Serious Memory Leak
Post by: jpv950 on May 10, 2009, 05:38:57 AM
Problem solved, see above. Root cause is a D-Bus session error I think. SVN build with wxGTK 2.8.10 seems very stable, no errors or warnings whatsoever. I might even try the dreaded system tray icon now.
Title: Re: Serious Memory Leak
Post by: Kry on May 10, 2009, 09:13:03 PM
Good to know. Thanks for thre reports.
Title: Re: Serious Memory Leak
Post by: jpv950 on May 12, 2009, 12:32:30 PM
Sorry it happened again, without resetting $HOME. SVN 9585 with wxGTK 2.8.10 from source.

Code: [Select]
Unexpected error.

Program received signal SIGABRT, Aborted.
[Switching to Thread 0x7ff5d32497e0 (LWP 495)]
0x00007ff5cfe26fb5 in raise () from /lib/libc.so.6
(gdb) bt
#0  0x00007ff5cfe26fb5 in raise () from /lib/libc.so.6
#1  0x00007ff5cfe28bc3 in abort () from /lib/libc.so.6
#2  0x00007ff5cfe1ff09 in __assert_fail () from /lib/libc.so.6
#3  0x00007ff5cc0f5e90 in _XSend (dpy=0x1a488e0, data=0x0, size=0)
    at ../../src/xcb_io.c:307
#4  0x00007ff5cc0f6361 in _XEventsQueued (dpy=0x1ef,
    mode=<value optimized out>) at ../../src/xcb_io.c:253
#5  0x00007ff5cc0dee4d in XPending (dpy=0x1a488e0) at ../../src/Pending.c:56
#6  0x00007ff5cf5a6a79 in _gdk_events_queue (display=0x1a550a0)
    at /build/buildd/gtk+2.0-2.16.1/gdk/x11/gdkevents-x11.c:2275
#7  0x00007ff5cf5a6f0e in gdk_event_dispatch (source=<value optimized out>,
    callback=0x1ef, user_data=0x6)
    at /build/buildd/gtk+2.0-2.16.1/gdk/x11/gdkevents-x11.c:2358
#8  0x00007ff5cda8c20a in IA__g_main_context_dispatch (context=0x1a22610)
    at /build/buildd/glib2.0-2.20.1/glib/gmain.c:1814
#9  0x00007ff5cda8f8e0 in g_main_context_iterate (context=0x1a22610, block=1,
    dispatch=1, self=<value optimized out>)
    at /build/buildd/glib2.0-2.20.1/glib/gmain.c:2448
#10 0x00007ff5cda8fdad in IA__g_main_loop_run (loop=0xbecd210)
    at /build/buildd/glib2.0-2.20.1/glib/gmain.c:2656
#11 0x00007ff5cf92dbc7 in IA__gtk_main ()
    at /build/buildd/gtk+2.0-2.16.1/gtk/gtkmain.c:1205
#12 0x00007ff5d13ca661 in wxEventLoop::Run (this=0xbecd230)
---Type <return> to continue, or q <return> to quit---
    at ./src/gtk/evtloop.cpp:76
#13 0x00007ff5d146b8d0 in wxAppBase::MainLoop (this=0x1a22320)
    at ./src/common/appcmn.cpp:312
#14 0x00007ff5d146b66d in wxAppBase::OnRun (this=0x1a22320)
    at ./src/common/appcmn.cpp:367
#15 0x00007ff5d0c1a816 in wxEntry (argc=@0x7ff5d0f434b0, argv=0x1a0fc00)
    at ./src/common/init.cpp:460
#16 0x00007ff5d0c1aa4c in wxEntry (argc=@0x7fffdb28362c, argv=0x7fffdb283708)
    at ./src/common/init.cpp:472
#17 0x000000000069a899 in main (argc=1, argv=0x7fffdb283708)
    at amule-gui.cpp:94
(gdb) bf full
Undefined command: "bf".  Try "help".
(gdb) bt full
#0  0x00007ff5cfe26fb5 in raise () from /lib/libc.so.6
No symbol table info available.
#1  0x00007ff5cfe28bc3 in abort () from /lib/libc.so.6
No symbol table info available.
#2  0x00007ff5cfe1ff09 in __assert_fail () from /lib/libc.so.6
No symbol table info available.
#3  0x00007ff5cc0f5e90 in _XSend (dpy=0x1a488e0, data=0x0, size=0)
    at ../../src/xcb_io.c:307
sequence = 942220431
vec = {{iov_base = 0x7ff5cdd15e00, iov_len = 140736870232716}, {
    iov_base = 0x7ff5cdd15e00, iov_len = 140693694046922}, {
    iov_base = 0x7c27040, iov_len = 27611296}}
ext = <value optimized out>
c = (xcb_connection_t *) 0x1a49320
dummy_request = {reqType = 0 '\0', data = 0 '\0', length = 0}
pad = "\000\000"
__PRETTY_FUNCTION__ = "_XSend"
#4  0x00007ff5cc0f6361 in _XEventsQueued (dpy=0x1ef,
    mode=<value optimized out>) at ../../src/xcb_io.c:253
No locals.
#5  0x00007ff5cc0dee4d in XPending (dpy=0x1a488e0) at ../../src/Pending.c:56
ret_val = 0
#6  0x00007ff5cf5a6a79 in _gdk_events_queue (display=0x1a550a0)
---Type <return> to continue, or q <return> to quit---
    at /build/buildd/gtk+2.0-2.16.1/gdk/x11/gdkevents-x11.c:2275
node = (GList *) 0xc09f2c0
event = (GdkEvent *) 0x9a582c0
xevent = {type = 33, xany = {type = 33, serial = 5190005986,
    send_event = 1, display = 0x1a488e0, window = 62914998}, xkey = {
    type = 33, serial = 5190005986, send_event = 1, display = 0x1a488e0,
    window = 62914998, root = 244, subwindow = 32, time = 245, x = 454460076,
    y = 0, x_root = 0, y_root = 0, state = 0, keycode = 0, same_screen = 0},
  xbutton = {type = 33, serial = 5190005986, send_event = 1,
    display = 0x1a488e0, window = 62914998, root = 244, subwindow = 32,
    time = 245, x = 454460076, y = 0, x_root = 0, y_root = 0, state = 0,
    button = 0, same_screen = 0}, xmotion = {type = 33, serial = 5190005986,
    send_event = 1, display = 0x1a488e0, window = 62914998, root = 244,
    subwindow = 32, time = 245, x = 454460076, y = 0, x_root = 0, y_root = 0,
    state = 0, is_hint = 0 '\0', same_screen = 0}, xcrossing = {type = 33,
    serial = 5190005986, send_event = 1, display = 0x1a488e0,
    window = 62914998, root = 244, subwindow = 32, time = 245, x = 454460076,
    y = 0, x_root = 0, y_root = 0, mode = 0, detail = 0, same_screen = 0,
    focus = 0, state = 16}, xfocus = {type = 33, serial = 5190005986,
    send_event = 1, display = 0x1a488e0, window = 62914998, mode = 244,
    detail = 0}, xexpose = {type = 33, serial = 5190005986, send_event = 1,
    display = 0x1a488e0, window = 62914998, x = 244, y = 0, width = 32,
    height = 0, count = 245}, xgraphicsexpose = {type = 33,
---Type <return> to continue, or q <return> to quit---
    serial = 5190005986, send_event = 1, display = 0x1a488e0,
    drawable = 62914998, x = 244, y = 0, width = 32, height = 0, count = 245,
    major_code = 0, minor_code = 454460076}, xnoexpose = {type = 33,
    serial = 5190005986, send_event = 1, display = 0x1a488e0,
    drawable = 62914998, major_code = 244, minor_code = 0}, xvisibility = {
    type = 33, serial = 5190005986, send_event = 1, display = 0x1a488e0,
    window = 62914998, state = 244}, xcreatewindow = {type = 33,
    serial = 5190005986, send_event = 1, display = 0x1a488e0,
    parent = 62914998, window = 244, x = 32, y = 0, width = 245, height = 0,
    border_width = 454460076, override_redirect = 0}, xdestroywindow = {
    type = 33, serial = 5190005986, send_event = 1, display = 0x1a488e0,
    event = 62914998, window = 244}, xunmap = {type = 33, serial = 5190005986,
    send_event = 1, display = 0x1a488e0, event = 62914998, window = 244,
    from_configure = 32}, xmap = {type = 33, serial = 5190005986,
    send_event = 1, display = 0x1a488e0, event = 62914998, window = 244,
    override_redirect = 32}, xmaprequest = {type = 33, serial = 5190005986,
    send_event = 1, display = 0x1a488e0, parent = 62914998, window = 244},
  xreparent = {type = 33, serial = 5190005986, send_event = 1,
    display = 0x1a488e0, event = 62914998, window = 244, parent = 32, x = 245,
    y = 0, override_redirect = 454460076}, xconfigure = {type = 33,
    serial = 5190005986, send_event = 1, display = 0x1a488e0,
    event = 62914998, window = 244, x = 32, y = 0, width = 245, height = 0,
    border_width = 454460076, above = 0, override_redirect = 0}, xgravity = {
---Type <return> to continue, or q <return> to quit---
    type = 33, serial = 5190005986, send_event = 1, display = 0x1a488e0,
    event = 62914998, window = 244, x = 32, y = 0}, xresizerequest = {
    type = 33, serial = 5190005986, send_event = 1, display = 0x1a488e0,
    window = 62914998, width = 244, height = 0}, xconfigurerequest = {
    type = 33, serial = 5190005986, send_event = 1, display = 0x1a488e0,
    parent = 62914998, window = 244, x = 32, y = 0, width = 245, height = 0,
    border_width = 454460076, above = 0, detail = 0, value_mask = 0},
  xcirculate = {type = 33, serial = 5190005986, send_event = 1,
    display = 0x1a488e0, event = 62914998, window = 244, place = 32},
  xcirculaterequest = {type = 33, serial = 5190005986, send_event = 1,
    display = 0x1a488e0, parent = 62914998, window = 244, place = 32},
  xproperty = {type = 33, serial = 5190005986, send_event = 1,
    display = 0x1a488e0, window = 62914998, atom = 244, time = 32,
    state = 245}, xselectionclear = {type = 33, serial = 5190005986,
    send_event = 1, display = 0x1a488e0, window = 62914998, selection = 244,
    time = 32}, xselectionrequest = {type = 33, serial = 5190005986,
    send_event = 1, display = 0x1a488e0, owner = 62914998, requestor = 244,
    selection = 32, target = 245, property = 454460076, time = 0},
  xselection = {type = 33, serial = 5190005986, send_event = 1,
    display = 0x1a488e0, requestor = 62914998, selection = 244, target = 32,
    property = 245, time = 454460076}, xcolormap = {type = 33,
    serial = 5190005986, send_event = 1, display = 0x1a488e0,
    window = 62914998, colormap = 244, new = 32, state = 0}, xclient = {
---Type <return> to continue, or q <return> to quit---
    type = 33, serial = 5190005986, send_event = 1, display = 0x1a488e0,
    window = 62914998, message_type = 244, format = 32, data = {
      b = "�\000\000\000\000\000\000\000�\202\026\033\000\000\000\000\000\000\000", s = {245, 0, 0, 0, -32084, 6934, 0, 0, 0, 0}, l = {245, 454460076, 0, 0,
        0}}}, xmapping = {type = 33, serial = 5190005986, send_event = 1,
    display = 0x1a488e0, window = 62914998, request = 244, first_keycode = 0,
    count = 32}, xerror = {type = 33, display = 0x1355934e2,
    resourceid = 416611827713, serial = 27560160, error_code = 182 '�',
    request_code = 1 '\001', minor_code = 192 '�'}, xkeymap = {type = 33,
    serial = 5190005986, send_event = 1, display = 0x1a488e0,
    window = 62914998,
    key_vector = "�\000\000\000\000\000\000\000 \000\000\000\000\000\000\000�\000\000\000\000\000\000\000�\202\026\033\000\000\000"}, pad = {33, 5190005986,
    416611827713, 27560160, 62914998, 244, 32, 245, 454460076, 0, 0, 0, 16,
    140690243715072, 3, 19, 506806141025, 105, 292057776200, 433791696942,
    442381631598, 197568495616, 506806141025, 105}}
xdisplay = (Display *) 0x1a488e0
#7  0x00007ff5cf5a6f0e in gdk_event_dispatch (source=<value optimized out>,
    callback=0x1ef, user_data=0x6)
    at /build/buildd/gtk+2.0-2.16.1/gdk/x11/gdkevents-x11.c:2358
display = (GdkDisplay *) 0x1a550a0
event = <value optimized out>
#8  0x00007ff5cda8c20a in IA__g_main_context_dispatch (context=0x1a22610)
---Type <return> to continue, or q <return> to quit---
    at /build/buildd/glib2.0-2.20.1/glib/gmain.c:1814
No locals.
#9  0x00007ff5cda8f8e0 in g_main_context_iterate (context=0x1a22610, block=1,
    dispatch=1, self=<value optimized out>)
    at /build/buildd/glib2.0-2.20.1/glib/gmain.c:2448
max_priority = 0
timeout = 0
some_ready = 1
nfds = 129
allocated_nfds = <value optimized out>
fds = (GPollFD *) 0x8ee9280
__PRETTY_FUNCTION__ = "g_main_context_iterate"
#10 0x00007ff5cda8fdad in IA__g_main_loop_run (loop=0xbecd210)
    at /build/buildd/glib2.0-2.20.1/glib/gmain.c:2656
self = (GThread *) 0x1a23a40
__PRETTY_FUNCTION__ = "IA__g_main_loop_run"
#11 0x00007ff5cf92dbc7 in IA__gtk_main ()
    at /build/buildd/gtk+2.0-2.16.1/gtk/gtkmain.c:1205
tmp_list = (GList *) 0x7fffdb283520
functions = (GList *) 0x0
init = (GtkInitFunction *) 0x39076b0
loop = <value optimized out>
#12 0x00007ff5d13ca661 in wxEventLoop::Run (this=0xbecd230)
---Type <return> to continue, or q <return> to quit---
    at ./src/gtk/evtloop.cpp:76
activate = {m_evtLoopOld = 0x0}
exitcode = 0
__FUNCTION__ = "Run"
#13 0x00007ff5d146b8d0 in wxAppBase::MainLoop (this=0x1a22320)
    at ./src/common/appcmn.cpp:312
mainLoop = {<wxEventLoopPtr> = {m_ptr = 0xbecd230}, m_pp = 0x1a22398,
  m_pOld = 0x0}
#14 0x00007ff5d146b66d in wxAppBase::OnRun (this=0x1a22320)
    at ./src/common/appcmn.cpp:367
No locals.
#15 0x00007ff5d0c1a816 in wxEntry (argc=@0x7ff5d0f434b0, argv=0x1a0fc00)
    at ./src/common/init.cpp:460
callOnExit = {<No data fields>}
cleanupOnExit = {<No data fields>}
#16 0x00007ff5d0c1aa4c in wxEntry (argc=@0x7fffdb28362c, argv=0x7fffdb283708)
    at ./src/common/init.cpp:472
No locals.
#17 0x000000000069a899 in main (argc=1, argv=0x7fffdb283708)
    at amule-gui.cpp:94
No locals.
(gdb) thread apply all bt

Thread 4 (Thread 0x7ff5c51c0950 (LWP 663)):
#0  0x00007ff5d2e5356d in pthread_cond_timedwait@@GLIBC_2.3.2 ()
   from /lib/libpthread.so.0
#1  0x00007ff5d0c8f405 in wxConditionInternal::WaitTimeout (this=0x1aae870,
    milliseconds=100) at ./src/unix/threadpsx.cpp:405
#2  0x00007ff5d0c8f4d1 in wxCondition::WaitTimeout (this=0x1af4f18,
    milliseconds=100) at ./include/wx/thrimpl.cpp:256
#3  0x00007ff5d0c90183 in wxSemaphoreInternal::WaitTimeout (this=0x1af4f10,
    milliseconds=100) at ./src/unix/threadpsx.cpp:552
#4  0x00007ff5d0c90267 in wxSemaphore::WaitTimeout (this=0x1aaf0f0,
    milliseconds=100) at ./include/wx/thrimpl.cpp:320
#5  0x00000000007f2c7b in CTimerThread::Entry (this=0x1aaf0b0) at Timer.cpp:64
#6  0x00007ff5d0c9135a in wxThreadInternal::PthreadStart (thread=0x1aaf0b0)
    at ./src/unix/threadpsx.cpp:766
#7  0x00007ff5d0c914ba in wxPthreadStart (ptr=0x1aaf0b0)
    at ./src/unix/threadpsx.cpp:718
#8  0x00007ff5d2e4f3ba in start_thread () from /lib/libpthread.so.0
#9  0x00007ff5cfed9fcd in clone () from /lib/libc.so.6
#10 0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7ff5c61c2950 (LWP 502)):
#0  0x00007ff5d2e567e1 in nanosleep () from /lib/libpthread.so.0
---Type <return> to continue, or q <return> to quit---
#1  0x00007ff5d0c9bdba in wxMicroSleep (microseconds=43000)
    at ./src/unix/utilsunx.cpp:191
#2  0x00007ff5d0c9bdd8 in wxMilliSleep (milliseconds=43)
    at ./src/unix/utilsunx.cpp:212
#3  0x00007ff5d0c8f159 in wxThread::Sleep (milliseconds=43)
    at ./src/unix/threadpsx.cpp:986
#4  0x00000000005e65ee in UploadBandwidthThrottler::Entry (this=0x7ee6940)
    at UploadBandwidthThrottler.cpp:320
#5  0x00007ff5d0c9135a in wxThreadInternal::PthreadStart (thread=0x7ee6940)
    at ./src/unix/threadpsx.cpp:766
#6  0x00007ff5d0c914ba in wxPthreadStart (ptr=0x7ee6940)
    at ./src/unix/threadpsx.cpp:718
#7  0x00007ff5d2e4f3ba in start_thread () from /lib/libpthread.so.0
#8  0x00007ff5cfed9fcd in clone () from /lib/libc.so.6
#9  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7ff5d32497e0 (LWP 495)):
#0  0x00007ff5cfe26fb5 in raise () from /lib/libc.so.6
#1  0x00007ff5cfe28bc3 in abort () from /lib/libc.so.6
#2  0x00007ff5cfe1ff09 in __assert_fail () from /lib/libc.so.6
#3  0x00007ff5cc0f5e90 in _XSend (dpy=0x1a488e0, data=0x0, size=0)
    at ../../src/xcb_io.c:307
#4  0x00007ff5cc0f6361 in _XEventsQueued (dpy=0x1ef,
---Type <return> to continue, or q <return> to quit---
    mode=<value optimized out>) at ../../src/xcb_io.c:253
#5  0x00007ff5cc0dee4d in XPending (dpy=0x1a488e0) at ../../src/Pending.c:56
#6  0x00007ff5cf5a6a79 in _gdk_events_queue (display=0x1a550a0)
    at /build/buildd/gtk+2.0-2.16.1/gdk/x11/gdkevents-x11.c:2275
#7  0x00007ff5cf5a6f0e in gdk_event_dispatch (source=<value optimized out>,
    callback=0x1ef, user_data=0x6)
    at /build/buildd/gtk+2.0-2.16.1/gdk/x11/gdkevents-x11.c:2358
#8  0x00007ff5cda8c20a in IA__g_main_context_dispatch (context=0x1a22610)
    at /build/buildd/glib2.0-2.20.1/glib/gmain.c:1814
#9  0x00007ff5cda8f8e0 in g_main_context_iterate (context=0x1a22610, block=1,
    dispatch=1, self=<value optimized out>)
    at /build/buildd/glib2.0-2.20.1/glib/gmain.c:2448
#10 0x00007ff5cda8fdad in IA__g_main_loop_run (loop=0xbecd210)
    at /build/buildd/glib2.0-2.20.1/glib/gmain.c:2656
#11 0x00007ff5cf92dbc7 in IA__gtk_main ()
    at /build/buildd/gtk+2.0-2.16.1/gtk/gtkmain.c:1205
#12 0x00007ff5d13ca661 in wxEventLoop::Run (this=0xbecd230)
    at ./src/gtk/evtloop.cpp:76
#13 0x00007ff5d146b8d0 in wxAppBase::MainLoop (this=0x1a22320)
    at ./src/common/appcmn.cpp:312
#14 0x00007ff5d146b66d in wxAppBase::OnRun (this=0x1a22320)
    at ./src/common/appcmn.cpp:367
#15 0x00007ff5d0c1a816 in wxEntry (argc=@0x7ff5d0f434b0, argv=0x1a0fc00)
---Type <return> to continue, or q <return> to quit---
    at ./src/common/init.cpp:460
#16 0x00007ff5d0c1aa4c in wxEntry (argc=@0x7fffdb28362c, argv=0x7fffdb283708)
    at ./src/common/init.cpp:472
#17 0x000000000069a899 in main (argc=1, argv=0x7fffdb283708)
    at amule-gui.cpp:94
(gdb)
Title: Re: Serious Memory Leak
Post by: Kry on May 12, 2009, 08:08:55 PM
I can't be aMule, tho.
Title: Re: Serious Memory Leak
Post by: xuser48 on March 02, 2011, 01:40:11 AM
I can't be aMule, tho.

What else should it be?

I have the same problem and only with aMule.

Ubuntu 10.04 LTS 32-bit
Kernel 2.6.32-28-generic-pae
7,9GiB RAM
aMule version 2.2.6+debian0-7 (lucid)

It chomps away on 2GiB of memory before being killed by the kernel. 2 hours of uptime on aMule is a record. Something is going very wrong and only with aMule. Everything else works like a charm - even the Compiz windows manager.
Title: Re: Serious Memory Leak
Post by: Stu Redman on March 02, 2011, 09:32:30 PM
Look here (http://forum.amule.org/index.php?topic=18506.msg101158#msg101158) for a patch (you have to patch wxWidgets, not aMule!).

Oh, and why would you use a 32 bit OS with 8GB ram?
Title: Re: Serious Memory Leak
Post by: Kry on March 03, 2011, 04:31:12 AM
Linux can address the whole 8GB.