Bug 91269

Summary: bad signal number status for waitpid of killed thread under nptl
Product: [Retired] Red Hat Linux Reporter: John Reiser <jreiser>
Component: glibcAssignee: Jakub Jelinek <jakub>
Status: CLOSED RAWHIDE QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 9CC: fweimer, mitr
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: 2003-07-08 22:31:08 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
testcase bug.c none

Description John Reiser 2003-05-20 17:26:55 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020529

Description of problem:
After a thread has been killed with SIGKILL, then waitpid() returns a status
with an unrelated and varying signal number.

Version-Release number of selected component (if applicable):
glibc-2.3.2-27.9

How reproducible:
Always

Steps to Reproduce:
1. Compile and run the attached test program, which uses the test-skeleton.c
framework from glibc internal testcases.
2.
3.
    

Actual Results:  $ gcc -pthread -g -o bug bug.c
In file included from bug.c:41:
../test-skeleton.c: In function `create_temp_file':
../test-skeleton.c:112: warning: passing arg 1 of `strcpy' makes pointer from
integer without a cast
$ ./bug
child pid=3126  status=0x211
Timed out: the child process got signal Child exited
$ ./bug
child pid=3129  status=0x212
Timed out: the child process got signal Continued
$ ./bug
child pid=3132  status=0x214
Timed out: the child process got signal Stopped
$ ./bug
child pid=3135  status=0x215
Timed out: the child process got signal Stopped (tty input)
$ ./bug
child pid=3138  status=0x216
Timed out: the child process got signal Stopped (tty output)
$ ./bug
child pid=3141  status=0x217
Timed out: the child process got signal Urgent I/O condition
$ ps
  PID TTY          TIME CMD
 2963 pts/0    00:00:00 bash
 3143 pts/0    00:00:00 ps
$ gdb
(gdb) p/x 3143
$1 = 0xc47   ## so the randomness appears to be unrelated to PID.


Expected Results:  The signal number reported by the status should be SIGKILL.

Additional info:

Comment 1 John Reiser 2003-05-20 17:28:43 UTC
Created attachment 91831 [details]
testcase bug.c

Testcase that uses test-skeleton.c from glibc internal testcases.