From owner-freebsd-current Mon Mar 1 15:11:46 1999 Delivered-To: freebsd-current@freebsd.org Received: from bolero-x.rahul.net (bolero.rahul.net [192.160.13.1]) by hub.freebsd.org (Postfix) with SMTP id 02E6A1549F for ; Mon, 1 Mar 1999 15:10:44 -0800 (PST) (envelope-from dhesi@rahul.net) Received: from waltz.rahul.net by bolero-x.rahul.net with SMTP id AA16241 (5.67b8/IDA-1.5 for ); Mon, 1 Mar 1999 15:10:27 -0800 Received: by waltz.rahul.net (5.67b8/jive-a2i-1.0) id AA22894; Mon, 1 Mar 1999 15:10:21 -0800 Message-Id: <199903012310.AA22894@waltz.rahul.net> To: current@FreeBSD.ORG Subject: Re: lockmgr panic with mmap() In-Reply-To: Message from Matthew Dillon of Sun, 28 Feb 99 12:40:18 -0800 Date: Mon, 01 Mar 99 15:10:21 -0800 From: Rahul Dhesi Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Admittedly detecting deadlock is not trivial in general. But if we are about to panic because of deadlock, then we have already detected something. The question now is: Do we crash the whole system, or just one or two user processes? Rahul > :Since bugs do happen, deadlock can occur in the kernel. > : > :Is it not possible in such cases to simply detect the deadlock, and kill > :one of the user processes involved in the deadlock, thus releasing one > :of the resources involved in the deadlock? Then you would log > :diagnostic information and let the system continue normally.... > Most of the deadlocks remaining in the kernel are more complex and often > cannot be detected without significant new work.... > Detecting the loop is the hard part. This is known as 'deadlock > detection'... ... > In FreeBSD's case, the issue is somewhat more complex due to things > that are not strictly locks causing deadlocks - such as a low memory > condition causing a process holding an inode lock to block and then the > syncer blocking on the same inode. The syncer is thus unable to run and > thus unable to sync the dirty buffers clogging memory to disk. Things > like that. > > -Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message