Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 61711 - MLDonkey 2.5-16 memory leak
Summary: MLDonkey 2.5-16 memory leak
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo net-p2p team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-25 16:50 UTC by Chance Platt
Modified: 2005-08-26 05:08 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chance Platt 2004-08-25 16:50:19 UTC
I've been running mlnet for ~5 days, and according to top, its using 47% (375 MB) of memory.  

Reproducible: Didn't try
Steps to Reproduce:
1.Start up mldonkey ..
2.Let it run
3.

Actual Results:  
It uses a _lot_ of RAM.  I haven't tried to reproduce it yet, due to the fact
that this is the first time I've used it ... and it takes a few days to occur.


Output of  
     ps aux | cut -b 20- | sort -n | grep -v COMMAND

-------------
 0.0     0    0 ?        SW   17:01   0:01 [pdflush]
  0.0     0    0 ?        SW   17:50   0:00 [pdflush]
  0.0     0    0 ?        SW   Aug17   0:00 [kapmd]
  0.0     0    0 ?        SW   Aug17   0:00 [khubd]
  0.0     0    0 ?        SW   Aug17   0:00 [kseriod]
  0.0     0    0 ?        SW   Aug17   0:48 [kswapd0]
  0.0     0    0 ?        SW<  Aug17   0:00 [aio/0]
  0.0     0    0 ?        SW<  Aug17   0:00 [khelper]
  0.0     0    0 ?        SW<  Aug17   0:01 [events/0]
  0.0     0    0 ?        SW<  Aug17   0:01 [reiserfs/0]
  0.0     0    0 ?        SW<  Aug17   0:21 [kblockd/0]
  0.0     0    0 ?        SWN  Aug17   0:00 [ksoftirqd/0]
  0.0     0    0 ?        Z    18:09   0:00 [netstat] <defunct>
  0.0     0    0 ?        Z    Aug22   0:00 [wine-pthread] <defunct>
  0.0  1308  316 ?        S    Aug17   0:01 init [3]
  0.0  1312  296 pts/120  R    18:54   0:00 cut -b 20-
  0.0  1348  300 tty1     S    Aug17   0:00 /sbin/agetty 38400 tty1 linux
  0.0  1348  300 tty2     S    Aug17   0:00 /sbin/agetty 38400 tty2 linux
  0.0  1348  300 tty3     S    Aug17   0:00 /sbin/agetty 38400 tty3 linux
  0.0  1348  300 tty4     S    Aug17   0:00 /sbin/agetty 38400 tty4 linux
  0.0  1348  432 tty5     S    Aug23   0:00 /sbin/agetty 38400 tty5 linux
  0.0  1504  500 ?        S    Aug20   0:00 /sbin/portmap
  0.0  1564  444 ?        S    Aug17   2:32 /usr/sbin/syslog-ng
  0.0  1616  364 ?        S    Aug17   0:00 /usr/sbin/cron
  0.0  2036  300 ?        S    Aug18   0:00 /usr/bin/gnome-keyring-daemon
  0.0 26940  408 pts/120  S    18:54   0:00 sort -n
  0.1  1660  504 ?        S    Aug17   0:00 /sbin/devfsd /dev
  0.1  1904  760 ?        S    18:17   0:00 /bin/bash /opt/bin/sancho
  0.1  1956  616 ?        S    15:32   0:00 /usr/libexec/mapping-daemon
  0.1  1972  644 ?        S    18:15   0:00 gnome-pty-helper
  0.1  2036  760 ?        S    15:32   0:00 /usr/bin/gnome-keyring-daemon
  0.1  2056  516 tty6     S    15:53   0:00 su
  0.1  2056  956 pts/120  S    18:15   0:00 su
  0.1  2096  632 ?        S    15:43   0:00 login -- chance
  0.1  2168  880 ?        S    18:00   0:00 /bin/bash /usr/bin/firefox
  0.1  2288  796 pts/120  R    18:54   0:00 ps aux
  0.1  2356  832 tty6     S    15:53   0:00 -bash
  0.1  2716  504 ?        S    15:32   0:00 /usr/bin/ssh-agent -- gnome-session
  0.1  4056  952 ?        S    Aug20   7:27 /usr/sbin/famd -T 0 -c /etc/fam.conf
 0.1  4696  948 ?        S    Aug17   0:04 /usr/sbin/cupsd
  0.1  8184  620 ?        S    Aug19   0:00 gdm
  0.1  8776  968 ?        S    Aug19   0:03 /usr/kde/3.2/bin/artsd -F 10 -S 4096
