Date: Mon, 24 Jul 2006 13:42:37 -0400 From: John Baldwin <jhb@freebsd.org> To: Robert Watson <rwatson@freebsd.org> Cc: Tom Rhodes <trhodes@freebsd.org>, src-committers@freebsd.org, cvs-src@freebsd.org, cvs-all@freebsd.org, Xin LI <delphij@freebsd.org>, Greg 'groggy' Lehey <grog@freebsd.org>, Dag-Erling =?iso-8859-1?q?Sm=F8rgrav?= <des@des.no> Subject: Re: truss status (was: cvs commit: src/sys/dev/lmc if_lmc.h) Message-ID: <200607241342.38412.jhb@freebsd.org> In-Reply-To: <20060724130731.D44945@fledge.watson.org> References: <200607210845.k6L8j0Ep026008@repoman.freebsd.org> <20060724000259.GE16230@wantadilla.lemis.com> <20060724130731.D44945@fledge.watson.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Monday 24 July 2006 08:10, Robert Watson wrote: > On Mon, 24 Jul 2006, Greg 'groggy' Lehey wrote: > > > On Friday, 21 July 2006 at 13:29:38 +0200, Dag-Erling Smrgrav wrote: > >> Tom Rhodes <trhodes@FreeBSD.org> writes: > >>> Wait. I'm lost. Isn't truss(1) broken on FreeBSD? > >> > >> Depends on your definition of broken. It kind of works provided you have > >> /proc mounted. Still, there's really not much point in using it; ktrace(1) > >> is better in almost all respects. > > > > truss is good in that it gives immediate output. I used it recently under > > 6.1, and I somehow missed that it was broken. > > A few things are wrong with truss, none that make it completely broken: > > (1) In the past there were a number of reports of problems with race > conditions during truss attach/detach. These reports have entirely > disappeared, as far as I can tell, due to process locking fixes, procfs > fixes, debugging fixes, etc. If they still exist, they should be > investigated, but up-to-date debugging infomation will be needed. I think the PHOLD/P_WEXIT stuff in 6.1 might have fixed these. > (2) truss relies on procfs, which is known to be evil, and as such, doesn't > work out of the box since we don't mount procfs out of the box. Several > people have worked on enhancing ptrace() so that it can be used to > implement truss, but no one has finished this work. I think the necessary > ptrace() traps now exist for system calls so that this could be done. Well, the biggest thing I found when doing the PHOLD/P_WEXIT stuff that was missing was PIOCWAIT and PIOCCONT (IIRC). Specifically, we don't currently have any ptrace() equivalent to that. -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607241342.38412.jhb>