Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 Jul 2002 19:57:50 +1000 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Andrew Gallatin <gallatin@cs.duke.edu>
Cc:        freebsd-current@FreeBSD.ORG
Subject:   Re: more on dumping
Message-ID:  <20020706192954.I4315-100000@gamplex.bde.org>
In-Reply-To: <15654.31389.772589.952477@grasshopper.cs.duke.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 6 Jul 2002, Andrew Gallatin wrote:

> OK, current is really confusing me.  When we are panic'ing and syncing
> disks, how are we supposed to come back to the current thread which
> caused the dump after we do an mi_switch() to allow an interrupt
> thread to run?
>
> The alpha seems to get stuck running various sorts of kernel
> processes, but it never comes back to the one that caused the dump.
>
> How is this supposed to work?

Accidentally at best.  panic() cannot sleep and should not call
mi_switch(), but sync() wants to do both.  msleep() has a hack that
prevents it from doing very much if (cold || panicstr).  This works
in most cases in FreeBSD-2, but has been rotting as the kernel became
more complicated.  Before KSEII, it was normal for synch() to hit a
deadlock and panic recursively (with no sync() the second time).  KSEII
may have made things worse by putting a lot of code before the hack
in msleep().  The cv_wait() family has the same (cold || panicstr)
hack (including cloned (rotted) comments about doing something to give
interrupts a chance) but no KSE checks before it.

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?20020706192954.I4315-100000>