Bug 498595 - gcore unstopping SIGSTOPped processes
Summary: gcore unstopping SIGSTOPped processes
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: gdb
Version: 5.3
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Jan Kratochvil
QA Contact: BaseOS QE
URL:
Whiteboard:
Depends On: 456333 496732
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-05-01 12:15 UTC by Jan Kratochvil
Modified: 2018-10-20 01:57 UTC (History)
6 users (show)

Fixed In Version: gdb-6.8-34.el5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-09-02 11:27:22 UTC
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2009:1361 0 normal SHIPPED_LIVE gdb bug fix update 2009-09-01 10:57:06 UTC

Description Jan Kratochvil 2009-05-01 12:15:17 UTC
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 18:43:18 UTC
~~ 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 11:27:22 UTC
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.