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.
~~ 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.
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