From owner-freebsd-current@FreeBSD.ORG Wed Dec 22 21:05:57 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DC2FA16A4CE for ; Wed, 22 Dec 2004 21:05:56 +0000 (GMT) Received: from relay02.pair.com (relay02.pair.com [209.68.5.16]) by mx1.FreeBSD.org (Postfix) with SMTP id 6E62343D49 for ; Wed, 22 Dec 2004 21:05:56 +0000 (GMT) (envelope-from pho@holm.cc) Received: (qmail 22702 invoked from network); 22 Dec 2004 21:05:54 -0000 Received: from unknown (HELO peter.osted.lan) (unknown) by unknown with SMTP; 22 Dec 2004 21:05:54 -0000 X-pair-Authenticated: 80.164.63.199 Received: from peter.osted.lan (localhost.osted.lan [127.0.0.1]) by peter.osted.lan (8.13.1/8.13.1) with ESMTP id iBML5sno028129; Wed, 22 Dec 2004 22:05:54 +0100 (CET) (envelope-from pho@peter.osted.lan) Received: (from pho@localhost) by peter.osted.lan (8.13.1/8.13.1/Submit) id iBML5rvp028128; Wed, 22 Dec 2004 22:05:53 +0100 (CET) (envelope-from pho) Date: Wed, 22 Dec 2004 22:05:53 +0100 From: Peter Holm To: Bosko Milekic Message-ID: <20041222210553.GA28108@peter.osted.lan> References: <20041209144233.GA46928@peter.osted.lan> <20041220234103.GA59225@technokratis.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041220234103.GA59225@technokratis.com> User-Agent: Mutt/1.4.2.1i cc: current@freebsd.org Subject: Re: panic: uma_zone_slab is looping X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 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: Wed, 22 Dec 2004 21:05:57 -0000 On Mon, Dec 20, 2004 at 06:41:04PM -0500, Bosko Milekic wrote: > > I realize it's been a while. > > Anyway, what I *think* is going on here is that slab_zalloc() is > actually returning NULL even when called with M_WAITOK. Further > inspection in slab_zalloc() reveals that this could come from several > places. One of them is kmem_malloc() itself, which I doubt will ever > return NULL if called with M_WAITOK. If this assumption is indeed > correct, then the NULL must be being returned by slab_zalloc() itself, > or due to a failed uma_zalloc_internal() call. It is also possible > that slab_zalloc() returns NULL if the init that gets called for the > zone fails. However, judging from the stack trace you provided, the > init in question is mb_init_pack() (kern_mbuf.c). This particular > init DOES perform an allocation and CAN in theory fail, but I believe > it should be called with M_WAITOK as well, and so it should also never > fail in theory. > > Have you gotten any further with the analysis of this particular > trace? If not, I would suggest adding some more printf()s and > analysis into slab_zalloc() itself, to see if that is indeed what is > causing the infinite looping in uma_zone_slab() and, if so, attempt to > figure out what part of slab_zalloc() is returning the NULL. OK, did that: http://www.holm.cc/stress/log/freeze03.html > > Happy Holidays, > -Bosko > > On Thu, Dec 09, 2004 at 03:42:33PM +0100, Peter Holm wrote: > > I modified: > > > > $ cvs diff -u uma_core.c > > Index: uma_core.c > > =================================================================== > > RCS file: /home/ncvs/src/sys/vm/uma_core.c,v > > retrieving revision 1.110 > > diff -u -r1.110 uma_core.c > > --- uma_core.c 6 Nov 2004 11:43:30 -0000 1.110 > > +++ uma_core.c 9 Dec 2004 14:38:32 -0000 > > @@ -1926,6 +1926,7 @@ > > { > > uma_slab_t slab; > > uma_keg_t keg; > > + int i; > > > > keg = zone->uz_keg; > > > > @@ -1943,7 +1944,8 @@ > > > > slab = NULL; > > > > - for (;;) { > > + for (i = 0;;i++) { > > + KASSERT(i < 10000, ("uma_zone_slab is looping")); > > /* > > * Find a slab with some space. Prefer slabs that are partially > > * used over those that are totally full. This helps to reduce > > > > > > and caught this one: > > http://www.holm.cc/stress/log/cons94.html > > -- > > Peter Holm > > _______________________________________________ > > freebsd-current@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-current > > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" > > -- > Bosko Milekic > bmilekic@technokratis.com > bmilekic@FreeBSD.org -- Peter Holm