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 <j...@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

_______________________________________________
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"

Reply via email to