From owner-freebsd-current Wed Aug 14 1:50:12 2002 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 3D28037B400 for ; Wed, 14 Aug 2002 01:50:10 -0700 (PDT) Received: from avocet.mail.pas.earthlink.net (avocet.mail.pas.earthlink.net [207.217.120.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id C825043E65 for ; Wed, 14 Aug 2002 01:50:09 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from pool0004.cvx21-bradley.dialup.earthlink.net ([209.179.192.4] helo=mindspring.com) by avocet.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 17etqs-0007dH-00; Wed, 14 Aug 2002 01:50:03 -0700 Message-ID: <3D5A1982.87B8C015@mindspring.com> Date: Wed, 14 Aug 2002 01:49:06 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: sjh@ucf.ics.uci.edu Cc: current@freebsd.org Subject: Re: bremfree: bp 0xc77938f4 not locked (Most recently used by kqueue) References: <200208130533.g7D5Xql13446@whiskey.ucf.ics.uci.edu> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Seth Hettich wrote: > I get this all the time, and have for months now. On two different > systems (both updated to -current about 2 times per month), both > PCs (but with greatly differing HW). > > What would be my first step to resolve this? I sent in a PR, with > lots of notes, things I tried, and stack dumps. I'm willing to do > some more work on it, if someone can point me in the right direction. > > panic: bremfree: bp 0xc77938f4 not locked > panic messages: > --- > panic: Most recently used by kqueue Having just finished documenting all of the kqueue code internals for my own use, I can tell you exactly where this problem lies. If you look at the kqueue code itself, in /sys/kern/kern_event.c, you will see the function knote(). The knote() function is conceptually very simple; it iterates the knote list hung off an object on which an event has just occurred, and calls the function kn->kn_fop->f_event(kn, hint). If you remember Julian's recent commit to the queue.h to make the list iterators unsafe to do removes in (OK, technically, he didn't make the change for that, it was just a very important undesirable side effect 8-)), you will understand the problem. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message