Re: truss and procfs strange problem.
- From: Dan Nelson <dnelson@xxxxxxxxxxxxxxx>
- Date: Thu, 26 Jan 2006 11:13:33 -0600
In the last episode (Jan 26), Proniewski Patrick said:
> I experience a strange problem with truss on FreeBSD 5.4 p8 :
>
> $ truss ls
> truss: cannot open /proc/4509/mem: No such file or directory
> $ truss ls
> truss: PIOCWAIT: Input/output error
The child process probably hasn't been fully started by the time the
parent tries to attach to it. Adding a sleep(1) inside
setup_and_wait() in setup.c just before it tries to open /proc/%d/mem
is a quick hack that works. A better solution would be to retry the
open and ioctl calls if they fail, after a short wait (but only doing
so for a couple seconds in case there was a problem starting the child
process).
I have no idea why the PIOCWAIT ioctl would fail like that; the code
path doesn't look like it's even able to return EIO.
--
Dan Nelson
dnelson@xxxxxxxxxxxxxxx
_______________________________________________
freebsd-questions@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@xxxxxxxxxxx"
- Follow-Ups:
- Re: truss and procfs strange problem.
- From: Proniewski Patrick
- Re: truss and procfs strange problem.
- From: Proniewski Patrick
- Re: truss and procfs strange problem.
- References:
- truss and procfs strange problem.
- From: Proniewski Patrick
- truss and procfs strange problem.
- Prev by Date: Re: cannot find -ldl
- Next by Date: Re: cannot find -ldl
- Previous by thread: truss and procfs strange problem.
- Next by thread: Re: truss and procfs strange problem.
- Index(es):