-s 60 -m artsmessage -l 3 -f
  0.2  2100 1244 pts/120  S    18:15   0:00 bash
  0.2  2104 1072 tty6     S    15:53   0:00 bash
  0.2  2360 1260 pts/120  S    18:15   0:00 -bash
  0.2  3564 1440 ?        S    15:32   0:01 xscreensaver -nosplash
  0.2  8956 1104 ?        S    Aug19   0:04 gdm
  0.2 25584 1156 ?        S    Aug18   0:01
/usr/libexec/evolution/1.4/evolution-wombat
--oaf-activate-iid=OAFIID:GNOME_Evolution_Wombat_InterfaceCheck --oaf-ior-fd=39
  0.4  6008 2240 ?        S    Aug18   0:04
/usr/libexec/bonobo-activation-server --ac-activate --ior-output-fd=18
  0.4  8632 2176 ?        S    15:32   0:01 gnome-smproxy --sm-client-id default0
  0.5  9392 2560 ?        S    15:32   0:00 /usr/libexec/gnome-vfs-daemon
--oaf-activate-iid=OAFIID:GNOME_VFS_Daemon_Factory --oaf-ior-fd=29
  0.5  9392 2560 ?        S    15:32   0:00 /usr/libexec/gnome-vfs-daemon
--oaf-activate-iid=OAFIID:GNOME_VFS_Daemon_Factory --oaf-ior-fd=29
  0.5  9392 2560 ?        S    15:32   0:00 /usr/libexec/gnome-vfs-daemon
--oaf-activate-iid=OAFIID:GNOME_VFS_Daemon_Factory --oaf-ior-fd=29
  0.7  9152 3568 ?        S    15:32   0:02 /usr/libexec/gconfd-2 5
  1.0 14860 5148 ?        S    15:33   0:00
/usr/libexec/notification-area-applet
--oaf-activate-iid=OAFIID:GNOME_NotificationAreaApplet_Factory --oaf-ior-fd=31 
1.0 16548 5164 ?        S    15:32   0:00 /usr/libexec/gnome-settings-daemon
--oaf-activate-iid=OAFIID:GNOME_SettingsDaemon --oaf-ior-fd=23
  1.1 17840 5992 ?        S    15:32   0:00 gnome-session
  1.2 10444 6120 ?        S    11:50   0:00 /usr/bin/perl -w /usr/bin/fetchyahoo
 1.2 11708 6068 ?        S    15:32   0:10 /usr/bin/metacity --sm-client-id=default1
  1.2 15996 6424 ?        S    15:33   0:01 /usr/libexec/clock-applet
--oaf-activate-iid=OAFIID:GNOME_ClockApplet_Factory --oaf-ior-fd=35
  1.6 17728 8160 ?        S    15:33   0:05 /usr/libexec/wnck-applet
--oaf-activate-iid=OAFIID:GNOME_Wncklet_Factory --oaf-ior-fd=33
  1.9 20240 9596 ?        S    15:32   0:04 gnome-panel --sm-client-id default2
  2.5 32912 12980 ?       S    15:32   0:00 nautilus --no-default-window
--sm-client-id default3
  2.5 32912 12980 ?       S    15:32   0:00 nautilus --no-default-window
--sm-client-id default3
  2.5 32912 12980 ?       S    15:32   0:00 nautilus --no-default-window
--sm-client-id default3
  2.5 32912 12980 ?       S    15:32   0:00 nautilus --no-default-window
