From owner-freebsd-stable@FreeBSD.ORG Sat Feb 16 04:31:28 2013 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id C03A2C3A; Sat, 16 Feb 2013 04:31:28 +0000 (UTC) (envelope-from scrappy@hub.org) Received: from hub.org (hub.org [200.46.208.146]) by mx1.freebsd.org (Postfix) with ESMTP id 6EB3195A; Sat, 16 Feb 2013 04:31:28 +0000 (UTC) Received: from maia.hub.org (unknown [200.46.151.189]) by hub.org (Postfix) with ESMTP id D2188114577C; Sat, 16 Feb 2013 00:31:19 -0400 (AST) Received: from hub.org ([200.46.208.146]) by maia.hub.org (mx1.hub.org [200.46.151.189]) (amavisd-maia, port 10024) with ESMTP id 47921-08; Sat, 16 Feb 2013 04:31:16 +0000 (UTC) Received: from [192.168.0.52] (S01067cb21b2ff4ca.gv.shawcable.net [24.108.26.71]) by hub.org (Postfix) with ESMTPA id 5CEF4114577B; Sat, 16 Feb 2013 00:31:14 -0400 (AST) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) Subject: Re: 9-STABLE -> NFS -> NetAPP: From: Marc Fournier In-Reply-To: <201302150844.43188.jhb@freebsd.org> Date: Fri, 15 Feb 2013 20:31:11 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: References: <1964289267.3041689.1360897556427.JavaMail.root@erie.cs.uoguelph.ca> <201302150844.43188.jhb@freebsd.org> To: John Baldwin X-Mailer: Apple Mail (2.1499) Cc: Konstantin Belousov , Rick Macklem , freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 16 Feb 2013 04:31:28 -0000 Trying the patch now =85 but what do you mean by using 'SIGSTOP'? I = generally do a 'kill -HUP' then when that doesn't work 'kill -9' =85 = should Iuse -STOP instead of 9? On 2013-02-15, at 5:44 AM, John Baldwin wrote: >=20 > I think this is the right idea, but in HEAD with the sigdeferstop() = changes it=20 > should just check for TDF_SBDRY instead of adding a new parameter. I = think > checking for TDF_SBDRY will work even in 9 (and will make the patch = smaller). =20 > Also, I think this is only needed for stop signals. Other suspend = requests=20 > will eventually resume the thread, it is only stop signals that can = cause the=20 > thread to get stuck indefinitely (since it depends on the user sending=20= > SIGCONT). >=20 > Marc, are you using SIGSTOP? >=20 > Index: kern_thread.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- kern_thread.c (revision 246122) > +++ kern_thread.c (working copy) > @@ -795,6 +795,17 @@ thread_suspend_check(int return_instead) > return (ERESTART); >=20 > /* > + * Ignore suspend requests for stop signals if they > + * are deferred. > + */ > + if (P_SHOULDSTOP(p) =3D=3D P_STOPPED_SIG && > + td->td_flags & TDF_SBDRY) { > + KASSERT(return_instead, > + ("TDF_SBDRY set for unsafe = thread_suspend_check")); > + return (0); > + } > + > + /* > * If the process is waiting for us to exit, > * this thread should just suicide. > * Assumes that P_SINGLE_EXIT implies P_STOPPED_SINGLE. >=20 > --=20 > John Baldwin