Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 May 2014 22:20:01 GMT
From:      Nathan Whitehorn <nwhitehorn@freebsd.org>
To:        freebsd-ppc@FreeBSD.org
Subject:   Re: powerpc/183040: Nested signal handling is broken
Message-ID:  <201405272220.s4RMK1VT054371@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR powerpc/183040; it has been noted by GNATS.

From: Nathan Whitehorn <nwhitehorn@freebsd.org>
To: Julio Merino <julio@meroh.net>, FreeBSD-gnats-submit@freebsd.org
Cc:  
Subject: Re: powerpc/183040: Nested signal handling is broken
Date: Tue, 27 May 2014 15:12:43 -0700

 On 10/16/13 16:49, Julio Merino wrote:
 >> Number:         183040
 >> Category:       powerpc
 >> Synopsis:       Nested signal handling is broken
 >> Confidential:   no
 >> Severity:       serious
 >> Priority:       medium
 >> Responsible:    freebsd-ppc
 >> State:          open
 >> Quarter:
 >> Keywords:
 >> Date-Required:
 >> Class:          sw-bug
 >> Submitter-Id:   current-users
 >> Arrival-Date:   Thu Oct 17 00:00:00 UTC 2013
 >> Closed-Date:
 >> Last-Modified:
 >> Originator:     Julio Merino
 >> Release:        FreeBSD 11.0-CURRENT powerpc
 >> Organization:
 >> Environment:
 > System: FreeBSD mastodon.meroh.net 11.0-CURRENT FreeBSD 11.0-CURRENT #9 r256450M: Mon Oct 14 16:35:08 EDT 2013 jmmv@mastodon.meroh.net:/usr/obj/usr/src/sys/GENERIC64 powerpc
 >
 > Also affects FreeBSD 10.0 alphas.
 >
 > 	
 >> Description:
 > 	When programming a given signal twice in a nested manner, the
 > 	unprogramming of the top-most signal handler does not properly
 > 	restore the previous (non-default handler).  In other words:
 >
 > 	program signal X
 > 	  program signal X
 > 	    deliver signal X to self -- custom handler runs
 > 	  unprogram signal X
 > 	  deliver signal X to self -- default handler runs or not delivered
 > 	unprogram signal X
 >
 > 	Interestingly, things seem to work well for X = SIGTERM but not
 > 	for X = SIGHUP nor X = SIGINT.  I have not tested other signals.
 >
 > 	I have encountered this bug while running the kyua test suite
 > 	on a powerpc64 machine (specifics detailed above) and noticing
 > 	a couple of tests fail, which work well in other operating
 > 	systems and in amd64.  The test case below is derived form the
 > 	code in kyua.
 >
 > 	Here is the output of the test program on an amd64 machine,
 > 	which to my knowledge is working properly:
 >
 
 Your test program behaves as described with cc -O0 on ppc64. At any 
 other optimization level, or if I build a 32-bit version, it works 
 correctly. I'm a little bit at a loss beyond that.
 -Nathan
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201405272220.s4RMK1VT054371>