From owner-freebsd-stable@FreeBSD.ORG Sat Oct 21 03:57:57 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 D8B7516A403; Sat, 21 Oct 2006 03:57:57 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from fw.zoral.com.ua (fw.zoral.com.ua [213.186.206.134]) by mx1.FreeBSD.org (Postfix) with ESMTP id AF24543D49; Sat, 21 Oct 2006 03:57:56 +0000 (GMT) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by fw.zoral.com.ua (8.13.4/8.13.4) with ESMTP id k9L3gcsQ023734 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 21 Oct 2006 06:42:38 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.13.8/8.13.8) with ESMTP id k9L3vp7E023597; Sat, 21 Oct 2006 06:57:51 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.13.8/8.13.8/Submit) id k9L3voGn023596; Sat, 21 Oct 2006 06:57:50 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 21 Oct 2006 06:57:49 +0300 From: Kostik Belousov To: David Xu Message-ID: <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> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="TG7lY2/6mW/akb80" Content-Disposition: inline In-Reply-To: <200610210825.00228.davidxu@freebsd.org> User-Agent: Mutt/1.4.2.2i X-Virus-Scanned: ClamAV version 0.88.4, clamav-milter version 0.88.4 on fw.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=1.9 required=5.0 tests=DNS_FROM_RFC_ABUSE, SPF_NEUTRAL,UNPARSEABLE_RELAY autolearn=no version=3.1.4 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.1.4 (2006-07-25) on fw.zoral.com.ua Cc: freebsd-stable@freebsd.org, John E Hein , 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 03:57:57 -0000 --TG7lY2/6mW/akb80 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Oct 21, 2006 at 08:25:00AM +0800, David Xu wrote: > On Thursday 19 October 2006 18:04, Kostik Belousov wrote: >=20 > > > > The nfs_reply is sleeping with the PCATCH set. The question is why SIGT= STP > > does not cause msleep to return with EINTR. >=20 > 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,=20 > this is a correct behavior. >=20 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 ?] --TG7lY2/6mW/akb80 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFOZq8C3+MBN1Mb4gRAoe0AKDlcYfrkhhZw2V0hH3rQ91rReMWZgCgmtwe UMjTItSwMVI13OxIHv1GFQk= =VhRS -----END PGP SIGNATURE----- --TG7lY2/6mW/akb80--