strace hangs waiting for lock

Dan Nelson dnelson at
Wed Jan 7 07:43:19 PST 2004

In the last episode (Jan 06), Jens Schweikhardt said:
> it appears the devel/strace port's strace utility does not work
> anymore (haven't tried for a long time, so this could be long
> standing issue). To reproduce:
> schweikh at hal9000:~ 1 $ strace -V
> strace -- version 4.5.1
> schweikh at hal9000:~ $ uname -a
> FreeBSD 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Mon Dec 22 15:03:45 CET 2003     toor at  i386
> schweikh at hal9000:~ $ strace ls       # does nothing, just waits.
> ^C

It's intermittent on my machine.  Sometimes it works, sometimes it
doesn't.  Sounds like there's a race being lost somewhere.  Stracing an
existing process with -p always works for me.

<plug> If you're using strace because truss doesn't decode what you
want, try applying the patches in PR 52190.  It adds support for 8 more
common syscalls. </plug>

	Dan Nelson
	dnelson at

More information about the freebsd-current mailing list