Bug 240961 - Multithreaded process left Stopped (T) on CTRL-C of strace
Summary: Multithreaded process left Stopped (T) on CTRL-C of strace
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: strace (Show other bugs)
(Show other bugs)
Version: rawhide
Hardware: x86_64 Linux
medium
medium
Target Milestone: ---
Assignee: Roland McGrath
QA Contact: Brian Brock
URL:
Whiteboard:
Keywords:
Depends On:
Blocks: 222053
TreeView+ depends on / blocked
 
Reported: 2007-05-23 14:09 UTC by Jan Kratochvil
Modified: 2007-11-30 22:12 UTC (History)
0 users

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

Description Jan Kratochvil 2007-05-23 14:09:16 UTC
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 14:09:16 UTC
Created attachment 155241 [details]
Testcase.

Comment 2 Jan Kratochvil 2007-05-23 14:30:12 UTC
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 14:54:32 UTC
Created attachment 155252 [details]
Bugfix (this time incl. the forgotten ChangeLog entry).

Comment 4 Jan Kratochvil 2007-05-24 17:05:25 UTC
Created attachment 155366 [details]
Bugfix updated according to the Roland's comments.

Comment 5 Jan Kratochvil 2007-05-24 17:06:04 UTC
Created attachment 155367 [details]
Testcase for the PTRACE_KILL change of the last bugfix.

Comment 6 Jan Kratochvil 2007-06-10 16:00:23 UTC
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 12:01:15 UTC
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 17:59:11 UTC
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.