Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 386605 - net-analyzer/rrdtool-1.3.8 is broken with gcc 4.5.3-r1
Summary: net-analyzer/rrdtool-1.3.8 is broken with gcc 4.5.3-r1
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: Normal normal (vote)
Assignee: Gentoo Netmon project
URL:
Whiteboard:
Keywords:
Depends on: 387171
Blocks:
  Show dependency tree
 
Reported: 2011-10-10 07:41 UTC by Marc Perrudin
Modified: 2011-10-18 13:59 UTC (History)
4 users (show)

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 Marc Perrudin 2011-10-10 07:41:11 UTC
Since I upgraded gcc to the latest stable version (4.5.3-r1), rrdtool is unable to read the existing databases :
ERROR: This RRD was created on another architecture

And it segfaults when creating new bds:

Reproducible: Always

Steps to Reproduce:
1.use a rrdtool on an existing db
2.or
3.create a db
Actual Results:  
1 -> ERROR: This RRD was created on another architecture
2 -> segfault

Expected Results:  
No error and no segfault.

The problem doesn't happen with the ~x86 version (1.4.5-r1) with the same db.

Portage 2.1.10.11 (default/linux/x86/10.0/desktop/gnome, gcc-4.5.3, glibc-2.12.2-r0, 2.6.39-gentoo-r3 i686)
=================================================================
System uname: Linux-2.6.39-gentoo-r3-i686-AMD_Athlon-tm-_II_X4_645_Processor-with-gentoo-2.0.3
Timestamp of tree: Mon, 10 Oct 2011 00:45:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:          4.1_p9
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.1-r1, 3.1.3-r1
dev-util/ccache:          2.4-r9
dev-util/cmake:           2.8.4-r1
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.8.3-r1
sys-apps/sandbox:         2.4
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:       2.20.1-r1
sys-devel/gcc:            4.5.3-r1
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.36.1 (virtual/os-headers)
sys-libs/glibc:           2.12.2
Repositories: gentoo vdr-xine vdr-devel x-portage
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="* -@EULA dlj-1.1 AdobeFlash-10.1"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa /var/bind"
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="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs buildpkg ccache distlocks ebuild-locks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="fr_FR.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="fr en"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="-q"
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"
PORTDIR_OVERLAY="/var/lib/layman/vdr-xine /var/lib/layman/vdr-devel /usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac acl acpi alsa bash-completion berkdb branding bzip2 cairo cdda cdparanoia cdr cleartype cli consolekit corefonts cracklib crypt cups cxx dbus dri dts dvb dvd dvdr emboss encode evo exif fam ffmpeg firefox flac fortran gdbm gdu gif gnome gnome-keyring gnutls gpm gstreamer gtk iconv idn imagemagick jpeg lcms libg++ libnotify lirc mad matroska mikmod mmx mmxext mng modules mp3 mp4 mpeg mudflap nautilus ncurses nls nptl nptlonly ogg opengl openmp pam pango pcre pdf pdflib perl png pnm policykit ppds pppd pulseaudio python quicktime readline rss sdl session smp spell sse sse2 sse4a ssl startup-notification svg sysfs tcpd theora threads tiff truetype twolame type1 udev unicode usb v4l2 vdpau vim-syntax vorbis win32codecs wma x264 x86 xcb xml xorg xosd xulrunner xv xvid 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 authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" DVB_CARDS="usb-af9015" ELIBC="glibc" FOO2ZJS_DEVICES="sa3175" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="fr en" LIRC_DEVICES="devinput" NETBEANS_MODULES="cnd" PHP_TARGETS="php5-3" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby18" SANE_BACKENDS="xerox_mfp" USERLAND="GNU" VIDEO_CARDS="nv nvidia" 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, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS
Comment 1 Marcin Mirosław 2011-10-13 12:26:47 UTC
Using:
gcc version 4.5.3 (Gentoo Hardened 4.5.3-r1 p1.0, pie-0.4.5) 
CFLAGS="-O2 -pipe -march=native -fomit-frame-pointer"
i can't reprocude problem.
Comment 2 Marcin Mirosław 2011-10-13 12:27:30 UTC
BTW, did you try to compile with -ggdb and do backtrace with gdb?
Comment 3 Ondrej Zary 2011-10-13 12:37:38 UTC
I have the same problem since yesterday when I recompiled rrdtool (because of perl upgrade). mailgraph started to consume 100% CPU time and fill disk with huge log file - so I tried to dump its rrd files to find out that rrdtool does not work anymore.

