Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 Feb 2001 17:10:05 +1100 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Alexander Leidinger <Alexander@Leidinger.net>
Cc:        current@FreeBSD.ORG
Subject:   Re: kernel trap 12 with interrupts disabled
Message-ID:  <Pine.BSF.4.21.0102091633220.12261-100000@besplex.bde.org>
In-Reply-To: <200102081819.f18IJSC10666@Magelan.Leidinger.net>

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0102091633220.12261-100000>