Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 201917 - dev-libs/libgcrypt-1.4.0 - segmentation fault, glibc-2.7 related?
Summary: dev-libs/libgcrypt-1.4.0 - segmentation fault, glibc-2.7 related?
Status: VERIFIED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: High normal
Assignee: Crypto team [DISABLED]
URL:
Whiteboard:
Keywords:
: 201939 201954 202030 202324 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-12-11 04:44 UTC by Ryan Hill (RETIRED)
Modified: 2007-12-15 09:05 UTC (History)
7 users (show)

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


Attachments
hs_err_pid17110.log (Eclipse Error Msg) (hs_err_pid17110.log,51.78 KB, text/plain)
2007-12-11 13:40 UTC, Stefan.qn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Hill (RETIRED) gentoo-dev 2007-12-11 04:44:39 UTC
>>> Test phase [check]: dev-libs/libgcrypt-1.4.0
Making check in mpi
make[1]: Entering directory `/var/tmp/portage/dev-libs/libgcrypt-1.4.0/work/libgcrypt-1.4.0/mpi'
make[1]: Nothing to be done for `check'.
make[1]: Leaving directory `/var/tmp/portage/dev-libs/libgcrypt-1.4.0/work/libgcrypt-1.4.0/mpi'
Making check in cipher
make[1]: Entering directory `/var/tmp/portage/dev-libs/libgcrypt-1.4.0/work/libgcrypt-1.4.0/cipher'
make[1]: Nothing to be done for `check'.
make[1]: Leaving directory `/var/tmp/portage/dev-libs/libgcrypt-1.4.0/work/libgcrypt-1.4.0/cipher'
Making check in src
make[1]: Entering directory `/var/tmp/portage/dev-libs/libgcrypt-1.4.0/work/libgcrypt-1.4.0/src'
make[1]: Nothing to be done for `check'.
make[1]: Leaving directory `/var/tmp/portage/dev-libs/libgcrypt-1.4.0/work/libgcrypt-1.4.0/src'
Making check in doc
make[1]: Entering directory `/var/tmp/portage/dev-libs/libgcrypt-1.4.0/work/libgcrypt-1.4.0/doc'
make[1]: Nothing to be done for `check'.
make[1]: Leaving directory `/var/tmp/portage/dev-libs/libgcrypt-1.4.0/work/libgcrypt-1.4.0/doc'
Making check in tests
make[1]: Entering directory `/var/tmp/portage/dev-libs/libgcrypt-1.4.0/work/libgcrypt-1.4.0/tests'
make  check-TESTS
make[2]: Entering directory `/var/tmp/portage/dev-libs/libgcrypt-1.4.0/work/libgcrypt-1.4.0/tests'
/bin/sh: line 4: 14153 Segmentation fault      ${dir}$tst
FAIL: version
/bin/sh: line 4: 14176 Segmentation fault      ${dir}$tst
FAIL: t-mpi-bit
/bin/sh: line 4: 14199 Segmentation fault      ${dir}$tst
FAIL: prime
/bin/sh: line 4: 14222 Segmentation fault      ${dir}$tst
FAIL: register
/bin/sh: line 4: 14245 Segmentation fault      ${dir}$tst
FAIL: ac
/bin/sh: line 4: 14268 Segmentation fault      ${dir}$tst
FAIL: ac-schemes
/bin/sh: line 4: 14291 Segmentation fault      ${dir}$tst
FAIL: ac-data
/bin/sh: line 4: 14314 Segmentation fault      ${dir}$tst
FAIL: basic
/bin/sh: line 4: 14337 Segmentation fault      ${dir}$tst
FAIL: mpitests
/bin/sh: line 4: 14360 Segmentation fault      ${dir}$tst
FAIL: tsexp
/bin/sh: line 4: 14383 Segmentation fault      ${dir}$tst
FAIL: keygen
/bin/sh: line 4: 14406 Segmentation fault      ${dir}$tst
FAIL: pubkey
/bin/sh: line 4: 14429 Segmentation fault      ${dir}$tst
FAIL: hmac
/bin/sh: line 4: 14452 Segmentation fault      ${dir}$tst
FAIL: keygrip
/bin/sh: line 4: 14475 Segmentation fault      ${dir}$tst
FAIL: random
/bin/sh: line 4: 14498 Segmentation fault      ${dir}$tst
FAIL: benchmark
========================================
16 of 16 tests failed
Please report to bug-libgcrypt@gnupg.org
========================================
make[2]: *** [check-TESTS] Error 1
make[2]: Leaving directory `/var/tmp/portage/dev-libs/libgcrypt-1.4.0/work/libgcrypt-1.4.0/tests'
make[1]: *** [check-am] Error 2
make[1]: Leaving directory `/var/tmp/portage/dev-libs/libgcrypt-1.4.0/work/libgcrypt-1.4.0/tests'
make: *** [check-recursive] Error 1
 *
 * ERROR: dev-libs/libgcrypt-1.4.0 failed.
 * Call stack:
 *               ebuild.sh, line   46:  Called src_test
 *             environment, line 2480:  Called die
 * The specific snippet of code:
 *               hasq test $FEATURES && diefunc "$FUNCNAME" "$LINENO" "$?" "Make check failed. See above for details.";
 *  The die message:
 *   Make check failed. See above for details.
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/dev-libs/libgcrypt-1.4.0/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-libs/libgcrypt-1.4.0/temp/environment'.


Portage 2.1.4_rc9 (default-linux/x86/2007.0, gcc-4.2.2, glibc-2.7-r0, 2.6.23.8 i686)
=================================================================
System uname: 2.6.23.8 i686 Genuine Intel(R) CPU T2300 @ 1.66GHz
Timestamp of tree: Unknown
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p17-r1
dev-java/java-config: 1.3.7, 2.1.3
dev-lang/python:     2.5.1-r4
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 2.0.0_rc6
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
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.18-r1, 2.18.50.0.2, 2.18.50.0.3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.23-r2
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -g -march=prescott -fomit-frame-pointer -pipe"
CHOST="i686-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/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -g -march=prescott -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps=y"
FEATURES="assume-digests ccache collision-protect cvs digest distlocks fixpackages parallel-fetch sandbox sfperms sign splitdebug strict test unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS=" http://gentoo.chem.wisc.edu/gentoo http://gentoo.osuosl.org http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1,--hash-style=gnu,--as-needed"
LINGUAS="en en_GB en_US"
MAKEOPTS="-j3"
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/overlay/mozilla /home/dirtyepic/overlay /home/dirtyepic/svn/dirtyepic"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acpi alsa amazon ao audiofile bash-completion berkdb bitmap-fonts branding bzip2 cairo caps cddb cdio cli cracklib crypt curl dbus djbfft dri dts dvd dvdr expat fam ffmpeg fftw firefox flac fontconfig gdbm gif glib glibc-omitfp gmp gnutls gstreamer gtk hal iconv id3 ipw3945 isdnlog java jpeg kde kdeenablefinal kdehiddenvisibility logitech-mouse mad mmap mmx mmxext moznopango mp3 mpeg music musicbrainz ncurses network-cron noflagstrip nptl nptlonly nsplugin odbc ogg opengl openmp pam pcre perl physfs pic png portage pppd python qa qt3 readline reflection regex rtc session sndfile spell spl sqlite sqlite3 sse sse2 ssl startup-notification svg tcpd test threads threadsafe truetype truetype-fonts type1-fonts unicode urandom utempter utils vim-syntax vim-with-x visibility vorbis win32codecs wxwindows x86 xcb xml xorg xpm xv xvid zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="*" 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="joystick mouse keyboard synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_GB en_US" USERLAND="GNU" VIDEO_CARDS="fglrx"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Alon Bar-Lev (RETIRED) gentoo-dev 2007-12-11 07:22:20 UTC
Tried your LDFLAGS, all it remains is to test it with stable glibc...
Can you please see if this is the problem?
Thanks!
Comment 2 Stefan.qn 2007-12-11 13:40:32 UTC
Created attachment 138255 [details]
hs_err_pid17110.log (Eclipse Error Msg)
Comment 3 Stefan.qn 2007-12-11 13:41:47 UTC
UPDATED dev-libs/libgcrypt-1.2.4 (Eclipse was working) > dev-libs/libgcrypt-1.4.0 (Eclipse broke). 
 
