2007/6/5, Attilio Rao <[EMAIL PROTECTED]>:
2007/6/5, Bruce Evans <[EMAIL PROTECTED]>:
>
> I get a "spin lock held too long" panic during (an interrupt in?) acpi
> initialization on booting non-PREEMPTION SCHED_4BSD SMP.  Haven't tried
> other cases.

Do you have a backtrace or any other debugging stuffs available?

Mmm, I think I got the bug.
basically, in kern_mutex.c::_mtx_unlock_sleep(), in the not-preemptive
case what happens at some point is:

td = curthread;
if (td->td_critnest > 0 || td1->td_priority >= td->td_priority)
        return;

thread_lock(td1);
if (!TD_IS_RUNNING(td1)) {
...

mi_switch(SW_INVOL, NULL);
...
}
thread_unlock(td1);

Which is wrong beacause td1 is not curthread and really curthread
should be locked too when context switching.

To a first look the idea is that td and td1 should be locked both, but
I just want more time to look better at it.

Attilio


--
Peace can only be achieved by understanding - A. Einstein
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to