Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 225789 - >=sys-libs/glibc-2.7-r2 : SIGSEGV in gettimeofday
Summary: >=sys-libs/glibc-2.7-r2 : SIGSEGV in gettimeofday
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-10 19:02 UTC by wbrana
Modified: 2009-02-20 13:38 UTC (History)
1 user (show)

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


Attachments
strace top (top.out,6.60 KB, text/plain)
2008-06-11 18:48 UTC, wbrana
Details
dmesg (dmesg,43.85 KB, text/plain)
2008-06-12 18:28 UTC, wbrana
Details
kernel config (config-2.6.25.6,43.39 KB, text/plain)
2008-06-12 18:29 UTC, wbrana
Details
strace top (strace-top.txt,6.26 KB, text/plain)
2008-07-17 14:38 UTC, Jason Waldhelm
Details

Note You need to log in before you can comment on or make changes to this bug.
Description wbrana 2008-06-10 19:02:10 UTC
After upgrade from glibc 2.6.1, at least top and glxgears are crashing in funcion gettimeofday 
at startup. It happens also with glibc 2.7-r2.

GNU gdb 6.8
Copyright (C) 2008 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 "x86_64-pc-linux-gnu"...
(gdb) run
Starting program: /usr/bin/top

Program received signal SIGSEGV, Segmentation fault.
0xffffffffff700846 in ?? ()
(gdb) bt full
#0  0xffffffffff700846 in ?? ()
No symbol table info available.
#1  0x00007fff6a9fe7e6 in gettimeofday ()
No symbol table info available.
#2  0x00007fc461fe1eda in gettimeofday () from /lib/libc.so.6
No symbol table info available.
#3  0x0000000000403b4e in prochlp (this=0x0) at top.c:996
        timev = {tv_sec = 1213123549, tv_usec = 483132}
        timez = {tz_minuteswest = 0, tz_dsttime = 1}
        hist_tmp = <value optimized out>
        tics = <value optimized out>
        hist_sav = (HST_t *) 0x0
        hist_new = (HST_t *) 0x0
        hist_siz = 0
        maxt_sav = 0
        oldtimev = {tv_sec = 0, tv_usec = 0}
#4  0x0000000000403d09 in procs_refresh (table=0x0, flags=-10485352) at top.c:1094
        ptsk = <value optimized out>
        curmax = <value optimized out>
        PT = <value optimized out>
        savmax = 0
        show_threads_was_enabled = 0
#5  0x0000000000405d62 in frame_make () at top.c:2943
        ppt = <value optimized out>
        i = <value optimized out>
        scrlins = 0
#6  0x000000000040880b in main (dont_care_argc=<value optimized out>, argv=0x7fff6a937b78) at top.c:3361
        isproc = {st_dev = 3, st_ino = 882316, st_nlink = 6, st_mode = 16749, st_uid = 0, st_gid = 0, __pad0 = 0, st_rdev = 0, st_size = 0, st_blksize = 1024, st_blocks = 0, st_atim = {tv_sec = 1213123549, tv_nsec = 468864184}, st_mtim = {tv_sec = 1213123549, tv_nsec = 468864184}, st_ctim = {tv_sec = 1213123549,
    tv_nsec = 468864184}, __unused = {0, 0, 0}}


GNU gdb 6.8
Copyright (C) 2008 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 "x86_64-pc-linux-gnu"...
(no debugging symbols found)
(gdb) run
Starting program: /usr/bin/glxgears
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)

Program received signal SIGSEGV, Segmentation fault.
0xffffffffff700846 in ?? ()
(gdb) bt full
#0  0xffffffffff700846 in ?? ()
No symbol table info available.
#1  0x00007fff465fe7e6 in gettimeofday ()
No symbol table info available.
#2  0x00007f463d82deda in gettimeofday () from /lib/libc.so.6
No symbol table info available.
#3  0x0000000000402cff in ?? ()
No symbol table info available.
#4  0x00007f463d7c543f in __libc_start_main () from /lib/libc.so.6
No symbol table info available.
#5  0x0000000000401559 in ?? ()
No symbol table info available.
#6  0x00007fff46453678 in ?? ()
No symbol table info available.
#7  0x0000000000000000 in ?? ()
No symbol table info available.