--sm-client-id default3
  2.5 32912 12980 ?       S    15:32   0:00 nautilus --no-default-window
--sm-client-id default3
  2.5 32912 12980 ?       S    15:32   0:00 nautilus --no-default-window
--sm-client-id default3
  2.5 32912 12980 ?       S    15:32   0:00 nautilus --no-default-window
--sm-client-id default3
  2.5 32912 12980 ?       S    15:32   0:00 nautilus --no-default-window
--sm-client-id default3
  2.5 32912 12980 ?       S    15:32   0:10 nautilus --no-default-window
--sm-client-id default3
  2.6 23956 13044 ?       S    18:15   0:00 gnome-terminal
  2.6 23956 13044 ?       S    18:15   0:00 gnome-terminal
  2.6 23956 13044 ?       S    18:15   0:02 gnome-terminal
  3.8 70460 19204 ?       S    Aug19 1225:50 /usr/X11R6/bin/X :0 -audit 0 -auth
/var/lib/gdm/:0.Xauth -nolisten tcp vt7
  6.9 57748 34624 ?       S    18:17   0:00 ./sancho-bin
  6.9 57748 34624 ?       S    18:17   0:00 ./sancho-bin
  6.9 57748 34624 ?       S    18:17   0:00 ./sancho-bin
  6.9 57748 34624 ?       S    18:17   0:00 ./sancho-bin
  6.9 57748 34624 ?       S    18:17   0:00 ./sancho-bin
  6.9 57748 34624 ?       S    18:17   0:04 ./sancho-bin
  6.9 57748 34624 ?       S    18:17   0:17 ./sancho-bin
  6.9 57748 34624 ?       S    18:26   0:00 ./sancho-bin
  9.5 64732 48008 ?       S    18:00   0:00 /usr/lib/MozillaFirefox/firefox-bin
  9.5 64732 48008 ?       S    18:00   0:00 /usr/lib/MozillaFirefox/firefox-bin
  9.5 64732 48008 ?       S    18:00   0:01 /usr/lib/MozillaFirefox/firefox-bin
  9.5 64732 48008 ?       S    18:00   2:47 /usr/lib/MozillaFirefox/firefox-bin
 47.1 384592 235904 ?     RN   Aug20  63:09 /usr/bin/mlnet
 47.1 384592 235904 ?     SN   Aug20   0:00 /usr/bin/mlnet
 47.1 384592 235904 ?     SN   Aug20   0:00 /usr/bin/mlnet
 47.1 384592 235904 ?     SN   Aug20   0:00 /usr/bin/mlnet


output of emerge info:

Portage 2.0.50-r10 (default-x86-1.4, gcc-3.3.3, glibc-2.3.3.20040420-r1, 2.6.7)
=================================================================
System uname: 2.6.7 i686 Intel(R) Pentium(R) 4 CPU 1.80GHz
Gentoo Base System version 1.4.16
Autoconf: sys-devel/autoconf-2.59-r4
Automake: sys-devel/automake-1.8.5-r1
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -march=pentium4 -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config
/var/qmail/control"CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=pentium4 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox userpriv usersandbox"
GENTOO_MIRRORS="ftp://mirrors.tds.net/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acpi aim alsa avi berkdb bonobo cdr crypt cups encode esd ethereal fam
fastcgi flac flash foomaticdb gb gdbm gif gimpprint gnome gpm gtk gtk2 imlib
java jpeg lesstiff libg++ libgda libwww mad mbox mikmod mmx motif mozcalendar
mozilla mpeg mysql ncurses nls offensive oggvorbis opengl oss pam pdflib perl
png python quicktime readline sdl slang spell sse ssl svga tcltk tcpd tiff
truetype usb x86 xml2 xmms xv xvid yahoo zlib"
Comment 1 Chance Platt 2004-09-01 09:14:19 UTC
I've been running MLNet this time, almost three days.  Same problem.  I figured possibly mlnet simply needed the resources (after filing the last bug) due to a very popular transfer, but ..  I'm having the problem now, with nearly no mlnet activity.

