From owner-freebsd-current Thu Sep 24 03:45:23 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id DAA09059 for freebsd-current-outgoing; Thu, 24 Sep 1998 03:45:23 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from burka.carrier.kiev.ua (burka.carrier.kiev.ua [193.193.193.107]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id DAA09039 for ; Thu, 24 Sep 1998 03:45:13 -0700 (PDT) (envelope-from archer@grape.carrier.kiev.ua) Received: from kozlik.carrier.kiev.ua (kozlik.carrier.kiev.ua [193.193.193.111]) by burka.carrier.kiev.ua (8.9.0/8.Who.Cares) with ESMTP id NAA19887; Thu, 24 Sep 1998 13:45:03 +0300 (EEST) Received: (from uucp@localhost) by kozlik.carrier.kiev.ua (8.9.0/8.9.0/8.Who.Cares) with UUCP id NAA06412; Thu, 24 Sep 1998 13:40:11 +0300 (EEST) Received: (from archer@localhost) by grape.carrier.kiev.ua (8.9.1/8.9.1) id NAA14277; Thu, 24 Sep 1998 13:05:49 +0300 (EEST) (envelope-from archer) Date: Thu, 24 Sep 1998 13:05:49 +0300 (EEST) From: Alexander Litvin Message-Id: <199809241005.NAA14277@grape.carrier.kiev.ua> To: Luoqi Chen Cc: current@FreeBSD.ORG Subject: Re: deadlock in vm_fault() X-Newsgroups: grape.freebsd.current In-Reply-To: <199809232224.SAA17260@lor.watermarkgroup.com> Organization: Lucky Grape User-Agent: tin/pre-1.4-980818 ("Laura") (UNIX) (FreeBSD/3.0-BETA (i386)) Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In article <199809232224.SAA17260@lor.watermarkgroup.com> you wrote: LC> I ran into a deadlock in vm_fault code today while making -j12 world. LC> It's caused by a reversed lock acquisition order. The normal order of LC> acquisition is vm map lock first and vnode lock next (if the fault is in LC> a vnode backed object). During the course of the fault handling, lock on LC> the vm map is released prior to paging io and has to be reacquired if it's LC> modified by another process during the io. Before reacquiring the lock of LC> vm map, we have to release the vnode lock we still hold, otherwise another LC> page fault in the same map/vnode would send us into a deadlock. LC> Attached is a fix for this problem. Would any of the vm/lock experts out LC> there review this? Thanks. I've seen something strange during the same -j12 buildworld. In fact, it was just that ld hang, apparently not doing anything. The rest of the system seemed to be alive. Though in some 3 or 4 hours machine rebooted (it had kernel with broken crash dump generation, so I do not know what actually happened). May it be related? LC> -lq --- Reality is an obstacle to hallucination. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message