From owner-cvs-src@FreeBSD.ORG Mon Jul 24 17:43:40 2006 Return-Path: X-Original-To: cvs-src@freebsd.org Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 904D316A4ED; Mon, 24 Jul 2006 17:43:40 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2FFD143D53; Mon, 24 Jul 2006 17:43:39 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.4/8.13.4) with ESMTP id k6OHhXWc027188; Mon, 24 Jul 2006 13:43:36 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: Robert Watson Date: Mon, 24 Jul 2006 13:42:37 -0400 User-Agent: KMail/1.9.1 References: <200607210845.k6L8j0Ep026008@repoman.freebsd.org> <20060724000259.GE16230@wantadilla.lemis.com> <20060724130731.D44945@fledge.watson.org> In-Reply-To: <20060724130731.D44945@fledge.watson.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200607241342.38412.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Mon, 24 Jul 2006 13:43:37 -0400 (EDT) X-Virus-Scanned: ClamAV 0.87.1/1614/Fri Jul 21 16:27:38 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on server.baldwin.cx Cc: Tom Rhodes , src-committers@freebsd.org, cvs-src@freebsd.org, cvs-all@freebsd.org, Xin LI , Greg 'groggy' Lehey , Dag-Erling =?iso-8859-1?q?Sm=F8rgrav?= Subject: Re: truss status (was: cvs commit: src/sys/dev/lmc if_lmc.h) X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Jul 2006 17:43:40 -0000 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 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