From owner-freebsd-fs@FreeBSD.ORG Wed Nov 22 19:29:41 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 38D1816A40F; Wed, 22 Nov 2006 19:29:41 +0000 (UTC) (envelope-from killing@multiplay.co.uk) Received: from multiplay.co.uk (core6.multiplay.co.uk [85.236.96.23]) by mx1.FreeBSD.org (Postfix) with ESMTP id 107BA43D55; Wed, 22 Nov 2006 19:29:09 +0000 (GMT) (envelope-from killing@multiplay.co.uk) Received: from vader ([212.135.219.179]) by multiplay.co.uk (multiplay.co.uk [85.236.96.23]) (MDaemon PRO v9.0.1) with ESMTP id md50003244656.msg; Wed, 22 Nov 2006 19:28:56 +0000 Message-ID: <027b01c70e6c$6c879470$b3db87d4@multiplay.co.uk> From: "Steven Hartland" To: "Kostik Belousov" , "Mike Jakubik" References: <447366AD.30203@rogers.com> <44736E11.6060104@mkproductions.org><20060523203521.GA48061@xor.obsecurity.org><20060524062118.GA766@dimma.mow.oilspace.com><447400BB.9060603@samsco.org> <4485C010.9040402@rogers.com><20060606182234.GB72368@deviant.kiev.zoral.com.ua><44A490E6.1000502@rogers.com><20060630092829.GE1258@deviant.kiev.zoral.com.ua><44A56E0F.1070904@rogers.com> <20060701034922.GA37822@deviant.kiev.zoral.com.ua> Date: Wed, 22 Nov 2006 19:28:37 -0000 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2869 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 X-Spam-Processed: multiplay.co.uk, Wed, 22 Nov 2006 19:28:56 +0000 (not processed: message from valid local sender) X-MDRemoteIP: 212.135.219.179 X-Return-Path: killing@multiplay.co.uk X-MDAV-Processed: multiplay.co.uk, Wed, 22 Nov 2006 19:28:56 +0000 Cc: freebsd-fs@freebsd.org, freebsd-stable@freebsd.org Subject: Re: md deadlocks on wdrain. Was: [Re: quota and snapshots in6.1-RELEASE] X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Nov 2006 19:29:41 -0000 The patch below fixed this issue for us. We had a jail which when upgrading ( installworld ) from 5.4 to 6.1 would constantly hang the machine with this error. After updating md.c to 1.164 from MAIN and applying the patch below I've managed to run installworld 3 times now without error. Previously including updated to v1.164 this would hang without fail. If this is the correct fix, it would be good to see get committed as it have the capability to knock out any box running a vnode backed jail and is very unpredictable. ----- Original Message ----- From: "Kostik Belousov" On Fri, Jun 30, 2006 at 02:31:43PM -0400, Mike Jakubik wrote: > FYI, -CURRENT passes this test without locking up, so the fix is already > there somewhere. May be. May be not, and other issues just prevent complete exhausting of the buffer run space on CURRENT. Did you test it on CURRENT many times, or only once. The same question for STABLE - does it locks every time your do that ? Please, try this patch, and report the results. ? sys/dev/md/.arch-ids Index: sys/dev/md/md.c =================================================================== RCS file: /usr/local/arch/ncvs/src/sys/dev/md/md.c,v retrieving revision 1.164 diff -u -r1.164 md.c --- sys/dev/md/md.c 28 Mar 2006 21:25:11 -0000 1.164 +++ sys/dev/md/md.c 1 Jul 2006 03:48:41 -0000 @@ -650,6 +650,8 @@ mtx_lock_spin(&sched_lock); sched_prio(curthread, PRIBIO); mtx_unlock_spin(&sched_lock); + if (sc->type == MD_VNODE) + curthread->td_pflags |= TDP_NORUNNINGBUF; for (;;) { mtx_lock(&sc->queue_mtx); ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337 or return the E.mail to postmaster@multiplay.co.uk.