Bug #2313
closedtruss doesn't work on 3.0/ -master
0%
Description
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.
Updated by nthery over 12 years ago
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@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/2313Author: 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 devicewhen 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
Updated by nthery over 12 years ago
- Status changed from New to In Progress
- Assignee set to nthery
Updated by vsrinivas over 12 years ago
Nicolas -- were you working on this? Or just commenting where the problems were?
Thanks!
Updated by vsrinivas over 12 years ago
Nicolas -- Happen to have an update wrt truss? How's it going?
Updated by dillon about 12 years ago
- Status changed from In Progress to Closed
The truss issue should be fixed in master now, though it still complains on some of the EAGAIN return values processes. Processes should no longer be getting stuck.