Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Aug 2004 17:01:13 -0400 (EDT)
From:      Robert Watson <robert@fledge.watson.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   bin/70803: truss wedges if child exits at the wrong moment
Message-ID:  <200408212101.i7LL1Dsn091059@fledge.watson.org>
Resent-Message-ID: <200408212110.i7LLAP4B089745@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Aug 21 21:10:25 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Robert Watson
>Release:        FreeBSD 6.0-CURRENT i386
>Organization:
FreeBSD Project
>Environment:
System: FreeBSD paprika 6.0-CURRENT FreeBSD 6.0-CURRENT #0: Fri Aug 20 10:04:06 EDT 2004     rwatson@paprika:/usr/obj/usr/src/sys/PAPRIKA  i386

>Description:

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.

>How-To-Repeat:

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

>Fix:

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".
>Release-Note:
>Audit-Trail:
>Unformatted:


Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200408212101.i7LL1Dsn091059>