Description of problem: While trying to detach a multithreaded program to remain T (stopped) it works on i686 but some tasks are left unstopped on x86_64. Singlethreaded program is left T (stopped) reliably. Version-Release number of selected component (if applicable): FAIL F-9 kernel-2.6.25.6-55.fc9.x86_64 FAIL F-9 kernel-vanilla-2.6.25.6-55.vanilla.fc9.x86_64 (KVM) PASS F-9 kernel-2.6.25.6-55.fc9.i686 (KVM) PASS F-9 kernel-vanilla-2.6.25.6-55.vanilla.fc9.i686 (KVM) PASS RHEL-5.2 kernel-2.6.18-92.el5.x86_64 PASS RHEL-4.6 kernel-smp-2.6.9-67.0.20.EL.x86_64 vanilla-2.4.33.i686 nothing stopped (FAIL) But it is very racy, any of these PASSes can be in fact also a FAIL. How reproducible: With #define THREADS 10 or more in fact always. Steps to Reproduce: gcc -o detach-stopped detach-stopped.c -Wall -ggdb2 -pthread;./detach-stopped;echo $? Actual results: 0: State: S (sleeping) 1: State: S (sleeping) 2: State: T (stopped) 3: State: S (sleeping) 4: State: T (stopped) 5: State: T (stopped) 6: State: T (stopped) 7: State: T (stopped) 8: State: T (stopped) 9: State: T (stopped) 1 Expected results: 0: State: T (stopped) 1: State: T (stopped) 2: State: T (stopped) 3: State: T (stopped) 4: State: T (stopped) 5: State: T (stopped) 6: State: T (stopped) 7: State: T (stopped) 8: State: T (stopped) 9: State: T (stopped) 0 Additional info: Please advice wherether it is supposed to work at all. Due to the racy behavior one can never be sure just by the kernel black-box testing. Additional delays during the detaching do not help anything.
Created attachment 311250 [details] Testcase.
FYI kernel-2.6.26-0.131.rc9.git9.fc10.x86_64 is stable that it NEVER stops the detached tasks.
Created attachment 312150 [details] man-pages-2.78-2.fc9.noarch patch. As RHEL-5.3 behaves according to the `Expected state' and the GDB sources contain: On newer GNU/Linux kernels (>= 2.5.61) the handling of SIGSTOP for a ptraced process has changed. Earlier versions of the kernel would ignore these SIGSTOPs, while now SIGSTOP is treated like any other signal, i.e. it is not muffled. If the gdb user does a 'continue' after the 'attach', gdb passes the global variable stop_signal (which stores the signal from the attach, SIGSTOP) to the ptrace(PTRACE_CONT,...) call. This is problematic, because the kernel doesn't ignore such SIGSTOP now. If the RHEL-5.3 behavior is the desired state proposing the attached ptrace(2) man page update.
Made this Bug the official F-9 problem instance for: http://sources.redhat.com/cgi-bin/cvsweb.cgi/~checkout~/tests/ptrace-tests/tests/detach-stopped.c?cvsroot=systemtap FAIL F-9 kernel-2.6.25.9-76.fc9.x86_64 FAIL RHEL-5 kernel-2.6.18-92.1.6.el5.x86_64 FAIL RHEL-5 kernel-2.6.18-92.1.6.el5.i686 FAIL RHEL-5 kernel-2.6.18-53.el5.s390x PASS RHEL-4 kernel-smp-2.6.9-67.0.20.EL.x86_64
Is this fixed in 2.6.26.6-79.fc9?
Yes, fixed in 2.6.26.6-79.fc9
My bad. This is the only testcase which is NOT fixed in F9 yet, and I erroneously closed the bug! :| Reopening. Not fixed in 2.6.26.6-79.fc9.
This message is a reminder that Fedora 9 is nearing its end of life. Approximately 30 (thirty) days from now Fedora will stop maintaining and issuing updates for Fedora 9. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '9'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 9's end of life. Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 9 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora please change the 'version' of this bug to the applicable version. If you are unable to change the version, please add a comment here and someone will do it for you. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Fedora 9 changed to end-of-life (EOL) status on 2009-07-10. Fedora 9 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. Thank you for reporting this bug and we are sorry it could not be fixed.