From owner-freebsd-stable@FreeBSD.ORG Sat Oct 21 06:56:38 2006 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9FE3716A407; Sat, 21 Oct 2006 06:56:38 +0000 (UTC) (envelope-from jhein@timing.com) Received: from Daffy.timing.com (w.timing.com [206.168.13.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 15D1C43D4C; Sat, 21 Oct 2006 06:56:37 +0000 (GMT) (envelope-from jhein@timing.com) Received: from gromit.timing.com (gromit.timing.com [206.168.13.209]) by Daffy.timing.com (8.13.1/8.13.1) with ESMTP id k9L6ubaE044040; Sat, 21 Oct 2006 00:56:37 -0600 (MDT) (envelope-from jhein@timing.com) Received: from gromit.timing.com (localhost [127.0.0.1]) by gromit.timing.com (8.13.8/8.13.8) with ESMTP id k9L6uYDg069685; Sat, 21 Oct 2006 00:56:34 -0600 (MDT) (envelope-from jhein@gromit.timing.com) Received: (from jhein@localhost) by gromit.timing.com (8.13.8/8.13.8/Submit) id k9L6uYQP069682; Sat, 21 Oct 2006 00:56:34 -0600 (MDT) (envelope-from jhein) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17721.50338.220767.201120@gromit.timing.com> Date: Sat, 21 Oct 2006 00:56:34 -0600 From: John E Hein To: Kostik Belousov In-Reply-To: <20061021035749.GY55428@deviant.kiev.zoral.com.ua> References: <17718.20457.799395.602805@gromit.timing.com> <20061019100442.GN55428@deviant.kiev.zoral.com.ua> <200610210825.00228.davidxu@freebsd.org> <20061021035749.GY55428@deviant.kiev.zoral.com.ua> X-Mailer: VM 7.19 under Emacs 21.3.1 X-Virus-Scanned: ClamAV version 0.87.1, clamav-milter version 0.87 on Daffy.timing.com X-Virus-Status: Clean Cc: freebsd-stable@freebsd.org, David Xu , jhb@freebsd.org Subject: Re: locked vnode / nfs... requires kill -9 in ddb X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Oct 2006 06:56:38 -0000 Kostik Belousov wrote at 06:57 +0300 on Oct 21, 2006: > On Sat, Oct 21, 2006 at 08:25:00AM +0800, David Xu wrote: > > On Thursday 19 October 2006 18:04, Kostik Belousov wrote: > > > > > > > > The nfs_reply is sleeping with the PCATCH set. The question is why SIGTSTP > > > does not cause msleep to return with EINTR. > > > > I have not been tracking the thread. but if the thread is sleeping with > > PCATCH, the SIGTSTP should cause the process to stop unless the signal > > is masked by sigprocmask or the signal has an action handler been set, > > this is a correct behavior. > > > David, > as I understand the report, the following happens. The nfs mount point with > intr option issued the request and waits for the reply. Some vnode locks are > held while waiting. Code needs to catch the signals to abort the operation > on user request. It uses msleep with PCATCH. The thread in question has > td_locks > 0. > > The SIGTSTP is delivered, and thread is stopped, while holding vnode lock. > How this situation shall be handled ? Namely, how to sleep while having the > ability to safely clean up on attempt of stopping ? Masking SIGTSTP is not > the option, due to SIGSTOP having the same results and not being blockable. > > [Would it be right to stop the threads only on returning from kernel to user > mode ?] David, here's the original report. http://lists.freebsd.org/pipermail/freebsd-stable/2006-October/029755.html Indeed, as Kostik surmised, the mount point is mounted intr. I did not notice this problem while running with releng_6 from late June for 3 months. Could it be this problem was introduced between then and now? This also just happened today on a system I just updated from 5.3 to 5.5-p8.