Project

General

Profile

Actions

Bug #2313

closed

truss doesn't work on 3.0/ -master

Added by vsrinivas over 12 years ago. Updated almost 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
02/25/2012
Due date:
% Done:

0%

Estimated time:

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.

Actions #1

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
<> 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

Actions #2

Updated by nthery over 12 years ago

  • Status changed from New to In Progress
  • Assignee set to nthery
Actions #3

Updated by vsrinivas over 12 years ago

Nicolas -- were you working on this? Or just commenting where the problems were?

Thanks!

Actions #4

Updated by vsrinivas over 12 years ago

Nicolas -- Happen to have an update wrt truss? How's it going?

Actions #5

Updated by dillon almost 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.

Actions

Also available in: Atom PDF