Subject: Re: signal delivery debugging
To: Emmanuel Dreyfus <manu@netbsd.org>
From: Nathan J. Williams <nathanw@wasabisystems.com>
List: tech-kern
Date: 03/29/2002 11:34:33
manu@netbsd.org (Emmanuel Dreyfus) writes:

> This situation is a bit weird to me: I beleive that a process cannot
> hang the machine when in user mode. Is this always true? If it is, then
> this means that Photoshop made a system call and the system got hang in
> kernel mode before getting in the system call handler. This would mean
> that Photoshop does some black magic with system call that the code in
> locore does not handle properly. How can I check for this? And How can I
> debug this? 

You're right that a process should not be able to hang the system
while executing user code. But bugs that make that happen aren't
impossible. (I once had a bug on the i386 from the fact that the
system flags and user flags are in the same register, and I was
letting a user system call set the entire register, which happened to
disable interrupts in userspace)

You might extend your debugging to log entry and exit from the system
call routine, which will help you determine whether the hang is in the
kernel or in userspace. 

        - Nathan