Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 327051 - dev-lang/ruby-1.9.1_p429 - ruby-1.9.1-p429/lib/optparse.rb:1258: [BUG] Segmentation fault
Summary: dev-lang/ruby-1.9.1_p429 - ruby-1.9.1-p429/lib/optparse.rb:1258: [BUG] Segmen...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal
Assignee: Gentoo Ruby Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-05 21:19 UTC by Jerry Kiely
Modified: 2011-10-10 19:15 UTC (History)
0 users

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


Attachments
build.log (build.log,33.71 KB, text/plain)
2010-07-05 21:24 UTC, Jerry Kiely
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jerry Kiely 2010-07-05 21:19:49 UTC
upgrading ruby results in a segmentation fault

Reproducible: Always

Steps to Reproduce:
1. emerge -uDNvp world
2.
3.

Actual Results:  
failure

Expected Results:  
dev-lang/ruby-1.9.1_p429 installed

Portage 2.1.8.3 (default/linux/x86/10.0, gcc-4.4.3, glibc-2.11.2-r0, 2.6.32-gentoo-r7 i686)
=================================================================
                        System Settings
=================================================================
System uname: Linux-2.6.32-gentoo-r7-i686-Intel-R-_Celeron-R-_CPU_2.00GHz-with-gentoo-1.12.13
Timestamp of tree: Mon, 05 Jul 2010 19:15:03 +0000
app-shells/bash:     4.0_p37
dev-java/java-config: 2.1.11
dev-lang/python:     2.5.4-r4, 2.6.5-r2, 3.1.2-r3
dev-util/cmake:      2.6.4-r3
sys-apps/baselayout: 1.12.13
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.65
sys-devel/automake:  1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.3-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="* -@EULA dlj-1.1"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://ftp.heanet.ie/pub/gentoo/ ftp://ftp.heanet.ie/pub/gentoo/ http://gentoo.virginmedia.com/ ftp://gentoo.virginmedia.com/sites/gentoo/"
LANG="en_IE.UTF-8"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="a52 aac acl amr apache2 avi bash-completion berkdb bidi bittorrent bzip2 cdda cddb cdio cdparanoia cdr cgi cli cracklib crypt css ctype cups curl curlwrappers cvs cxx daemon derby divx4linux docs dri dts dv dvb dvd dvdr dvdread dvipdfm emacs encode exif faac faad fame fastcgi ffmpeg filter flac fortran gdbm gnutls gpm graphics haskell hipe html httpd iconv imagemagick imap innodb inotify ipv6 java java6 javascript jpeg json kpathsea lame lastfm latex3 ldap libwww live mad mailwrapper math matroska metalink mmx modules mp3 mpeg mplayer mudflap mysql ncurses nls nptl nptlonly ogg openmp pam pcre pdo perl php png postgres pppd python quicktime rar readline reflection resolvconf ruby samba science server session snmp speex spl sql sqlite sqlite3 ssl stream subtitles subversion suexec svnserve symlink sysfs taglib tcpd tetex theora thumbnail tiff truetype unicode usb vcd vhosts vlm vorbis win32codecs x264 x86 xml xml2 xmlrpc xorg xvid zip zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon                  authn_dbd authn_dbm authn_default authn_file authz_dbm                  authz_default authz_groupfile authz_host authz_owner                  authz_user autoindex cache dav dav_fs dav_lock dbd                  deflate dir disk_cache env expires ext_filter                  file_cache filter headers ident imagemap include info                  log_config logio mem_cache mime mime_magic negotiation                  proxy proxy_ajp proxy_balancer proxy_connect proxy_http                  rewrite setenvif so speling status unique_id userdir                  usertrack vhost_alias" APACHE2_MPMS="itk" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" RUBY_TARGETS="ruby18 ree18 ruby19" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa via vmware voodoo" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Jerry Kiely 2010-07-05 21:24:05 UTC
Created attachment 237631 [details]
build.log
Comment 2 Jerry Kiely 2010-07-05 21:25:41 UTC
[ gargantua jerry ] # emerge -pqv =dev-lang/ruby-1.9.1_p429
[ebuild     U ] dev-lang/ruby-1.9.1_p429 [1.9.1_p376] USE="berkdb gdbm ipv6 ncurses readline ssl -debug -doc -examples -libedit -rubytests -socks5 -tk -xemacs" 
Comment 3 Diego Elio Pettenò (RETIRED) gentoo-dev 2010-07-05 23:40:22 UTC
Uhm this gets fun. I'll try to add 1.9.2rc1..
Comment 4 Alex Legler (RETIRED) archtester gentoo-dev Security 2010-07-06 04:49:18 UTC
Upstream claim this is a GCC issue with >= -O2:

http://redmine.ruby-lang.org/issues/show/

The explanation for that is in Japanese which is really really really really really really really really really great.
Comment 5 Alex Legler (RETIRED) archtester gentoo-dev Security 2010-07-06 04:50:34 UTC
Oh, far far on the bottom, there's some English..

"I'm suspecting that there is a bug in gcc 4.4.1.
A local variable of caller seems to be changed by callee if the
callee is inlined.  You can avoid this issue by using -O0 or -O1."
Comment 6 Marc Duponcheel 2010-07-08 14:06:15 UTC
using -O0 fixes the problem for me on x86
-O1 did not fix it.
I have not seen the problem on amd64.

gcc version 4.4.4 (Gentoo 4.4.4-r1 p1.0, pie-0.4.5) 
Comment 7 Hans de Graaff gentoo-dev Security 2010-08-28 08:19:30 UTC
We no longer have ruby 1.9.1 versions in the tree. Is this problem still present with ruby 1.9.2?
Comment 8 Shunsuke Shimizu 2011-09-17 06:34:56 UTC
(In reply to comment #7)
> We no longer have ruby 1.9.1 versions in the tree. Is this problem still
> present with ruby 1.9.2?

I compiled ruby 1.9.2p0 with gcc 4.4.5 and "-O2 -g" option on x86 machine, and no problem occurred. 

In addition, the bug is treated as a problem about ruby1.9.1 in ruby bug tracking system (http://redmine.ruby-lang.org/issues/2727). I also googled, and couldn't find any reports concerned to the bug on ruby 1.9.2.

So, I guess the bug is not present in ruby 1.9.2.

emerge --info
--------------------
Portage 2.2.0_alpha58 (default/linux/x86/10.0/desktop, gcc-4.4.5, glibc-2.13-r4, 3.0.4-gentoo i686)
=================================================================
System uname: Linux-3.0.4-gentoo-i686-Genuine_Intel-R-_CPU_T2300_@_1.66GHz-with-gentoo-2.0.3
Timestamp of tree: Fri, 16 Sep 2011 22:00:01 +0000
distcc 3.1 i686-pc-linux-gnu [disabled]
app-shells/bash:          4.2_p10
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.2-r3, 3.2.2
dev-util/cmake:           2.8.5-r2
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.9.3-r1
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.11.1-r1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.4.5
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 2.6.39 (virtual/os-headers)
sys-libs/glibc:           2.13-r4
Repositories: gentoo naota sunrise grafi
Installed sets: 
ACCEPT_KEYWORDS="x86 ~x86"
ACCEPT_LICENSE="*"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -pipe -mtune=native -march=native -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -mtune=native -march=native -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles fixpackages news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
Comment 9 Hans de Graaff gentoo-dev Security 2011-10-10 19:15:46 UTC
Thanks for the feedback. I'm going to close this as obsolete then. Please reopen if this problem still occurs with ruby 1.9.2.