Date: Thu, 26 Jan 2006 11:13:33 -0600 From: Dan Nelson <dnelson@allantgroup.com> To: Proniewski Patrick <patrick.proniewski@univ-lyon2.fr> Cc: freebsd-questions@freebsd.org Subject: Re: truss and procfs strange problem. Message-ID: <20060126171333.GB52542@dan.emsphone.com> In-Reply-To: <6F2F4E06-712A-4E3D-9124-7AC7E1B964BD@univ-lyon2.fr> References: <6F2F4E06-712A-4E3D-9124-7AC7E1B964BD@univ-lyon2.fr>
next in thread | previous in thread | raw e-mail | index | archive | help
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@allantgroup.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060126171333.GB52542>