bin/70803: truss wedges if child exits at the wrong moment

Robert Watson robert at
Sat Aug 21 14:10:26 PDT 2004

>Number:         70803
>Category:       bin
>Synopsis:       truss wedges if child exits at the wrong moment
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Aug 21 21:10:25 GMT 2004
>Originator:     Robert Watson
>Release:        FreeBSD 6.0-CURRENT i386
FreeBSD Project
System: FreeBSD paprika 6.0-CURRENT FreeBSD 6.0-CURRENT #0: Fri Aug 20 10:04:06 EDT 2004     rwatson at paprika:/usr/obj/usr/src/sys/PAPRIKA  i386


When truss is run on a non-present binary, the child process appears to exit
at an untimely moment sometimes leaving the parent truss process wedged.


Mount procfs.
Run truss with a target program name that is not found.

paprika# truss notfound
truss: execvp notfound: No such file or directory
load: 0.48  cmd: truss 61304 [pioctl] 0.00u 0.00s 0% 772k


No fix attached.  However, it appears to wedge in the first call to
ioctl() in the parent process following the fork() in
setup.c:setup_and_wait().  ps(1) reveals the child process is a zombie
and is marked "<defunct>".  It looks like the ioctl() is not returning
S_EXIT for some reason.  If I insert a sleep(5) before the call to err()
in the child, it still gets into this state, so perhaps the pioctl()
code is not being notified of a child exit, or is treating a zombie as
"still alive".

More information about the freebsd-bugs mailing list