Bug 240961 - Multithreaded process left Stopped (T) on CTRL-C of strace
Multithreaded process left Stopped (T) on CTRL-C of strace
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: strace (Show other bugs)
rawhide
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: Roland McGrath
Brian Brock
:
Depends On:
Blocks: 222053
  Show dependency treegraph
 
Reported: 2007-05-23 10:09 EDT by Jan Kratochvil
Modified: 2007-11-30 17:12 EST (History)
0 users

See Also:
Fixed In Version: 4.5.16-1.fc7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-08-06 13:59:33 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)
Testcase. (404 bytes, text/plain)
2007-05-23 10:09 EDT, Jan Kratochvil
no flags Details
Fix. (1.02 KB, patch)
2007-05-23 10:30 EDT, Jan Kratochvil
no flags Details | Diff
Bugfix (this time incl. the forgotten ChangeLog entry). (1.22 KB, patch)
2007-05-23 10:54 EDT, Jan Kratochvil
no flags Details | Diff
Bugfix updated according to the Roland's comments. (2.21 KB, patch)
2007-05-24 13:05 EDT, Jan Kratochvil
no flags Details | Diff
Testcase for the PTRACE_KILL change of the last bugfix. (880 bytes, text/plain)
2007-05-24 13:06 EDT, Jan Kratochvil
no flags Details
Bugfix update #2 according to the Roland's comments. (5.55 KB, patch)
2007-06-10 12:00 EDT, Jan Kratochvil
no flags Details | Diff

  None (edit)
Description Jan Kratochvil 2007-05-23 10:09:16 EDT
Description of problem:
In some cases the multithreaded application gets Stopped (T, by SIGSTOP) and
needs to be sent `kill -CONT'.  Shell prints:
[1]+  Stopped                 appname args

Version-Release number of selected component (if applicable):
strace-4.5.15-1.fc6.x86_64

How reproducible:
Always with the attached testcase, rarely on real apps.

Steps to Reproduce:
1. gcc -o mt3-stop mt3-stop.c -Wall -ggdb2 -pthread
2. ./mt3-stop
3. On other console: strace -f -p `pidof mt3-stop`

Actual results:
[1]+  Stopped                 ./mt3-stop

Expected results:
`mt3-stop' left running without any strace(1) notice.

Additional info:
General package protoize(1)ation may fix more bugs.
Comment 1 Jan Kratochvil 2007-05-23 10:09:16 EDT
Created attachment 155241 [details]
Testcase.
Comment 2 Jan Kratochvil 2007-05-23 10:30:12 EDT
Created attachment 155245 [details]
Fix.

Bugfix.

The testcase requires also fix from the strace Bug 240962 to reliably pass.

(It may statistically improve the success chance a bit.)
Comment 3 Jan Kratochvil 2007-05-23 10:54:32 EDT
Created attachment 155252 [details]
Bugfix (this time incl. the forgotten ChangeLog entry).
Comment 4 Jan Kratochvil 2007-05-24 13:05:25 EDT
Created attachment 155366 [details]
Bugfix updated according to the Roland's comments.
Comment 5 Jan Kratochvil 2007-05-24 13:06:04 EDT
Created attachment 155367 [details]
Testcase for the PTRACE_KILL change of the last bugfix.
Comment 6 Jan Kratochvil 2007-06-10 12:00:23 EDT
Created attachment 156669 [details]
Bugfix update #2 according to the Roland's comments.

Another testcase is also included.
Comment 7 Jan Kratochvil 2007-08-03 08:01:15 EDT
Fixed in Rawhide strace-4.5.16-1.fc8:
* Fri Aug  3 2007 Roland McGrath <roland@redhat.com> - 4.5.16-1
- fix multithread issues ([...], #240961, [...])

and upstream:

2007-07-05  Jan Kratochvil  <jan.kratochvil@redhat.com>

        * strace.c (detach): New prototype.  Extended the function comment.
        [LINUX] (detach): Call droptcb() instead of the wrongly parametrized
        detach() call.
        (handle_group_exit): Call droptcb() instead of the wrongly parametrized
        detach() call.  Always call detach() only once from the group leader.
        Comment the leader killing known bug tested by `test/leaderkill.c'.
        Code advisory: Roland McGrath
        Fixes RH#240961.

        * test/leaderkill.c: New file.
        * test/.cvsignore, test/Makefile: Add it.
Comment 8 Fedora Update System 2007-08-06 13:59:11 EDT
strace-4.5.16-1.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.

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