Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 203591 Details for
Bug 289411
Failure to attach to a pthread
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
`attachstopped.c' testcase to triage the kernel bug without TotalView.
attachstopped.c (text/plain), 1.50 KB, created by
Jan Kratochvil
on 2007-09-23 22:44:20 UTC
(
hide
)
Description:
`attachstopped.c' testcase to triage the kernel bug without TotalView.
Filename:
MIME Type:
Creator:
Jan Kratochvil
Created:
2007-09-23 22:44:20 UTC
Size:
1.50 KB
patch
obsolete
>/* >kill (21773, sig 19) = 0 >PTRACE_ATTACH (21773, 0x0, 0x0) = 0x0 >wait4 (21773, 0x40000002) = (status 0x3c) -512 >PTRACE_CONT (21773, 0x0, 0x0) = -3 (ESRCH) > */ >#define _GNU_SOURCE >#include <assert.h> >#include <unistd.h> >#include <sys/wait.h> >#include <stdio.h> >#include <stdlib.h> >#include <sys/ptrace.h> >#include <stddef.h> >#include <errno.h> >#include <sys/types.h> >#include <string.h> > >static pid_t child; > >static void >cleanup (void) >{ > if (child != 0) > kill (child, SIGKILL); >} > >static void >handler_fail (int signo) >{ > long l; > > signal (SIGABRT, SIG_DFL); > > l = ptrace (PTRACE_CONT, child, NULL, NULL); > if (l != 0) > fprintf (stderr, "PTRACE_CONT: errno = %d\n", errno); > > cleanup (); > > abort (); >} > >static pid_t waiton (pid_t pid, int *status_return) >{ > pid_t got_pid; > > assert (pid > 0 || pid == -1); > > got_pid = waitpid (pid, status_return, WUNTRACED | __WALL); > assert (pid == -1 || got_pid == pid); > return got_pid; >} > >int main (void) >{ > int i, status; > long l; > > atexit (cleanup); > signal (SIGABRT, handler_fail); > signal (SIGINT, handler_fail); > signal (SIGALRM, handler_fail); > > alarm (2); > > child = fork (); > switch (child) > { > case -1: > assert (0); > case 0: > for (;;) > pause(); > /* NOTREACHED */ > assert (0); > default: > break; > } > > i = kill (child, SIGSTOP); > assert (i == 0); > > sleep (1); > > l = ptrace (PTRACE_ATTACH, child, NULL, NULL); > assert (l == 0); > > waiton (child, &status); > assert (WIFSTOPPED (status)); > assert (WSTOPSIG (status) == SIGSTOP); > > return 0; >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 289411
:
194741
|
203581
| 203591 |
203601
|
203611
|
203621