Bug 117028

Summary: gdb can't unwind the stack across altstack signal handler boundary
Product: Red Hat Enterprise Linux 3 Reporter: Johan Walles <johan.walles>
Component: gdbAssignee: Elena Zannoni <ezannoni>
Status: CLOSED DUPLICATE QA Contact: Jay Turner <jturner>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0CC: cagney, ihse, jjohnstn, srevivo
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-02-21 19:01:41 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
Repro case. Break in handler() and do "bt" to get an incomplete stacktrace none

Description Johan Walles 2004-02-27 16:23:00 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624

Description of problem:
I'll attach a program that sets up an altstack signal handler for
SIGUSR1.  Gdb can't walk the stack across the signal handler boundary.


Version-Release number of selected component (if applicable):
gdb-6.0post-0.20031117.6

How reproducible:
Always

Steps to Reproduce:
1. Build the test program I'll soon attach.
2. Start gdb.
3. Put a breakpoint in handler()
4. run

    

Actual Results:  johan@quark:~/src/test$ gdb -nx sigaltstack3
GNU gdb Red Hat Linux (6.0post-0.20031117.6rh)
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "i386-redhat-linux-gnu"...Using host
libthread_db library "/lib/tls/libthread_db.so.1".
 
(gdb) break handler
Breakpoint 1 at 0x804849e: file sigaltstack3.c, line 18.
(gdb) run
Starting program: /home/johan/src/test/sigaltstack3
main(): Hello
 
Program received signal SIGUSR1, User defined signal 1.
0xb75ebc32 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
(gdb) c
Continuing.
 
Breakpoint 1, handler (sig=10, si=0xb6551c98, ctxt=0xb6551d18) at
sigaltstack3.c:18
18         printf("Signal handler: Hello\n");
(gdb) bt
#0  handler (sig=10, si=0xb6551c98, ctxt=0xb6551d18) at sigaltstack3.c:18
#1  <signal handler called>


Expected Results:  I expected to get a full stack trace, not just
covering the signal handler.


Additional info:

Comment 1 Johan Walles 2004-02-27 16:24:01 UTC
Created attachment 98108 [details]
Repro case.  Break in handler() and do "bt" to get an incomplete stacktrace

Comment 2 Johan Walles 2004-03-02 08:36:49 UTC
This is a regression.  I just tried the same test with a vanilla (i.e.
no Redhat patches) 5.3 and 6.0.

The test works fine with gdb-5.3, but fails with 6.0.


Comment 3 Andrew Cagney 2004-03-22 16:25:47 UTC

*** This bug has been marked as a duplicate of 117972 ***

Comment 4 Red Hat Bugzilla 2006-02-21 19:01:41 UTC
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.