truss problems

Jonas Wolz jonas.wolz at freenet.de
Tue Apr 11 16:46:49 UTC 2006


Am Dienstag, 11. April 2006 17:52 schrieb Dan Nelson:
> In the last episode (Apr 11), Jonas Wolz said:
> > If I call "truss -f sh test.sh" I get errors when execve() is called
> > to start /bin/echo, for example: (56179 is the first /bin/echo
> > (started without error), 56178 is /bin/sh)
>
> I think this is because truss immediately tries to attach to the child
> process after the fork, and if it isn't completely set up, things like
> ioctl(PIOCWAIT) and opening /proc/*/mem will fail.  Try the attached
> patch (for 5.*, but should apply to newer versions).

After applying the patch I seem to get the errors even more often than with 
the unpatched truss. :(

Searching for the string "top of loop" in the error message I also noticed 
that the error seems to occur in main.c (line 275) and not in setup.c.
Unfortunately I don't know enough about the interaction between FreeBSD and 
truss to have a clue why that ioctl fails.

Jonas


More information about the freebsd-stable mailing list