Red Hat Bugzilla – Bug 240961
Multithreaded process left Stopped (T) on CTRL-C of strace
Last modified: 2007-11-30 17:12:05 EST
Description of problem:
In some cases the multithreaded application gets Stopped (T, by SIGSTOP) and
needs to be sent `kill -CONT'. Shell prints:
+ Stopped appname args
Version-Release number of selected component (if applicable):
Always with the attached testcase, rarely on real apps.
Steps to Reproduce:
1. gcc -o mt3-stop mt3-stop.c -Wall -ggdb2 -pthread
3. On other console: strace -f -p `pidof mt3-stop`
+ Stopped ./mt3-stop
`mt3-stop' left running without any strace(1) notice.
General package protoize(1)ation may fix more bugs.
Created attachment 155241 [details]
Created attachment 155245 [details]
The testcase requires also fix from the strace Bug 240962 to reliably pass.
(It may statistically improve the success chance a bit.)
Created attachment 155252 [details]
Bugfix (this time incl. the forgotten ChangeLog entry).
Created attachment 155366 [details]
Bugfix updated according to the Roland's comments.
Created attachment 155367 [details]
Testcase for the PTRACE_KILL change of the last bugfix.
Created attachment 156669 [details]
Bugfix update #2 according to the Roland's comments.
Another testcase is also included.
Fixed in Rawhide strace-4.5.16-1.fc8:
* Fri Aug 3 2007 Roland McGrath <email@example.com> - 4.5.16-1
- fix multithread issues ([...], #240961, [...])
2007-07-05 Jan Kratochvil <firstname.lastname@example.org>
* strace.c (detach): New prototype. Extended the function comment.
[LINUX] (detach): Call droptcb() instead of the wrongly parametrized
(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
* test/leaderkill.c: New file.
* test/.cvsignore, test/Makefile: Add it.
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.