Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Feb 2013 20:31:11 -0800
From:      Marc Fournier <scrappy@hub.org>
To:        John Baldwin <jhb@freebsd.org>
Cc:        Konstantin Belousov <kostikbel@gmail.com>, Rick Macklem <rmacklem@uoguelph.ca>, freebsd-stable@freebsd.org
Subject:   Re: 9-STABLE -> NFS -> NetAPP:
Message-ID:  <F3CC5573-8805-446E-A7CD-DD67A4B8ABD6@hub.org>
In-Reply-To: <201302150844.43188.jhb@freebsd.org>
References:  <1964289267.3041689.1360897556427.JavaMail.root@erie.cs.uoguelph.ca> <201302150844.43188.jhb@freebsd.org>

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


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?


On 2013-02-15, at 5:44 AM, John Baldwin <jhb@freebsd.org> wrote:

> 
> I think this is the right idea, but in HEAD with the sigdeferstop() changes it 
> 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).  
> Also, I think this is only needed for stop signals.  Other suspend requests 
> will eventually resume the thread, it is only stop signals that can cause the 
> thread to get stuck indefinitely (since it depends on the user sending 
> SIGCONT).
> 
> Marc, are you using SIGSTOP?
> 
> Index: kern_thread.c
> ===================================================================
> --- kern_thread.c	(revision 246122)
> +++ kern_thread.c	(working copy)
> @@ -795,6 +795,17 @@ thread_suspend_check(int return_instead)
> 			return (ERESTART);
> 
> 		/*
> +		 * 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);
> +		}
> +
> +		/*
> 		 * 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



home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F3CC5573-8805-446E-A7CD-DD67A4B8ABD6>