Bug 141327 - Signal masking errors when handler aborted due to bogus altstack
Summary: Signal masking errors when handler aborted due to bogus altstack
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel (Show other bugs)
(Show other bugs)
Version: 4.0
Hardware: All Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Ric Wheeler
QA Contact: Brian Brock
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-11-30 14:48 UTC by Ric Wheeler
Modified: 2012-06-20 13:25 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-20 13:25:44 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Test program (from Bodo Stroesser) (4.74 KB, text/plain)
2004-11-30 14:51 UTC, David Woodhouse
no flags Details
Proposed fix for ppc64. (4.64 KB, patch)
2004-11-30 15:01 UTC, David Woodhouse
no flags Details | Diff

Description David Woodhouse 2004-11-30 14:48:58 UTC
User-Agent:       
Build Identifier: 

Run attached test program. It shows that although we mask out certain signals in
preparation for running a signal handler, we don't restore the signal mask when
we find that the alternate stack for the handler isn't valid and force a SEGV:
 
Installing signal handler for SIGSEGV, sa_mask = full mask - SIGUSR1
Installing signal handler for SIGALRM, SA_ONSTACK with invalid stack, sa_mask =
full mask - SIGUSR1
 
 
===== Test 1: signal SIGALRM while waiting in sigsuspend() =====
 
Unblocking all signals
Calling alarm(2)
Calling sigsuspend( emptyset + SIGUSR1)
After return from sigsuspend(), blocked all signals, saved returned mask
OK: sigsuspend(): Interrupted system call
OK: sighandler for SIGALRM (14) didn't run (invalid stack)
ERROR: SIGSEGV is masked at end of test
ERROR: sighandler for SIGSEGV (11) didn't run
ERROR: SIGUSR1 is masked
ERROR: SIGUSR2 is masked
SIGSEGV is pending at end of test, unblocking it now ...
Signal 11 caught
... done
 
 
===== Test 2: signal SIGALRM while waiting in nanosleep() =====
 
Unblocking all signals
Calling alarm(2)
Calling nanosleep( 20s)
After return from nanosleep(), blocked all signals, saved returned mask
OK: nanosleep(): Interrupted system call
OK: sighandler for SIGALRM (14) didn't run (invalid stack)
ERROR: SIGSEGV is masked at end of test
ERROR: sighandler for SIGSEGV (11) didn't run
ERROR: SIGUSR1 is masked
ERROR: SIGUSR2 is masked
SIGSEGV is pending at end of test, unblocking it now ...
Signal 11 caught
... done
 
 
Test ended with errors


Reproducible: Always
Steps to Reproduce:

Comment 1 David Woodhouse 2004-11-30 14:51:50 UTC
Created attachment 107626 [details]
Test program (from Bodo Stroesser)

Comment 2 David Woodhouse 2004-11-30 15:01:29 UTC
Created attachment 107627 [details]
Proposed fix for ppc64.

Comment 3 Ernie Petrides 2004-12-03 03:39:14 UTC
David Woodhouse, is this bug being reported on RHEL3 or RHEL4?

Comment 4 David Woodhouse 2004-12-03 11:34:34 UTC
Against RHEL4; sorry. RHEL3 is differently broken -- it doesn't even
allow the test program to trap SEGV, so just dies thus:

===== Test 1: signal SIGALRM while waiting in sigsuspend() =====

Unblocking all signals
Calling alarm(2)
Calling sigsuspend( emptyset + SIGUSR1)
Segmentation fault


Comment 11 Jiri Pallich 2012-06-20 13:25:44 UTC
Thank you for submitting this issue for consideration in Red Hat Enterprise Linux. The release for which you requested us to review is now End of Life. 
Please See https://access.redhat.com/support/policy/updates/errata/

If you would like Red Hat to re-consider your feature request for an active release, please re-open the request via appropriate support channels and provide additional supporting details about the importance of this issue.


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