Bug 125204

Summary: Backtrace does not work from signalhandler
Product: Red Hat Enterprise Linux 3 Reporter: Otto Bruggeman <otto.bruggeman>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0CC: nphilipp
Target Milestone: ---   
Target Release: ---   
Hardware: ia64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-08-03 01:30:12 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
Output of the test program
none
The test program
none
Proposed patch that fixed this on SLES8 none

Description Otto Bruggeman 2004-06-03 16:01:22 UTC
Description of problem: 
The backtrace() function crashes somewhere in libgcc when called from 
a signal handler. 
 
Version-Release number of selected component (if applicable): 
gcc/libgcc 3.2.3-34 
 
How reproducible: 
Always 
 
Steps to Reproduce: 
1. run attached program (bt-test.c) 
   
Actual results: 
See attached file (output.txt) 
 
Expected results: 
No crashes inside the crashhandler 
 
Additional info: 
SuSE SLES8 had the same problem and I solved it by linking libgcc to 
libunwind.so (the package from David Mosberger from HP) so it uses 
the unwinding functions from libunwind. Attached you will find the 
patches I created for the gcc source rpm for SuSE, I hope they will 
apply properly to the gcc sources since the SuSE gcc was 3.2.2 and 
this is 3.2.3. But this will give you the idea to fix this. You need 
version 0.97 otherwise it will not work either (at least that was my 
experience with SuSE).

Comment 1 Otto Bruggeman 2004-06-03 16:03:33 UTC
Created attachment 100841 [details]
Output of the test program

Comment 2 Otto Bruggeman 2004-06-03 16:04:36 UTC
Created attachment 100842 [details]
The test program

Comment 3 Otto Bruggeman 2004-06-03 16:06:49 UTC
Created attachment 100843 [details]
Proposed patch that fixed this on SLES8

Comment 4 Otto Bruggeman 2004-06-03 16:07:50 UTC
Version 0.97 of libunwind that is. 

Comment 6 Jakub Jelinek 2004-06-19 08:09:59 UTC
ftp://people.redhat.com/jakub/glibc/errata/3.2.3-37/

Comment 7 Otto Bruggeman 2004-07-08 16:40:59 UTC
We have finally tested this (lack of system to test on) and it works 
perfectly according to me and some of my colleagues. Thanks for 
fixing it ! Now we just need to know when we can expect this patch to 
appear somewhere in a service pack/quarterly update/hotfix/whatever.  

Comment 8 Jay Turner 2004-08-03 01:30:12 UTC
An errata 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-2004-385.html