Portage 2.1.5.4 (default-linux/amd64/2007.0, gcc-4.2.4, glibc-2.8_p20080602-r0, 2.6.25.4-2 x86_64)
=================================================================
System uname: 2.6.25.4-2 x86_64 Intel(R) Core(TM)2 Duo CPU E6750 @ 2.66GHz
Timestamp of tree: Tue, 10 Jun 2008 01:45:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.5.2-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.62
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.1-r1
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.25-r4
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=nocona -O2 -pipe"
DISTDIR="/mnt/distfiles"
FEATURES="ccache distlocks nostrip parallel-fetch sandbox sfperms strict unmerge-orphans userfetch userpriv webrsync-gpg"
LDFLAGS=""
LINGUAS="en"
MAKEOPTS="-j 2"
PKGDIR="/cache/packages"
PORTAGE_RSYNC_EXTRA_OPTS="-z"
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="/cache"
PORTDIR="/mnt/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="386 7zip X a52 aac accessibility acl adns aiglx alsa amd64 ao apm asf avi bash-completion berkdb bitmap-fonts bzip2 cairo cli cracklib crypt css customlog dbus dri dts dv dvb dvd dvdr dvdread emboss fftw ftp gdbm gif glibc-omitfp glitz glx gpm graphviz gs gtk gtk2 hddtemp iconv ipv6 ithreads java5 jpeg jpeg2k kde kdeenablefinal kqemu lame lcms libg++ libwww live lm_sensors logrotate lzo mad matroska md5sum midi mikmod mmx mmxext moznocompose moznoirc moznomail mp3 mp4 mpeg mplayer mudflap ncurses network nodrm nptl nptlonly nsplugin ogg oggvorbis openal opengl openmp pam pch pcre pdf pdflib png pppd qt qt3 qt3support qt4 quicktime readline reflection rtc sdl session slang sndfile spl sql sqlite3 sse sse2 ssl ssse3 stream svg symlink theora threads threadsafe tiff truetype unicode v4l v4l2 vorbis x264 xcb xcomposite xft xml2 xorg xrandr xv xvid zlib" ALSA_CARDS="ca0106 usb-audio" 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" 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 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" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="none"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2008-06-10 19:16:43 UTC
How about running strace `which top`
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2008-06-10 19:41:21 UTC
Did you upgrade anything else, perhaps sys-kernel/linux-headers? In what order? Did you try if rebuilding sys-process/procps and x11-apps/mesa-progs helps?
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2008-06-11 14:39:07 UTC
You may also want to post dmesg for that system and perhaps your kernel config.
Comment 4 wbrana 2008-06-11 18:48:07 UTC
Created attachment 156401 [details]
strace top
Comment 5 wbrana 2008-06-11 18:58:27 UTC
(In reply to comment #2)
> Did you upgrade anything else, perhaps sys-kernel/linux-headers? In what order?
> Did you try if rebuilding sys-process/procps and x11-apps/mesa-progs helps?
> 

I upgraded in following order
1. linux-headers-2.6.25-r4 
2. glibc-2.8
3. procps with debugging symbols
4. mesa-progs
Comment 6 wbrana 2008-06-11 19:26:44 UTC
Crash also doesn't happen with reemerged glibc 2.6.1.
Comment 7 wbrana 2008-06-12 18:28:49 UTC
Created attachment 156523 [details]
dmesg
Comment 8 wbrana 2008-06-12 18:29:53 UTC
Created attachment 156525 [details]
kernel config
Comment 9 wbrana 2008-06-12 18:32:34 UTC
"Reopen bug" comment
Comment 10 Jason Waldhelm 2008-07-17 14:38:25 UTC
Created attachment 160639 [details]
strace top
Comment 11 Jason Waldhelm 2008-07-17 14:39:37 UTC
I have had the same thing happen.  My box uses hardened, however.  I believe
this is something related to the kernel.  I have two hardened servers on
glibc-2.7-r1, one with hardened-sources-2.6.24-r2 and the other with
hs-2.6.25-r1, neither experience this.  When I upgraded to hs-2.6.25 (which
pulls in 2.6.25.10) top segfaults on me now.  `strace top` in attachment above.
Comment 12 Jason Waldhelm 2008-07-17 14:40:40 UTC
(In reply to comment #11)

> hs-2.6.25-r1, neither experience this.  When I upgraded to hs-2.6.25 (which
> pulls in 2.6.25.10) top segfaults on me now.  `strace top` in attachment above.

This should read "When I upgraded to hs-2.6.25-r2..." Apologies.

Comment 13 wbrana 2008-08-10 14:48:26 UTC
SIGSEGV disappeared when I compiled glibc 2.8 using gcc 3.4.6 instead of 4.2.4.
Comment 14 SpanKY gentoo-dev 2008-12-07 22:30:17 UTC
test with glibc-2.8 and gcc-4.3.2 ...
Comment 15 Suren A. Chilingaryan 2009-02-20 11:53:41 UTC
I had the same problem. Seems there is Kernel/GLibc incompatibility. Using gettimeofday with not NULL second parameter causes segmentation fault if >=Glibc-2.7 is used with kernel 2.6.25 (haven't check other versions). Kernel upgrade to 2.6.28 have solved problem for me.