Relevant lines from ps aux:

USER       PID %CPU %MEM   VSZ  RSS TTY      STAT START   TIME COMMAND
p2p       6787  0.8 28.7 275384 143764 ?     RN   Aug29  36:04 /usr/bin/mlnet
p2p       6789  0.0 28.7 275384 143764 ?     SN   Aug29   0:00 /usr/bin/mlnet
p2p       6790  0.0 28.7 275384 143764 ?     SN   Aug29   0:00 /usr/bin/mlnet
p2p       7273  0.0 28.7 275384 143764 ?     SN   Aug29   0:00 /usr/bin/mlnet
Comment 2 Jon Hood (RETIRED) gentoo-dev 2004-09-11 09:14:40 UTC
Could you please try mldonkey-2.5.16-r8 in portage?
Comment 3 Chance Platt 2004-09-11 12:43:02 UTC
I tried, this is what happens:

ACCEPT_KEYWORDS="~x86" emerge =net-p2p/mldonkey-2.5.16-r8


....

ocamlopt.opt -inline 10    -I src/utils/cdk  -I src/daemon/chat  -I src/utils/lib  -I src/utils/net  -I tools  -I src/daemon/common  -I src/daemon/driver  -I src/utils/mp3tagui  -I src/config/unix  -I src/gtk/newgui  -I src/gtk/gui2  -I src/gtk/configwin  -I src/gtk/okey  -I src/gtk/gpattern  -I icons/tux  -I +lablgtk  -I src/gtk/progress  -I src/im  -I src/im/yahoo  -I src/im/irc  -I src/networks/direct_connect  -I src/networks/opennap  -I src/networks/gnutella  -I src/networks/gnutella2  -I src/networks/fasttrack  -I src/networks/fileTP  -I src/networks/bittorrent  -I src/networks/donkey  -I src/networks/soulseek -c src/gtk/configwin/configwin_types.ml
ocamlopt.opt -inline 10    -I src/utils/cdk  -I src/daemon/chat  -I src/utils/lib  -I src/utils/net  -I tools  -I src/daemon/common  -I src/daemon/driver  -I src/utils/mp3tagui  -I src/config/unix  -I src/gtk/newgui  -I src/gtk/gui2  -I src/gtk/configwin  -I src/gtk/okey  -I src/gtk/gpattern  -I icons/tux  -I +lablgtk  -I src/gtk/progress  -I src/im  -I src/im/yahoo  -I src/im/irc  -I src/networks/direct_connect  -I src/networks/opennap  -I src/networks/gnutella  -I src/networks/gnutella2  -I src/networks/fasttrack  -I src/networks/fileTP  -I src/networks/bittorrent  -I src/networks/donkey  -I src/networks/soulseek -c src/utils/mp3tagui/mp3_messages.ml
/usr/bin/ocamlc.opt   -I src/utils/cdk  -I src/daemon/chat  -I src/utils/lib  -I src/utils/net  -I tools  -I src/daemon/common  -I src/daemon/driver  -I src/utils/mp3tagui  -I src/config/unix  -I src/gtk/newgui  -I src/gtk/gui2  -I src/gtk/configwin  -I src/gtk/okey  -I src/gtk/gpattern  -I icons/tux  -I +lablgtk  -I src/gtk/progress  -I src/im  -I src/im/yahoo  -I src/im/irc  -I src/networks/direct_connect  -I src/networks/opennap  -I src/networks/gnutella  -I src/networks/gnutella2  -I src/networks/fasttrack  -I src/networks/fileTP  -I src/networks/bittorrent  -I src/networks/donkey  -I src/networks/soulseek -c src/utils/mp3tagui/mp3_ui.mli
/usr/lib/ocaml/lablgtk/gPack.cmi is not a compiled interface
make: *** [src/gtk/configwin/configwin_types.cmx] Error 2
make: *** Waiting for unfinished jobs....