Portage 2.1.10.11 (default/linux/x86/10.0, gcc-4.5.3, glibc-2.12.2-r0, 2.6.39-gentoo-r3-main i686)
=================================================================
System uname: Linux-2.6.39-gentoo-r3-main-i686-Celeron_-Mendocino-with-gentoo-2.0.3
Timestamp of tree: Thu, 13 Oct 2011 06:00:01 +0000
app-shells/bash:          4.1_p9
dev-lang/python:          2.7.1-r1, 3.1.3-r1
dev-util/cmake:           2.8.4-r1
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.8.3-r1
sys-apps/sandbox:         2.4
sys-devel/autoconf:       2.68
sys-devel/automake:       1.10.3, 1.11.1
sys-devel/binutils:       2.20.1-r1
sys-devel/gcc:            4.4.5, 4.5.3-r1
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.36.1 (virtual/os-headers)
sys-libs/glibc:           2.12.2
Repositories: gentoo sunrise x-portage
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="* -@EULA"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O3 -march=i686 -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O3 -march=i686 -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps y"
FEATURES="assume-digests binpkg-logs buildpkg collision-protect distlocks ebuild-locks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox"
FFLAGS=""
GENTOO_MIRRORS="ftp://ftp.fi.muni.cz/pub/linux/gentoo/ ftp://gentoo.mirror.web4u.cz/ ftp://gentoo.inode.at/source/ ftp://gd.tuwien.ac.at/opsys/linux/gentoo/"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en sk"
MAKEOPTS="-j1"
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/portage"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/sunrise /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="apache2 berkdb bzip2 caps chroot cli cracklib crypt cxx dri gdbm gmp iconv idn imap jpeg mbox mmx modules mudflap ncurses nls nptl nptlonly pam pcre pdflib png pppd readline samba session sse ssl sysfs tcpd truetype unicode urandom x86 xattr xorg 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="alias auth_basic authn_anon authn_default authn_file authz_default authz_groupfile authz_host authz_owner authz_user autoindex cgi dbd deflate dir env expires ext_filter filter headers info log_config logio mime mime_magic negotiation rewrite setenvif status unique_id usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en sk" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" 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, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 4 Marcin Mirosław 2011-10-13 12:44:10 UTC
Probably i686 is affected not amd64.
Comment 5 Marc Perrudin 2011-10-13 13:13:14 UTC
There isn't a debug use flag. I added "append-flags -ggdb" to the ebuild but I not sure it's the correct way to add the flag because gbd doesn't found debugging symbols.

Here is the output I get :

GNU gdb (Gentoo 7.2 p1) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>...
Reading symbols from /usr/bin/rrdtool...(no debugging symbols found)...done.
(gdb) run create target.rrd          --start 1023654125          --step 300          DS:mem:GAUGE:600:0:671744          RRA:AVERAGE:0.5:12:24          RRA:AVERAGE:0.5:288:31
Starting program: /usr/bin/rrdtool create target.rrd          --start 1023654125          --step 300          DS:mem:GAUGE:600:0:671744          RRA:AVERAGE:0.5:12:24          RRA:AVERAGE:0.5:288:31
[Thread debugging using libthread_db enabled]
rrd_dontneed: Argument 'rrd_file' is NULL.

Program received signal SIGSEGV, Segmentation fault.
0xb7fb22df in rrd_close () from /usr/lib/librrd.so.4
(gdb) backtrace
#0  0xb7fb22df in rrd_close () from /usr/lib/librrd.so.4
#1  0xb7f952bd in ?? () from /usr/lib/librrd.so.4
#2  0xb7f95afd in rrd_create_r () from /usr/lib/librrd.so.4
#3  0xb7f96551 in rrd_create () from /usr/lib/librrd.so.4
#4  0x0804a83e in ?? ()
#5  0x0804b899 in ?? ()
#6  0xb7e2f146 in __libc_start_main () from /lib/libc.so.6
#7  0x080493e1 in ?? ()
Comment 6 Marcin Mirosław 2011-10-13 13:20:49 UTC
Here is guide: http://www.gentoo.org/proj/en/qa/backtraces.xml
In short words:
- in make.conf add "-ggdb" to CFLAGS/CCFLAGS
- add "splitdebug" to FEATURES
- emerge -1 glibc
- emerge -1 rrdtool

Now you should have symbols.
Comment 7 Marc Perrudin 2011-10-13 14:06:05 UTC
Here are the traces I get:

GNU gdb (Gentoo 7.2 p1) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>...
Reading symbols from /usr/bin/rrdtool...Reading symbols from /usr/lib/debug/usr/bin/rrdtool.debug...done.
done.
(gdb) run create target.rrd          --start 1023654125          --step 300          DS:mem:GAUGE:600:0:671744          RRA:AVERAGE:0.5:12:24          RRA:AVERAGE:0.5:288:31
Starting program: /usr/bin/rrdtool create target.rrd          --start 1023654125          --step 300          DS:mem:GAUGE:600:0:671744          RRA:AVERAGE:0.5:12:24          RRA:AVERAGE:0.5:288:31
[Thread debugging using libthread_db enabled]
rrd_dontneed: Argument 'rrd_file' is NULL.

Program received signal SIGSEGV, Segmentation fault.
0xb7fb22df in rrd_close (rrd_file=0x0) at rrd_open.c:470
470	rrd_open.c: Aucun fichier ou dossier de ce type.
	in rrd_open.c
(gdb) backtrace 
#0  0xb7fb22df in rrd_close (rrd_file=0x0) at rrd_open.c:470
#1  0xb7f952bd in rrd_create_fn (file_name=0xbffff195 "target.rrd", rrd=0xbfffebf4) at rrd_create.c:818
#2  0xb7f95afd in rrd_create_r (filename=0xbffff195 "target.rrd", pdp_step=300, last_up=1023654125, argc=3, argv=0xbfffefc0) at rrd_create.c:553
#3  0xb7f96551 in rrd_create (argc=9, argv=0xbfffefa8) at rrd_create.c:108
#4  0x0804a83e in HandleInputLine (argc=10, argv=0xbfffefa4, out=0xb7f72580) at rrd_tool.c:626
#5  0x0804b899 in main (argc=10, argv=0xbfffefa4) at rrd_tool.c:501
(gdb)
Comment 8 Marc Perrudin 2011-10-13 14:12:39 UTC
Is there something witch prevent ~arch version to become stable ?

~x86 works flawlessly since several days on my system.
Comment 9 Sergiy Borodych 2011-10-13 22:27:47 UTC
See
http://oss.oetiker.ch/rrdtool-trac/changeset/2069
Comment 10 Marc Perrudin 2011-10-13 23:00:51 UTC
Is "-std=c99" a default option of gentoo? Because I didn't set it and the 1.4 branch works fine.
Comment 11 Ondrej Zary 2011-10-18 13:48:28 UTC
rrdtool-1.4.5-r1 (now stable) fixes the bug.