Date: Tue, 19 Feb 2013 11:18:55 -0500 From: John Baldwin <jhb@freebsd.org> To: Marc Fournier <scrappy@hub.org> Cc: Konstantin Belousov <kostikbel@gmail.com>, Rick Macklem <rmacklem@uoguelph.ca>, freebsd-stable@freebsd.org Subject: Re: 9-STABLE -> NFS -> NetAPP: Message-ID: <201302191118.55359.jhb@freebsd.org> In-Reply-To: <F3CC5573-8805-446E-A7CD-DD67A4B8ABD6@hub.org> References: <1964289267.3041689.1360897556427.JavaMail.root@erie.cs.uoguelph.ca> <201302150844.43188.jhb@freebsd.org> <F3CC5573-8805-446E-A7CD-DD67A4B8ABD6@hub.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201302191118.55359.jhb>