NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/52117: ptrace(2) PTRACE_FORK fails on some platforms
The following reply was made to PR kern/52117; it has been noted by GNATS.
From: "Kamil Rytarowski" <n54%gmx.com@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc:
Subject: Re: kern/52117: ptrace(2) PTRACE_FORK fails on some platforms
Date: Tue, 28 Mar 2017 14:56:53 +0200
Example taken from evbarm:
Test case: kernel/t_ptrace_wait4/fork1
Duration: 0.030507 seconds
Termination reason
FAILED: /usr/src/tests/kernel/t_ptrace_wait.h:295: Reported exited process
Standard output stream
Before forking process PID=12298
Parent process PID=12298, child's PID=19554
Before calling PT_TRACE_ME from child 19554
Before calling wait4() for the child
Before raising Stopped (signal) from child
Enable PTRACE_FORK in EVENT_MASK for the child 19554
Before resuming the child process where it left off and without signal to be sent
Before calling wait4() for the child 19554
Reported PTRACE_FORK event with forkee 11702
Before calling wait4() for the forkee 11702 of the child 19554
It means that fork(2) must generate two SIGTAP events:
- first for child (traced parent) with TRAP_CHLD, pe_report_event=PTRACE_FORK, pe_other_pid=child2
- second for child2 (traced child of child) with TRAP_CHLD, pe_report_event=PTRACE_FORK, pe_other_pid=child
The test waits infinitely for the second SIGRAP.
There is a hand-shake for forking.
Debuggers calls wait*(2) twice, one after another, without operation of resuming
its traced processes between the wait*(2) calls.
Home |
Main Index |
Thread Index |
Old Index