Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Mar 2002 11:52:08 -0800 (PST)
From:      Archie Cobbs <archie@dellroad.org>
To:        freebsd-stable@freebsd.org
Cc:        Tor.Egge@cvsup.no.freebsd.org, dillon@apollo.backplane.com
Subject:   Re: M_NOWAIT is waiting anyway..?
Message-ID:  <200203091952.g29Jq8B54534@arch20m.dellroad.org>
In-Reply-To: <200203082112.g28LCcl48040@arch20m.dellroad.org> "from Archie Cobbs at Mar 8, 2002 01:12:38 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200203091952.g29Jq8B54534>