!!! ERROR: net-p2p/mldonkey-2.5.16-r8 failed.
!!! Function src_compile, Line 51, Exitcode 2
!!! (no error message)
Comment 4 Jon Hood (RETIRED) gentoo-dev 2004-09-11 13:26:20 UTC
It required an upgrade to ocaml. Just run:
# sh /usr/portage/dev-lang/ocaml/files/ocaml-rebuild.sh
and remerge those suckers, then the updated mldonkey should build fine.

That or
# emerge dev-ml/lablgtk dev-ml/lablgl =net-p2p/mldonkey-2.5.16-r8
Comment 5 Chance Platt 2004-09-16 00:27:53 UTC
This is how I managed to do this update:

ACCEPT_KEYWORDS="~x86" emerge --oneshot dev-lang/ocaml
emerge --oneshot lablgl
emerge --oneshot lablgtk
ACCEPT_KEYWORDS="~x86" emerge --oneshot net-p2p/mldonkey

Emerging lablgtk before lablgl didn't work.  Please let me know if this is not what you intended.
Comment 6 Chance Platt 2004-09-18 22:09:26 UTC
Looks like the memory leak is still with us.

Relevent lines from ps aux:

USER       PID %CPU %MEM   VSZ  RSS TTY      STAT START   TIME COMMAND
p2p       7312  1.2 28.5 264676 147400 ?     SN   Sep16  50:50 /usr/bin/mlnet
p2p       7314  0.0 28.5 264676 147400 ?     SN   Sep16   0:00 /usr/bin/mlnet
p2p       7315  0.0 28.5 264676 147400 ?     SN   Sep16   0:00 /usr/bin/mlnet
p2p       7322  0.0 28.5 264676 147400 ?     SN   Sep16   0:07 /usr/bin/mlnet
Comment 7 Aniruddha Shankar 2004-12-09 08:26:55 UTC
found this bug while searching for whether a bug was filed because of mldonkey not emerging... 

mlnet's only taking up 4 mb in my system... athlonxp1700+ 256m ram
Comment 8 Chance Platt 2004-12-09 18:35:38 UTC
In all honesty, this bug took quite a bit of time and effort to track.  My solution to the problem was simply to just quit using it in favor of other programs.  

To the previous poster:  how long have you let it run?  Looking through my previous posts it looks like I forgot to mention the time frame.  If I remember correctly, it took a few days before mlnet began producing noticeable drag on my system due to its resource usage.   Let it run continuously for a few days and post back with your results.

chance
Comment 9 Alejandro Diaz Caro 2005-02-11 12:49:40 UTC
I've been running mldonkey-2.5.19-r9, almost three days.  Same problem (memory leak).
I'm not tried with 2.5.2x (hard masked)
(Sorry, I'm not speak english very well)
Comment 10 Knocker 2005-03-03 01:56:54 UTC
This problem should have been fixed in latest versions,
at least in 2.5.16v and 2.5.28s1.
Comment 11 Douglas R. Hoffman 2005-04-30 20:00:39 UTC
I have to restart mldonkey almost daily now.  Typically reaches about > 700 Meg before things get really bad, but this week things have gotten worse...

I have net-p2p/mldonkey-2.5.16-r10 installed.  I'm not sure if searching has anything to do with the memory leak...  I typically do my searches, start the downloads, save, kill the core, and then restart it.  It's gotten so bad, I now have a script which sacks it at noon each day and restarts it...

Is this a gentoo ebuild problem or is it the original code that has the issue (i.e. I should shut my trap and go find the program's bugzilla to yap on)

from top after it's been running for a few hours...
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 3695 xxxxxxx   15   0  584m 523m 2124 S 29.6 51.9 162:55.77 mlnet
Comment 12 Karol Wojtaszek (RETIRED) gentoo-dev 2005-08-25 08:50:15 UTC
could you check if in 2.6.2 this problem still occur?
Comment 13 Karol Wojtaszek (RETIRED) gentoo-dev 2005-08-26 05:08:42 UTC
Waiting for tests