RELENG_6 panic under heavy load
dimma at higis.ru
Fri Dec 8 01:56:51 PST 2006
On Wed, Dec 06, 2006 at 12:09:39PM -0500, John Baldwin wrote:
> > ...) and here is something difficult to understand, when $poll tries to
> > make $fork runnable, while $fork is trying to put itself in the turnstile
> > that is owned by $poll
> Hmm. I'm guessing the problem is the $poll thread is suspended (not exited)
> while holding the proc lock? That would appear to be the problem. That
> thread can't run again to release the lock. Ah, yes, I see the bug.
> Something like this should fix it:
> Index: kern_thread.c
> RCS file: /usr/cvs/src/sys/kern/kern_thread.c,v
> retrieving revision 188.8.131.52
> diff -u -r184.108.40.206 kern_thread.c
> --- kern_thread.c 2 Sep 2006 17:29:57 -0000 220.127.116.11
> +++ kern_thread.c 6 Dec 2006 17:06:26 -0000
> @@ -969,7 +969,9 @@
> TAILQ_REMOVE(&p->p_suspended, td, td_runq);
> + critical_enter();
> + critical_exit();
> What this does is force setrunnable() to be in a nested critical section so we
> won't preempt during setrunnable() until either the caller of
> thread_unsuspend_one() eventually releases sched_lock, or, in the case you
> ran into, the thread does a PROC_UNLOCK() and calls mi_switch().
9:46AM up 22:45, 2 users, load averages: 7.50, 6.59, 6.32
It's work. Thank, you.
Without your patch max uptime was 9 hours.
I'm planning to test David's patch on weekend.
More information about the freebsd-stable