locked vnode / nfs... requires kill -9 in ddb

David Xu davidxu at freebsd.org
Sat Oct 21 00:28:22 UTC 2006


On Saturday 21 October 2006 00:05, John E Hein wrote:
>  > The problem is in thread_suspend_check(), not the sleepq code.
>
> It happened again (triggered by ctrl-z).
> INVARIANTS & WITNESS provided no help.
>
> Is the problem in thread_suspend_check() known?
> MFC-able from HEAD?
>

I don't think thread_suspend_check itself has problem.

> I see this diff.  I'm not sure it will help, but is there any reason
> not to try it in 6 (David Xu CC'd since he made this change)?
>
> Index: kern_thread.c
> ===================================================================
> RCS file: /base/FreeBSD-CVS/src/sys/kern/kern_thread.c,v
> retrieving revision 1.216.2.6
> retrieving revision 1.235
> diff -u -p -r1.216.2.6 -r1.235
> --- kern_thread.c	2 Sep 2006 17:29:57 -0000	1.216.2.6
> +++ kern_thread.c	28 Aug 2006 04:24:51 -0000	1.235
> @@ -910,6 +926,10 @@ thread_suspend_check(int return_instead)
>  		    (p->p_flag & P_SINGLE_BOUNDARY) && return_instead)
>  			return (ERESTART);
>
> +		/* If thread will exit, flush its pending signals */
> +		if ((p->p_flag & P_SINGLE_EXIT) && (p->p_singlethread != td))
> +			sigqueue_flush(&td->td_sigqueue);
> +
>  		mtx_lock_spin(&sched_lock);
>  		thread_stopped(p);
>  		/*
This patch is only for -CURRENT, it is used to release memory occupied by
signal queue which does not exist in -STABLE, it is only called when the
process is exiting.




More information about the freebsd-stable mailing list