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.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to