Date: Sat, 30 Aug 2003 10:41:02 -0400 (EDT) From: Robert Watson <rwatson@FreeBSD.org> To: Mike Silbersack <silby@silby.com> Cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/net if_ethersubr.c Message-ID: <Pine.NEB.3.96L.1030830102835.47993J-100000@fledge.watson.org> In-Reply-To: <20030830023923.Q811@odysseus.silby.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.96L.1030830102835.47993J-100000>