Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

strace-4.15 hangs on launch #2216

Closed
DHowett-MSFT opened this issue Jun 13, 2017 · 3 comments
Closed

strace-4.15 hangs on launch #2216

DHowett-MSFT opened this issue Jun 13, 2017 · 3 comments

Comments

@DHowett-MSFT
Copy link

  • Your Windows build number: 16215

  • What you're doing and what's happening:

$ strace -V
strace -- version 4.15
$ strace ls
<hangs>
  • Strace of the failing command, if applicable:

Using strace-4.9 to trace strace-4.15

clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7fe7bec809d0) = 14731
rt_sigaction(SIGTTOU, {SIG_IGN, [], SA_RESTORER, 0x7fe7be693030}, NULL, 8) = 0
rt_sigaction(SIGTTIN, {SIG_IGN, [], SA_RESTORER, 0x7fe7be693030}, NULL, 8) = 0
rt_sigaction(SIGHUP, {0x7fe7bee75990, [], SA_RESTORER, 0x7fe7be693030}, NULL, 8) = 0
rt_sigaction(SIGINT, {0x7fe7bee75990, [], SA_RESTORER, 0x7fe7be693030}, NULL, 8) = 0
rt_sigaction(SIGQUIT, {0x7fe7bee75990, [], SA_RESTORER, 0x7fe7be693030}, NULL, 8) = 0
rt_sigaction(SIGPIPE, {0x7fe7bee75990, [], SA_RESTORER, 0x7fe7be693030}, NULL, 8) = 0
rt_sigaction(SIGTERM, {0x7fe7bee75990, [], SA_RESTORER, 0x7fe7be693030}, NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [HUP INT QUIT PIPE TERM], NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
wait4(-1, [{WIFSTOPPED(s) && WSTOPSIG(s) == SIGSTOP}], __WALL, NULL) = 14731
rt_sigprocmask(SIG_BLOCK, [HUP INT QUIT PIPE TERM], NULL, 8) = 0
ptrace(PTRACE_GETREGSET, 14731, NT_PRSTATUS, [{0x7fe7bf1066a0, 216}]) = -1 EINVAL (Invalid argument)
ptrace(PTRACE_GETREGS, 14731, 0, 0x7fe7bf1066a0) = 0
ptrace(PTRACE_SETOPTIONS, 14731, 0, PTRACE_O_TRACESYSGOOD|PTRACE_O_TRACEEXEC|PTRACE_O_TRACEEXIT) = -1 EINVAL (Invalid argument)
fstat(2, {st_mode=S_IFCHR|0660, st_rdev=makedev(4, 1), ...}) = 0
ioctl(2, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
write(2, "/usr/bin/strace: PTRACE_SETOPTIO"..., 53/usr/bin/strace: PTRACE_SETOPTIONS: Invalid argument
) = 53
getpid()                                = 14729
kill(14731, SIGCONT)                    = 0
kill(14731, SIGTERM)                    = 0
wait4(14731,

The wait on the subprocess hangs, but only after ptrace(PTRACE_SETOPTIONS, child, ..., PTRACE_O_TRACESYSGOOD|PTRACE_O_TRACEEXEC|PTRACE_O_TRACEEXIT) fails with EINVAL

This appears to be similar to #548, but I cannot reopen it.

@DHowett-MSFT
Copy link
Author

It looks like the primary difference between the trace of 4.12 and the trace of 4.15 is PTRACE_O_TRACEEXIT.

@therealkenc
Copy link
Collaborator

It is being tracked in #555. There's further discussion about strace-4.recent in #1578 (message).

@benhillis
Copy link
Member

Marking as a duplicate of #555.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants