From owner-freebsd-current@FreeBSD.ORG Tue Jan 15 22:53:09 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 72E6236A; Tue, 15 Jan 2013 22:53:09 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay02.stack.nl [IPv6:2001:610:1108:5010::104]) by mx1.freebsd.org (Postfix) with ESMTP id 21BFFF3D; Tue, 15 Jan 2013 22:53:09 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id D28243592EB; Tue, 15 Jan 2013 23:53:05 +0100 (CET) Received: by snail.stack.nl (Postfix, from userid 1677) id AEB042848C; Tue, 15 Jan 2013 23:53:05 +0100 (CET) Date: Tue, 15 Jan 2013 23:53:05 +0100 From: Jilles Tjoelker To: Garrett Cooper Subject: Re: ktrace -d broken on current/stable-9 Message-ID: <20130115225305.GA12294@stack.nl> References: <4850A09B-A054-4B38-891C-06673F7195B2@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4850A09B-A054-4B38-891C-06673F7195B2@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: FreeBSD Current , kib@FreeBSD.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2013 22:53:09 -0000 On Mon, Jan 14, 2013 at 06:48:13PM -0800, Garrett Cooper wrote: > I tried using ktrace on a kernel compiled a week ago, and it appears > to not be following forks like it should on amd64: > # ktrace -d ./regress -l > [snip] > Not sure how it broke, but it was working a couple months ago (in > particular I remember it working either around October or November), > and the bug seems to have worked its way back to 9-STABLE (I'm running > into the same problem if I do ktrace -d, enter a shell, then exec > another shell from that shell). Haven't spent the time to bisect the > commits looking for the culprit (yet), but if need be I'll trace down > the culprit sometime this week. > truss works, so it doesn't seem like ptrace(2) is broken. ktrace -d is not really useful in the synopsis with a command. It only means that the child processes of ktrace (at a time just before it executes the utility) should be traced as well. This is almost always an empty set, unless you do things like cmd1 & ktrace -d cmd2 which will trace cmd2 and part of cmd1. You probably want ktrace -i. -- Jilles Tjoelker