From owner-freebsd-stable@FreeBSD.ORG Tue Feb 19 16:33:32 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 D4277BD4 for ; Tue, 19 Feb 2013 16:33:32 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id A36C424B for ; Tue, 19 Feb 2013 16:33:32 +0000 (UTC) Received: from pakbsde14.localnet (unknown [38.105.238.108]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 1D33BB926; Tue, 19 Feb 2013 11:33:32 -0500 (EST) From: John Baldwin To: Marc Fournier Subject: Re: 9-STABLE -> NFS -> NetAPP: Date: Tue, 19 Feb 2013 11:18:55 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p25; KDE/4.5.5; amd64; ; ) References: <1964289267.3041689.1360897556427.JavaMail.root@erie.cs.uoguelph.ca> <201302150844.43188.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable Message-Id: <201302191118.55359.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 19 Feb 2013 11:33:32 -0500 (EST) 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: Tue, 19 Feb 2013 16:33:32 -0000 On Friday, February 15, 2013 11:31:11 pm Marc Fournier wrote: >=20 > Trying the patch now =85 but what do you mean by using 'SIGSTOP'? I gene= rally > do a 'kill -HUP' then when that doesn't work 'kill -9' =85 should Iuse -S= TOP > instead of 9? No. This patch only helps if you are using kill -STOP to pause processes a= nd later resume them. If you aren't doing that, then the suspension could be = due to a different cause. Please try this patch instead and let me know if you see any of the 'Deferring' messages on the console: 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 =2D-- kern_thread.c (revision 246122) +++ kern_thread.c (working copy) @@ -794,7 +794,30 @@ thread_suspend_check(int return_instead) (p->p_flag & P_SINGLE_BOUNDARY) && return_instead) return (ERESTART); =20 +#if 0 /* + * 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); + } +#else + /* Ignore syspend requests if stops are deferred. */ + if (td->td_flags & TDF_SBDRY) { + if (!return_instead) + panic("TDF_SBDRY set, but return_instead not"); + if (P_SHOULDSTOP(p) !=3D P_STOPPED_SIG) + printf("Deferring non-STOP suspension: SHOULDSTOP: %x p_flag %x\n", + P_SHOULDSTOP(p), p->p_flag); + return (0); + } +#endif + + /* * If the process is waiting for us to exit, * this thread should just suicide. * Assumes that P_SINGLE_EXIT implies P_STOPPED_SINGLE. =2D-=20 John Baldwin