Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 238352

Summary: Fix backtrace for overlapping functions like nanosleep(3)
Product: Red Hat Enterprise Linux 5 Reporter: Jan Kratochvil <jan.kratochvil>
Component: gdbAssignee: Jan Kratochvil <jan.kratochvil>
Status: CLOSED ERRATA QA Contact:
Severity: low Docs Contact:
Priority: medium    
Version: 5.0CC: cagney
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2007-0554 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-11-07 18:07:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
threadcrash.c testcase.
none
"gdb1" file part of the testcase. none

Description Jan Kratochvil 2007-04-29 19:04:23 UTC
Description of problem:
Sometimes backtrace shows "??" instead of the function name.

Version-Release number of selected component (if applicable):
gdb-6.5-16.el5.i386

How reproducible:
Always for the problematic (overlapping) functions.

Steps to Reproduce:
1. gcc -o threadcrash threadcrash.c -ggdb3 -Wall -pthread
2. gdb --command=gdb1

Actual results:
#0  0x00ab7402 in __kernel_vsyscall ()
#1  0x0077ec66 in ?? () from /lib/i686/nosegneg/libc.so.6
                  ^^
#2  0x0077ea5c in __sleep (seconds=0) at ../sysdeps/unix/sysv/linux/sleep.c:138
#3  0x08048880 in makeSyscall (ignored=0x0) at threadcrash.c:137
#4  0x00867402 in start_thread (arg=0xb7f55b90) at pthread_create.c:296
#5  0x007bf38e in clone () from /lib/i686/nosegneg/libc.so.6


Expected results:
#0  0x0095a402 in __kernel_vsyscall ()
#1  0x0077ec66 in nanosleep () from /lib/i686/nosegneg/libc.so.6
                  ^^^^^^^^^
#2  0x0077ea5c in __sleep (seconds=0) at ../sysdeps/unix/sysv/linux/sleep.c:138
#3  0x08048880 in makeSyscall (ignored=0x0) at threadcrash.c:137
#4  0x00867402 in start_thread (arg=0xb7fbdb90) at pthread_create.c:296
#5  0x007bf38e in clone () from /lib/i686/nosegneg/libc.so.6

Additional info:
It has been accepted upstream:
  http://sources.redhat.com/ml/gdb-patches/2007-01/msg00274.html

Comment 1 Jan Kratochvil 2007-04-29 19:04:24 UTC
Created attachment 153743 [details]
threadcrash.c testcase.

Comment 2 Jan Kratochvil 2007-04-29 19:11:38 UTC
Created attachment 153744 [details]
"gdb1" file part of the testcase.

Comment 3 Jan Kratochvil 2007-04-29 19:12:52 UTC
qa_ack: Included testcase `gdb.arch/i386-size-overlap.exp`.


Comment 5 RHEL Program Management 2007-04-29 19:23:27 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 6 Andrew Cagney 2007-05-10 21:12:17 UTC
Dev-ack, backport of upstream fix.

Comment 12 errata-xmlrpc 2007-11-07 18:07:53 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2007-0554.html