Bug 498595 - gcore unstopping SIGSTOPped processes
gcore unstopping SIGSTOPped processes
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: gdb (Show other bugs)
5.3
All Linux
low Severity medium
: rc
: ---
Assigned To: Jan Kratochvil
BaseOS QE
: Regression
Depends On: 456333 496732
Blocks:
  Show dependency treegraph
 
Reported: 2009-05-01 08:15 EDT by Jan Kratochvil
Modified: 2010-10-23 05:19 EDT (History)
6 users (show)

See Also:
Fixed In Version: gdb-6.8-34.el5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-09-02 07:27:22 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Workaround for `gdb-6.8-attach-signalled-detach-stopped.patch'. (1.10 KB, patch)
2009-05-01 08:15 EDT, Jan Kratochvil
no flags Details | Diff

  None (edit)
Description Jan Kratochvil 2009-05-01 08:15:17 EDT
Created attachment 342079 [details]
Workaround for `gdb-6.8-attach-signalled-detach-stopped.patch'.

Description of problem:
In RHEL-4 if you did kill -STOP $multithreaded_process and then gcore $multithreaded_process then it would stay stopped.  It is no longer so in RHEL-5 due to a kernel Bug 496732 = kernel Bug 456333.

As RHEL-5 kernel should stay compatible in its behavior and the workaround is simple for GDB proposing this patch.  This problem exists in all the RHEL-5 kernels.

Version-Release number of selected component (if applicable):
gdb-6.8-27.el5.x86_64
kernel-xen-2.6.18-128.1.6.el5.x86_64

How reproducible:
Always.

Steps to Reproduce:

echo -e '#include<pthread.h>\n#include<unistd.h>\nmain(){pthread_t t;pthread_create(&t,NULL,pause,NULL);pause();}'|gcc -o t -x c - -pthread

./t&p=$!;sleep 1;kill -STOP $p

gcore $p;sleep 1;grep State /proc/$p/task/*/status
  
Actual results:
[...]
Saved corefile core.27470
[...]
/proc/27470/task/27470/status:State:	S (sleeping)
/proc/27470/task/27472/status:State:	T (stopped)

Expected results:
Saved corefile core.27545
[...]
/proc/27545/task/27545/status:State:	T (stopped)
/proc/27545/task/27547/status:State:	T (stopped)

Additional info:
For singlethreaded processes this problem does not exist.
Comment 8 Chris Ward 2009-07-03 14:43:18 EDT
~~ Attention - RHEL 5.4 Beta Released! ~~

RHEL 5.4 Beta has been released! There should be a fix present in the Beta release that addresses this particular request. Please test and report back results here, at your earliest convenience. RHEL 5.4 General Availability release is just around the corner!

If you encounter any issues while testing Beta, please describe the issues you have encountered and set the bug into NEED_INFO. If you encounter new issues, please clone this bug to open a new issue and request it be reviewed for inclusion in RHEL 5.4 or a later update, if it is not of urgent severity.

Please do not flip the bug status to VERIFIED. Only post your verification results, and if available, update Verified field with the appropriate value.

Questions can be posted to this bug or your customer or partner representative.
Comment 11 errata-xmlrpc 2009-09-02 07:27:22 EDT
An advisory 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 therefore 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-2009-1361.html

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