tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bug in softint_execute() ?



On Thu, Apr 10, 2008 at 03:54:55PM -0700, Tim Rightnour wrote:

> I'm hitting the following diagnostic panic in softint_execute() on relatively
> recent HEAD, on my ofppc SMP box:
> 
> kernel diagnostic assertion "si->si_cpu == curcpu()" failed: file
> "/usr/src/hackathon/sys/kern/kern_softint.c", line 524
> 
> 0xaa2dfe00: at panic+0x228
> 0xaa2dfe50: at __kernassert+0x4c
> 0xaa2dfe60: at softint_overlay+0x8a0
> 0xaa2dfec0: at lwp_userret+0x168
> 0xaa2dfee0: at syscall_plain+0x2b4
> 0xaa2dff40: user SC trap #74 by 0xefffa93c: srr1=0xd032
>             r1=0xffffcfe0 cr=0x44000048 xer=0x20000000 ctr=0
> 
> A few printfs thrown in the code, before eachof the KASSERTS at the top/bottom
> of that function show:
> 
> si_cpu = 0x510838 cur=0x510838
> si_cpu = 0x510838 cur=0x511540
> 
> And, just FYI:
> 
> cpu2 started ci=0x5110e8
> cpu3 started ci=0x511540
> cpu1 started ci=0x510c90
> 
> So obviously somehow the curcpu is changing in that function.  Maybe after the
> lock is released?

It's a bound kthread and should never migrate to another CPU. Are you using
SCHED_M2? Having read the code recently I don't know how that could happen.
Could you add KASSERTs on entry and exit that check for LW_BOUND set in
l_flag? It may also be a good idea to add assertions that check curlwp is
set correctly (IIRC, matches si->si_lwp).

Andrew


Home | Main Index | Thread Index | Old Index