Bug 110038 - Can't debug multithread programs with GDB
Summary: Can't debug multithread programs with GDB
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: glibc
Version: 8.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-11-14 12:00 UTC by Marco Fais
Modified: 2016-11-24 15:20 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-08-26 04:26:29 UTC
Embargoed:


Attachments (Terms of Use)

Description Marco Fais 2003-11-14 12:00:33 UTC
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 12:04:10 UTC
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-15 00:23:46 UTC
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 08:34:43 UTC
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 16:56:52 UTC
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 21:15:55 UTC
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 21:23:25 UTC
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 04:26:29 UTC
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.