From owner-freebsd-stable Sat Mar 9 12: 0:56 2002 Delivered-To: freebsd-stable@freebsd.org Received: from InterJet.dellroad.org (adsl-63-194-81-26.dsl.snfc21.pacbell.net [63.194.81.26]) by hub.freebsd.org (Postfix) with ESMTP id B675837B416 for ; Sat, 9 Mar 2002 12:00:37 -0800 (PST) Received: from arch20m.dellroad.org (arch20m.dellroad.org [10.1.1.20]) by InterJet.dellroad.org (8.9.1a/8.9.1) with ESMTP id LAA14727; Sat, 9 Mar 2002 11:52:42 -0800 (PST) Received: (from archie@localhost) by arch20m.dellroad.org (8.11.6/8.11.6) id g29Jq8B54534; Sat, 9 Mar 2002 11:52:08 -0800 (PST) (envelope-from archie) From: Archie Cobbs Message-Id: <200203091952.g29Jq8B54534@arch20m.dellroad.org> Subject: Re: M_NOWAIT is waiting anyway..? In-Reply-To: <200203082112.g28LCcl48040@arch20m.dellroad.org> "from Archie Cobbs at Mar 8, 2002 01:12:38 pm" To: freebsd-stable@freebsd.org Date: Sat, 9 Mar 2002 11:52:08 -0800 (PST) Cc: Tor.Egge@cvsup.no.freebsd.org, dillon@apollo.backplane.com X-Mailer: ELM [version 2.4ME+ PL88 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Archie Cobbs writes: > I'm seeing a panic that suggests that the kernel malloc() implementation > is broken with respect to M_NOWAIT, hard to believe as that is. > Here's the trace: > > > panic: tsleep1 > > Debugger("panic") > > Stopped at Debugger+0x34: movb $0,in_Debugger.426 > > db> tr > > Debugger(c025f03b) at Debugger+0x34 > > panic(c025f50c,c02befd0,1000000,ffffffff,34) at panic+0x70 > > tsleep(c02befd0,4,c0279394,0,c02befd0) at tsleep+0x5e > > acquire(c02befd0,1000000,600,1,c02b3540) at acquire+0x88 > > lockmgr(c02befd0,2,0,0,1) at lockmgr+0x248 > > kmem_malloc(c02befa0,1000,1,0,c06fb700) at kmem_malloc+0x54 > > malloc(c,c02b3540,1,0,c06fb700) at malloc+0x246 FYI, for the benefit of the -stable list.. In an offline conversation Tor Egge and Matt Dillon found and fixed this bug, which has existed since FreeBSD 3.2. In fact, it is possible to sleep in malloc() with M_NOWAIT. The fix (which presumably will be MFC'd soon) was applied to -current in rev. 1.75 of sys/vm/vm_kern.c: http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/vm/vm_kern.c This patch applies to -stable as well as -current. Thanks Tor and Matt! -Archie __________________________________________________________________________ Archie Cobbs * Packet Design * http://www.packetdesign.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message