truss and procfs strange problem.

Dan Nelson dnelson at
Thu Jan 26 14:33:52 PST 2006

In the last episode (Jan 26), Proniewski Patrick said:
> I have some new details :
> >>	$ truss ls
> >>	truss: cannot open /proc/4509/mem: No such file or directory
> in that case, the command issued as a truss argument (ls, ...) is
> stuck in state "D". `man ps` says it "Marks a process in disk (or
> other short term, uninterruptible) wait."

I think that's this case:

parent                        child
------                        -----
call fork()
fork() returns
                              (being created)
open /proc/%d/mem (fails)
                              (still being created)
                              creation complete, waiting
                              for parent to trace

> these process wont be killed, I'll have to reboot. (procctl won't
> clear the processes...)

You can continue tracing these processes if you run "truss -p <pid>",
since that's pretty much what they're waiting for :)

	Dan Nelson
	dnelson at

More information about the freebsd-questions mailing list