while starting eclipse-3.3 with 
#!/bin/sh
/home/qn/Coden/eclipse-3.3/eclipse -vm /opt/sun-jdk-1.6.0.03/bin/java
 
RESULTS in following error:
 
#
# An unexpected error has been detected by Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x8da67817, pid=17110, tid=3085130640
#
# Java VM: Java HotSpot(TM) Server VM (1.6.0_03-b05 mixed mode)
# Problematic frame:
# C  [libgcrypt.so.11+0xa817]
#
# An error report file with more information is saved as hs_err_pid17110.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#

----
I've downgraded to 1.2.4 again
Comment 4 Stefan.qn 2007-12-11 13:48:48 UTC
I should have mentioned that -portage- eclipse 3.2.x is working even with dev-libs/libgcrypt-1.4.0.
Comment 5 Alon Bar-Lev (RETIRED) gentoo-dev 2007-12-11 13:51:22 UTC
Stefan: Please paste emerge --info
Comment 6 Stefan.qn 2007-12-11 13:54:09 UTC
Portage 2.1.4_rc9 (default-linux/x86/2007.0, gcc-4.2.2, glibc-2.7-r1, 2.6.23-gentoo-r3qn-IIIe i686)
=================================================================
System uname: 2.6.23-gentoo-r3qn-IIIe i686 Intel(R) Core(TM)2 Duo CPU T7100 @ 1.80GHz
Timestamp of tree: Tue, 11 Dec 2007 07:47:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p17-r1
dev-java/java-config: 1.3.7, 2.1.3
dev-lang/python:     2.5.1-r4
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.10-r5
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
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.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.23-r2
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=prescott -pipe -fomit-frame-pointer"
CHOST="i686-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/env.d /etc/env.d/java/ /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/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -march=prescott -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--deep --alphabetical"
FEATURES="ccache distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://ftp.tu-clausthal.de/pub/linux/gentoo/ ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/ http://ftp.uni-erlangen.de/pub/mirrors/gentoo ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://ftp.gentoo.mesh-solutions.com/gentoo/ http://pandemonium.tiscali.de/pub/gentoo/ ftp://pandemonium.tiscali.de/pub/gentoo/ http://gentoo.mneisen.org/ ftp://ftp.mneisen.org/gentoo "
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1,--as-needed"
LINGUAS="en de"
MAKEOPTS="-j4"
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/layman/xeffects"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac accessibility acl acpi alsa asf audacious audiofile avi bash-completion berkdb bidi bitmap-fonts bluetooth bzip2 bzlib cairo calendar cdparanoia cdr cli cpdflib cpudetection cracklib crypt cups curl dbm dbus dia directfb divx4linux dri dvd dvdr dvdread encode escreen esd evo exif fbcon ffmpeg firefox flac fortran ftp fuse gd gdbm gif gimpprint glitz glx gnutls gphoto2 gpm gstreamer gtk gtk2 gzip hal hddtemp ibam ical icc iconv icq ieee1394 imap imlib inkjar ipw4965 irda irmc isdnlog jabber java jpeg lcms libwww lirc lm_sensors logrotate mad midi mime mmx mmxext mng mono mp2 mp3 mp4 mpeg mplayer mudflap mysql ncurses nls no-old-linux nptl nptlonly nsplugin nvidia oav obex odbc ogg oggvorbis openal opengl openmp oscar pam pcre pdf pdflib perl php pmu pnf png pnp posix postscript pppd pwdb python qt qt3support qt4 quicktime readline real reflection samba sdl session simplexml slang smp soap sockets speex spell spl sse sse2 sse3 ssl ssse3 startup-notification sub svg svga symlink sysfs sysvipc tcpd threads tiff tk tokenizer truetype truetype-fonts type1-fonts udev unicode usb userlocales utf8 vcd vhosts videos vorbis wddx widescreen wifi win32codecs wine wireshark wmf x264 x86 xcomposite xine xinerama xml xmlrpc xorg xosd xpm xprint xv xvid xvmc zlib" ALSA_CARDS="hda-intel" 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 de" USERLAND="GNU" VIDEO_CARDS="nvidia nv vesa"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

