Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 182946 - Memory leak in dev-lang/ruby-1.8.6-r1
Summary: Memory leak in dev-lang/ruby-1.8.6-r1
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Ruby Team
URL: http://blade.nagaokaut.ac.jp/cgi-bin/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-23 05:07 UTC by Mike Doty (RETIRED)
Modified: 2007-07-04 06:21 UTC (History)
1 user (show)

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


Attachments
code that shows the leak (tidy_test.rb,398 bytes, text/plain)
2007-06-23 05:10 UTC, Mike Doty (RETIRED)
Details
patch to ebuild (ruby-1.8.6-r1.ebuild.patch,1.02 KB, patch)
2007-06-23 05:14 UTC, Mike Doty (RETIRED)
Details | Diff
patch to ruby (ruby-patch.diff,1.32 KB, patch)
2007-06-23 05:15 UTC, Mike Doty (RETIRED)
Details | Diff
corrected patch (ruby-1.8.6-r1.ebuild.patch,312 bytes, patch)
2007-06-23 06:37 UTC, Mike Doty (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Doty (RETIRED) gentoo-dev 2007-06-23 05:07:54 UTC
leak in loading and using .so's

patch on the way
Comment 1 Mike Doty (RETIRED) gentoo-dev 2007-06-23 05:10:53 UTC
Created attachment 122855 [details]
code that shows the leak

you need htmltidy and the tidy gem for the example code.
Comment 2 Mike Doty (RETIRED) gentoo-dev 2007-06-23 05:14:15 UTC
Created attachment 122856 [details, diff]
patch to ebuild
Comment 3 Mike Doty (RETIRED) gentoo-dev 2007-06-23 05:15:01 UTC
Created attachment 122858 [details, diff]
patch to ruby

put in filesdir
Comment 4 Mike Doty (RETIRED) gentoo-dev 2007-06-23 05:15:29 UTC
Portage 2.1.2.7 (default-linux/x86/2007.0, gcc-4.1.2, glibc-2.5-r3, 2.6.21-suspend2-r5 i686)
=================================================================
System uname: 2.6.21-suspend2-r5 i686 Intel(R) Pentium(R) M processor 1600MHz
Gentoo Base System release 1.12.9
Timestamp of tree: Sat, 16 Jun 2007 18:00:01 +0000
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
dev-java/java-config: 1.3.7, 2.0.32
dev-lang/python:     2.4.4-r4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium-m -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -march=pentium-m -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS=" http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LINGUAS="en"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl acpi alsa bash-completion battery berkdb bitmap-fonts bluetooth bzip2 cli cpufreq cracklib crypt cups dmcrypt dri emacs fortran gdbm gpm gtk iconv ipv6 isdnlog jpeg kqemu libg++ lm_sensors midi mmx mp3 mpeg mudflap ncurses nls nptl nptlonly nsplugin offensive opengl openmp pam pcmcia pcre pcsc-lite perl png ppds pppd python readline reflection session slp smartcard spell spl sse sse2 ssl svg tcpd tiff truetype truetype-fonts type1-fonts unicode wifi x86 xml xorg xscreensaver zlib" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="radeon"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 5 Mike Doty (RETIRED) gentoo-dev 2007-06-23 06:37:32 UTC
Created attachment 122870 [details, diff]
corrected patch

clean out patch(keywords and headers)
Comment 6 Joshua Kinard gentoo-dev 2007-06-23 07:21:28 UTC
Confirmed on mips.  It's a slow leak.  Started at about 5.8-6MB when launched, and after about 26 mins, it was up to ~8.2MB.
Comment 7 Hans de Graaff gentoo-dev Security 2007-06-25 19:25:57 UTC
Just discussed with kingtaco on IRC that it makes sense to apply this patch to ruby 1.8.6_p36 so that we can aim to stabilize that version rather then vanilla 1.8.6. 
Comment 8 Mike Doty (RETIRED) gentoo-dev 2007-06-26 02:31:09 UTC
(In reply to comment #7)
> Just discussed with kingtaco on IRC that it makes sense to apply this patch to
> ruby 1.8.6_p36 so that we can aim to stabilize that version rather then vanilla
> 1.8.6. 
> 

I'm made a 1.8.6_p36-r3 ebuild locally and have tested.  The memory leak pertaining to loading .so files seems to be resolved.  I'll be deploying to a testing cluster this week and will report back after testing.  IMO we should roll this into -r3 and ship it with stable keywords in mind.(again, this is only my opinion)
Comment 9 Mike Doty (RETIRED) gentoo-dev 2007-06-29 18:09:42 UTC
I've been testing 1.8.6_p36-r2 with this patch on my beta cluster and memory usage is more stable.  I'd like to roll a -r3 with the patch included.
Comment 10 Mike Doty (RETIRED) gentoo-dev 2007-07-04 06:21:20 UTC
commited 1.8.6_p36-r3 with the patch.