Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 196031
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo Toolchain Maintainers <toolchain@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Axel Mueller <aegges@web.de>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
glibc-nostrip-libpthread.patch glibc-nostrip-libpthread.patch patch Nathan Caldwell 2007-10-29 23:36 0000 361 bytes Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 196031 depends on: Show dependency tree
Bug 196031 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2007-10-16 11:26 0000
After upgrading to glibc 2.6.1 I cannot debug any program with gdb (6.6-r2)
that is multithreaded. If a breakpoint is hit I get:
"ptrace: No such process."
If a try to backtrace then I get the following:
"Couldn't get registers: No such process."

If the application crashes during a gdb session I cannot backtrace, too.

No problem with single threaded applications.

glibc was the only thing I did update. An upgrade to gdb 6.7 did not help. My
colleagues have reported the same issue. He did a downgrade of glibc and this
solved the problems with gdb.

Reproducible: Always




Portage 2.1.3.9 (default-linux/x86/2007.0, gcc-3.4.6, glibc-2.6.1-r0,
2.6.22-gentoo-r8 i686)
=================================================================
System uname: 2.6.22-gentoo-r8 i686 Intel(R) Pentium(R) 4 CPU 3.00GHz
Timestamp of tree: Mon, 15 Oct 2007 01:47:01 +0000
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632)
[disabled]
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p17
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python:     2.4.4-r5
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.9-r2
sys-apps/sandbox:    1.2.17
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.3.16
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.22-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium4 -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/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /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=pentium4 -pipe -fomit-frame-pointer
-fvisibility-inlines-hidden"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks metadata-transfer parallel-fetch 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
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/ "
LC_ALL="de_DE.utf8"
LDFLAGS="-Wl,-O1"
LINGUAS="en de"
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/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X acl alsa apache2 bitmap-fonts boundschecking bzip2 cairo cli cracklib
crypt cups dbus dri fastcgi gdbm glibc-omitfp gpm gtk2 hal iconv isdnlog jpeg
kde midi mmx mudflap ncurses nls nptl nptlonly nsplugin openmp pam pcre pdf
perl png pppd python qt readline reflection session spell spl sqlite3 sse sse2
ssl svg tcpd threads tiff truetype-fonts type1-fonts unicode wmf x86 xinerama
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 mulaw multi null plug rate route
share shm softvol" 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="i810 vesa mga"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, PORTAGE_COMPRESS,
PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

------- Comment #1 From Axel Mueller 2007-10-16 11:30:53 0000 -------
There is already a bug report filed in at the gdb website.
http://sourceware.org/cgi-bin/gnatsweb.pl?database=gdb
Bug report 2321.

------- Comment #2 From Nathan Caldwell 2007-10-29 20:42:08 0000 -------
http://sourceware.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gdb&pr=2321
> I suspect that your ld.so or
> libpthread.so is stripped of the symbols GDB needs to debug threads.

So, I tried reemerging glibc with USE="debug" and FEATURES="nostrip".
Before:
$ file /lib/libpthread-2.6.1.so 
/lib/libpthread-2.6.1.so: ELF 64-bit LSB shared object, x86-64, version 1
(SYSV), for GNU/Linux 2.6.9, stripped

After:
$ file /lib/libpthread-2.6.1.so
/lib/libpthread-2.6.1.so: ELF 64-bit LSB shared object, x86-64, version 1
(SYSV), for GNU/Linux 2.6.9, not stripped

And, GDB works now. So it seems that the ebuild is stripping libpthread when it
really shouldn't. I tried stripping both ld-2.6.1.so and libpthread-2.6.1.so,
and the only time GDB gives me the "ptrace: no such process" is when I strip
libpthread, stripping ld-2.6.1.so doesn't seem to affect GDB at all.

Hopefully one of the glibc maintainers can fix this so we can actually use GDB
again without having to install a fully non stripped copy of glibc.

------- Comment #3 From Nathan Caldwell 2007-10-29 23:36:51 0000 -------
Created an attachment (id=134666) [details]
glibc-nostrip-libpthread.patch

Here's a patch to fix stripping of libpthread. Hopefully this will speed the
integration into the ebuild (well technically the eblit file) itself a little
bit.

It also looks like this isn't the first time this has happened see Bug 46186.
Also notice the last comment, it looks like someone noticed earlier as well.

------- Comment #4 From SpanKY 2007-12-09 09:11:19 0000 -------
*** Bug 198448 has been marked as a duplicate of this bug. ***

------- Comment #5 From SpanKY 2007-12-10 01:22:38 0000 -------
fixed in cvs and released with glibc-2.7-r1

http://sources.gentoo.org/sys-libs/glibc/files/eblits/src_install.eblit?r1=1.3&r2=1.4

------- Comment #6 From SpanKY 2007-12-13 07:24:06 0000 -------
*** Bug 202026 has been marked as a duplicate of this bug. ***

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug