[DragonFlyBSD - Bug #2313] truss doesn't work on 3.0/ -master
Nicolas Thery via Redmine
bugtracker-admin at leaf.dragonflybsd.org
Sun Feb 26 14:02:22 PST 2012
Issue #2313 has been updated by Nicolas Thery.
Hello,
I've observed both behaviors too.
The hang is a deadlock between the father process (truss) and the child
being exec'ed (e.g. ls). The father waits for the child to stop in
procfs_ioctl (PIOCWAIT). The child waits in PSTALL() in
exec_new_vmspace() for the father to PRELE() its reference to the
child.
This deadlocks because of pfs_find() which PHOLD()'s the child at the
beginning of procfs_ioctl() and keeps the reference while sleeping.
One possible fix would be to keep track of the number of
procfs_ioctl(PIOCWAIT) sleepers and adjust the expected lock count
passed to PSTALL (there is already such an adjustment for the vfork()
case). This requires adding a new field to struct proc though. I'm
in the process of trying this.
As an aside the tests for P_INEXEC in procfs_open() and procfs_ioctl()
are suspicious. The flag could be set just after being tested.
Cheers,
Nicolas
On 25 February 2012 17:24, Venkatesh Srinivas via Redmine
<bugtracker-admin at leaf.dragonflybsd.org> wrote:
>
> Issue #2313 has been reported by Venkatesh Srinivas.
>
> ----------------------------------------
> Bug #2313: truss doesn't work on 3.0/ -master
> http://bugs.dragonflybsd.org/issues/2313
>
> Author: Venkatesh Srinivas
> Status: New
> Priority: Normal
> Assignee:
> Category:
> Target version:
>
>
> truss on master stalls on 'exec1' or enters a loop of::
>
> truss: PIOCWAIT top of loop: Inappropriate ioctl for device
> truss: PIOCCONT: Inappropriate ioctl for device
>
> when tracing /bin/ls, among other programs.
>
>
> --
> You have received this notification because you have either subscribed to it, or are involved in it.
> To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account
----------------------------------------
Bug #2313: truss doesn't work on 3.0/ -master
http://bugs.dragonflybsd.org/issues/2313
Author: Venkatesh Srinivas
Status: New
Priority: Normal
Assignee:
Category:
Target version:
truss on master stalls on 'exec1' or enters a loop of::
truss: PIOCWAIT top of loop: Inappropriate ioctl for device
truss: PIOCCONT: Inappropriate ioctl for device
when tracing /bin/ls, among other programs.
--
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account
More information about the Bugs
mailing list