From owner-freebsd-current Thu Feb 8 22:12: 4 2001 Delivered-To: freebsd-current@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id B2DAA37B491 for ; Thu, 8 Feb 2001 22:11:44 -0800 (PST) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id RAA24970; Fri, 9 Feb 2001 17:11:33 +1100 Date: Fri, 9 Feb 2001 17:10:05 +1100 (EST) From: Bruce Evans X-Sender: bde@besplex.bde.org To: Alexander Leidinger Cc: current@FreeBSD.ORG Subject: Re: kernel trap 12 with interrupts disabled In-Reply-To: <200102081819.f18IJSC10666@Magelan.Leidinger.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, 8 Feb 2001, Alexander Leidinger wrote: > if I run a program compiled with gcc's function profiling option I get > "kernel trap 12 with interrupts disabled". This happens with the standard profiling option -pg. Pagefaults occur in copyin() (called from addupc_task() which is called from ast()) while sched_lock is held. This is not good. Incrementing the profiling counters is supposed to be pushed to ordinary process context so that things like copyin() can work (they have to be able to fault in pages, so they have to be able to sleep...), so using sched_lock to lock things here is wrong. > If I run it withhin X11, the machine deadlocks hard (no response from > the numlock led on the keyboard), withhin a virtual console I get a lot > of "kernel trap ..." and the program runs fine. It's surprising that it doesn't always deadlock. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message