Date: Wed, 9 May 2001 13:47:49 -0400 (EDT) From: Robert Watson <rwatson@FreeBSD.org> To: John Baldwin <jhb@FreeBSD.org> Cc: tlambert2@mindspring.com, Dennis Glatting <dennis.glatting@software-munitions.com>, Kris Kennaway <kris@obsecurity.org>, freebsd-stable@frebsd.org, freebsd-current@FreeBSD.org, Dag-Erling Smorgrav <des@ofug.org> Subject: Re: pgm to kill 4.3 via vm Message-ID: <Pine.NEB.3.96L.1010509134456.11741z-100000@fledge.watson.org> In-Reply-To: <XFMail.010509092102.jhb@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 9 May 2001, John Baldwin wrote: > I am more worried about the fact that you can deadlock the debugger. > What does the debugger do if another process hold the proc lock on the > process you want to kill? Cute, eh? The debugger is an extra special > environment. Most of the time you've panic'ed when you are in there > (but then the panicstr tests that skip lock operations save you from > that). Also, in the debugger you know that no other threads are > running. This is why 'show pcpu' can list spin locks on other cpu's > safely, for example. I'm not sure if a ddb 'kill' command shouldn't be > better implemented using a 'trylock' and refusing to send the signal if > it can't get the lock so it can avoid doing really bad things. I > suppose it wouldn't deadlock but would switch to the other task and > start running. Of course, this would be most disastrous if the current > task we just dropped to the debugger in holds a spin lock. :( It sounds like what people really want is a kernel supervisor running on a vty, perhaps ttyv8 or something, which is a kernel process and not a user process, and is less prone to failure than a root shell, and hence less likely to get deadlocked on vnodes, etc, etc, which would offer some simple management primitives in the form of "signal process to death", "call boot(0)", etc. This kernel process would obey locking requirements for its operations, but would have no services that could potentially be blocked on a vnode lock, would always be in memory, etc, making highly available. However, it sounds like the trylock solution for ddb is a lot better than ignoring the lock and introducing nastiness that way. Robert N M Watson FreeBSD Core Team, TrustedBSD Project robert@fledge.watson.org NAI Labs, Safeport Network Services 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.NEB.3.96L.1010509134456.11741z-100000>