Bug 110038 - Can't debug multithread programs with GDB
Can't debug multithread programs with GDB
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: glibc (Show other bugs)
8.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-11-14 07:00 EST by Marco Fais
Modified: 2007-04-18 12:59 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-08-26 00:26:29 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Marco Fais 2003-11-14 07:00:33 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET 
CLR 1.1.4322)

Description of problem:
Hi!

In the last glibc release for RedHat 8, the shared 
library /lib/libthread_db-1.0.so is stripped

root@dalmata[/lib]# file libthread_db-1.0.so 
libthread_db-1.0.so: ELF 32-bit LSB shared object, Intel 80386, 
version 1 (SYSV), stripped

This prevents multithread programs from being debugged with gdb.

This is the signal that I get:

Program received signal SIG32, Real-time event 32.
0x40038a35 in pthread_getconcurrency () from /lib/i686/libpthread.so.0
(gdb) 

This problem is described here:

http://groups.google.it/groups?hl=it&lr=&ie=UTF-8&oe=UTF-
8&threadm=OF51C64164.3FDCA54D-ONC1256A5A.0029EBFF%
40icos.be&rnum=2&prev=/groups%3Fhl%3Dit%26lr%3D%26ie%3DUTF-8%26oe%
3DUTF-8%26q%3Dgdb%2BSIG32

I'm currently rebuilding the glibc package to see if the unstripped 
library solve this problem.

Bye!

Version-Release number of selected component (if applicable):
glibc-2.3.2-4.80.8

How reproducible:
Always

Steps to Reproduce:
1. Try to debug a multithread program
2. GDB doesn't handle properly some signals
3.
    

Actual Results:  The program stops with a SIG32

Expected Results:  The programs continues making new threads and 
executing correctly

Additional info: The library is stripped also in the i686 package
Comment 1 Marco Fais 2003-11-14 07:04:10 EST
In the previous version (glibc-2.3.2-4.80.6) this library wasn't 
stripped:

root@asgw[/lib]# file libthread_db-1.0.so 
libthread_db-1.0.so: ELF 32-bit LSB shared object, Intel 80386, 
version 1 (SYSV), not stripped

and multithreaded programs debug correctly with GDB.
Comment 2 Marco Fais 2003-11-14 19:23:46 EST
Seems that also this lib create problems to gdb when it's stripped:

libpthread-0.10.so

In my case, rebuilding the glibc package without stripping:
/lib/libpthread-0.10.so
/lib/i686/libpthread-0.10.so
/lib/libthread_db-1.0.so

solves all the problems with gdb and multithreaded programs.
Comment 3 Ulrich Drepper 2003-11-18 03:34:43 EST
Confirmed.  Some screwup in the build system which conflicts with the
settings in the RPM.  We'll probably provide a new version, but only
after we are sure we cover other potential problems with this errata.
Comment 4 R.K.Aa. 2004-02-10 11:56:52 EST
Has anything happened here? Or does anyone know of "contrib" packages
of a functional current glibc for RH8?
Comment 5 Ron Wolf 2004-03-22 16:15:55 EST
I'm having this problem, running RH8, with the latest glibc2.3.2-
4.80.8.  Has there been any updates since 2/10?
Comment 6 Keith McDuffee 2004-03-29 16:23:25 EST
In case anyone needs to know, here's the diff of the glibc.spec file
for rebuilding the RPM's with unstripped libraries using "rpmbuild -bb
glibc.spec":

# diff glibc.spec-orig glibc.spec
581c581
<     if [ "$i" = libc.so -o "$i" = libpthread.so ]; then
---
>     if [ "$i" = libc.so -o "$i" = libpthread.so -o "$i" =
libpthread-0.10.so -o "$i" = libthread_db-1.0.so ]; then

Comment 7 Ulrich Drepper 2004-08-26 00:26:29 EDT
Out-of-date release.  The current RPMs should not have any such
problems.  And if they have, a separate bug should be filed.

Note You need to log in before you can comment on or make changes to this bug.