From owner-freebsd-stable@FreeBSD.ORG Tue Apr 11 16:46:49 2006 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A78DF16A402 for ; Tue, 11 Apr 2006 16:46:49 +0000 (UTC) (envelope-from jonas.wolz@freenet.de) Received: from mout0.freenet.de (mout0.freenet.de [194.97.50.131]) by mx1.FreeBSD.org (Postfix) with ESMTP id B6AED43D48 for ; Tue, 11 Apr 2006 16:46:46 +0000 (GMT) (envelope-from jonas.wolz@freenet.de) Received: from [194.97.50.135] (helo=mx2.freenet.de) by mout0.freenet.de with esmtpa (Exim 4.61) (envelope-from ) id 1FTM0r-0000aI-1Z for freebsd-stable@freebsd.org; Tue, 11 Apr 2006 18:46:45 +0200 Received: from p54a439cb.dip0.t-ipconnect.de ([84.164.57.203] helo=pc1) by mx2.freenet.de with esmtpsa (ID jonas.wolz@freenet.de) (TLSv1:AES256-SHA:256) (Exim 4.61-RC1 #1) id 1FTM0q-0006Yr-Rq for freebsd-stable@freebsd.org; Tue, 11 Apr 2006 18:46:45 +0200 Received: from jonas by pc1 with local (Exim 4.50) id 1FTM0o-0003Gk-2g for freebsd-stable@freebsd.org; Tue, 11 Apr 2006 18:46:42 +0200 From: Jonas Wolz To: freebsd-stable@freebsd.org Date: Tue, 11 Apr 2006 18:46:41 +0200 User-Agent: KMail/1.7.2 References: <200604101145.26621.jonas.wolz@freenet.de> <200604111521.15572.jonas.wolz@freenet.de> <20060411155250.GB4297@dan.emsphone.com> In-Reply-To: <20060411155250.GB4297@dan.emsphone.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200604111846.41946.jonas.wolz@freenet.de> Subject: Re: truss problems X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Apr 2006 16:46:49 -0000 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