Comment 7 Alon Bar-Lev (RETIRED) gentoo-dev 2007-12-11 13:57:44 UTC
OK... I see that you all have >=glibc-2.7-r0
Comment 8 Alon Bar-Lev (RETIRED) gentoo-dev 2007-12-11 14:00:54 UTC
*** Bug 201939 has been marked as a duplicate of this bug. ***
Comment 9 Alon Bar-Lev (RETIRED) gentoo-dev 2007-12-11 14:05:15 UTC
Upstream requested stack trace of gpg --version or anything which causes segfault.
so if anyone can provide it would be great!
Comment 10 İsmail Dönmez 2007-12-11 14:09:53 UTC
Well sent a backtrace to upstream and use of --disable-padlock-support is suggested and fixes the tests.

Here is the valgrind output and gdb backtrace :

==28359== Invalid read of size 1
==28359==    at 0x4037356: _gcry_detect_hw_features (hwfeatures.c:95)
==28359==  Address 0x4707b263 is not stack'd, malloc'd or (recently) free'd

(gdb) bt
#0  0xb7f61356 in _gcry_detect_hw_features () at hwfeatures.c:95
#1  0xb7f5ded8 in global_init () at global.c:81
#2  0xb7f5e5b3 in _gcry_check_version (req_version=0x8048e54 "1.4.0") at 
global.c:171
#3  0xb7f5d06b in gcry_check_version (req_version=0x8048e54 "1.4.0") at 
visibility.c:66
#4  0x08048a45 in main (argc=Cannot access memory at address 0xd) hmac.c:161
Comment 11 Jakub Moc (RETIRED) gentoo-dev 2007-12-11 14:18:55 UTC
+1

`EXTRA_ECONF="--disable-padlock-support" emerge -1 libgcrypt` fixed gnupg.

Why does it compile w/ padlock support by default and tries to use the features on HW that plain doesn't support any such thing goes beyond me.
Comment 12 İsmail Dönmez 2007-12-11 14:21:29 UTC
valgrind output shows a real bug but I can't read inline asm.
Comment 13 Alon Bar-Lev (RETIRED) gentoo-dev 2007-12-11 15:36:20 UTC
Thank you everyone, added --disable-padlock-support
Comment 14 Stefan.qn 2007-12-12 11:40:08 UTC
EXTRA_ECONF="--disable-padlock-support" emerge -1 libgcrypt` fixed gnupg << Didn't work for me. 
Comment 15 Alon Bar-Lev (RETIRED) gentoo-dev 2007-12-12 12:24:16 UTC
Stefan, can you please produce stack trace?
Emerge the libgcrypt without test feature and then use:
$ gdb gpg
(gdb) set args --version
(gdb) bt

Thanks!
Comment 16 Alon Bar-Lev (RETIRED) gentoo-dev 2007-12-12 13:24:03 UTC
*** Bug 202030 has been marked as a duplicate of this bug. ***
Comment 17 Alon Bar-Lev (RETIRED) gentoo-dev 2007-12-13 15:28:23 UTC
Someone?
Comment 18 Ryan Hill (RETIRED) gentoo-dev 2007-12-14 00:48:32 UTC
works fine for me.
Comment 19 Steffen Bergner 2007-12-14 08:05:11 UTC
Compiles/runs test successful/works on several machines fine -> fixed. Thanks a lot for the low latency.
Comment 20 Jakub Moc (RETIRED) gentoo-dev 2007-12-14 20:59:23 UTC
*** Bug 202324 has been marked as a duplicate of this bug. ***
Comment 21 Jakub Moc (RETIRED) gentoo-dev 2007-12-14 20:59:49 UTC
Please revbump this so that we stop getting the duplicates.
Comment 22 Alon Bar-Lev (RETIRED) gentoo-dev 2007-12-14 21:12:32 UTC
Your wish is my command...
Comment 23 Jakub Moc (RETIRED) gentoo-dev 2007-12-14 21:18:51 UTC
LOL... thanks! :)
Comment 24 Jakub Moc (RETIRED) gentoo-dev 2007-12-15 09:05:48 UTC
*** Bug 201954 has been marked as a duplicate of this bug. ***