From owner-cvs-all@FreeBSD.ORG Sat Aug 30 07:41:36 2003 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 534FD16A4BF; Sat, 30 Aug 2003 07:41:36 -0700 (PDT) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 57C8043FBF; Sat, 30 Aug 2003 07:41:35 -0700 (PDT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.12.9/8.12.9) with ESMTP id h7UEf3rO058253; Sat, 30 Aug 2003 10:41:03 -0400 (EDT) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)h7UEf2tW058250; Sat, 30 Aug 2003 10:41:03 -0400 (EDT) Date: Sat, 30 Aug 2003 10:41:02 -0400 (EDT) From: Robert Watson X-Sender: robert@fledge.watson.org To: Mike Silbersack In-Reply-To: <20030830023923.Q811@odysseus.silby.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/net if_ethersubr.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Aug 2003 14:41:36 -0000 On Sat, 30 Aug 2003, Mike Silbersack wrote: > On Fri, 29 Aug 2003, Robert Watson wrote: > > > Introduce error checking for calls to M_PREPEND(): > > > > ether_output() when prepending netatalk AFA_PHASE2 llc headers (TRYWAIT). > > ether_output() when prepending ethernet header to a frame (DONTWAIT). > > I may have mentioned this before, but it would really useful to have > code which we could easily paste where needed that would do a "fail once > per caller". > > This would be much more useful than random failures in detecting callers > that don't check return values because it would ensure that each case > was hit, whereas random failures only offer a statistical chance that it > will happen after a sufficiently long period of time. > > I'm envisioning something which keeps a linked list of caller > addresses... horribly inefficient, but useable enough to be hidden > being a FAILURE_STRESS_TEST option. I think that sounds very useful; the current patches are coming out of a grep of the source tree for instances of M_PREPEND(), which seems to have been a victim of copy-and-paste previousy. I have several more such fixes locally, especially in the NFS code, but my crash boxes have been down since the recent thunderstorm which (a) knocked out the power, and (b) revealed a leak in the roof of the lab I'm using at work. I'll commit those fixes once I've had a chance to exercise them some. Happily (?), almost all of our memory allocation is done using wrapper macros, which means we could fairly easily implement what you have in mind. The other thing we should encourage developers to do more is use code coverage tools -- phk recently pointed me at kernbb(8) as a way to feed gcov(1). Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Network Associates Laboratories