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>
index | next in thread | previous in thread | raw e-mail
On Friday, February 15, 2013 11:31:11 pm Marc Fournier wrote:
>
> Trying the patch now … but what do you mean by using 'SIGSTOP'? I generally
> do a 'kill -HUP' then when that doesn't work 'kill -9' … should Iuse -STOP
> instead of 9?
No. This patch only helps if you are using kill -STOP to pause processes and
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
===================================================================
--- 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);
+#if 0
/*
+ * Ignore suspend requests for stop signals if they
+ * are deferred.
+ */
+ if (P_SHOULDSTOP(p) == 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) != 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.
--
John Baldwin
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201302191118.55359.jhb>
