Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Oct 2006 06:57:49 +0300
From:      Kostik Belousov <kostikbel@gmail.com>
To:        David Xu <davidxu@freebsd.org>
Cc:        freebsd-stable@freebsd.org, John E Hein <jhein@timing.com>, jhb@freebsd.org
Subject:   Re: locked vnode / nfs... requires kill -9 in ddb
Message-ID:  <20061021035749.GY55428@deviant.kiev.zoral.com.ua>
In-Reply-To: <200610210825.00228.davidxu@freebsd.org>
References:  <17718.20457.799395.602805@gromit.timing.com> <20061019100442.GN55428@deviant.kiev.zoral.com.ua> <200610210825.00228.davidxu@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061021035749.GY55428>