Current-Users archive

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

Re: recurring panics



On Wed, Mar 9, 2016 at 10:59 PM, Thomas Klausner <wiz%netbsd.org@localhost> wrote:
> On Wed, Mar 09, 2016 at 10:22:56PM +0900, Ryota Ozaki wrote:
>> On Wed, Mar 9, 2016 at 8:45 PM, Thomas Klausner <tk%giga.or.at@localhost> wrote:
>> > Hi!
>> >
>> > I have had this kind of reboot about 5 times in the last couple of days:
>> >
>> > Mar  8 16:26:14 yt savecore: reboot after panic: panic: kernel diagnostic assertion "l->l_nopreempt == 0" failed: file "/archive/foreign/src/sys/sys/userret.h", line 116  WARNING: SPL NOT LOWERED ON SYSCALL 16384 24 EXIT ef20f930 6 WARNING: SPL NOT LOWERED ON TRAP EXIT 6 0
>> >
>> > For some of them, I even have crash dumps:
>> >
>> > (gdb) target kvm netbsd.94.core
>> > 0xffffffff801195a5 in cpu_reboot (howto=howto@entry=260, bootstr=bootstr@entry=0x0) at /archive/foreign/src/sys/arch/amd64/amd64/machdep.c:671
>> > 671                     dumpsys();
>> > (gdb) bt
>> > #0  0xffffffff801195a5 in cpu_reboot (howto=howto@entry=260, bootstr=bootstr@entry=0x0) at /archive/foreign/src/sys/arch/amd64/amd64/machdep.c:671
>> > #1  0xffffffff8081c704 in vpanic (fmt=0xffffffff80e13840 "kernel %sassertion \"%s\" failed: file \"%s\", line %d ", ap=ap@entry=0xfffffe8154d51e58)
>> >     at /archive/foreign/src/sys/kern/subr_prf.c:342
>> > #2  0xffffffff80b3edb3 in kern_assert (fmt=fmt@entry=0xffffffff80e13840 "kernel %sassertion \"%s\" failed: file \"%s\", line %d ")
>> >     at /archive/foreign/src/sys/lib/libkern/kern_assert.c:51
>> > #3  0xffffffff8013d0e7 in mi_userret (l=0xfffffe84092b3460) at /archive/foreign/src/sys/sys/userret.h:116
>> > #4  userret (l=0xfffffe84092b3460) at ./machine/userret.h:82
>> > #5  syscall (frame=0xfffffe8154d51f00) at /archive/foreign/src/sys/arch/x86/x86/syscall.c:184
>> > #6  0xffffffff80100661 in Xsyscall ()
>> > (gdb) fr 3
>> > #3  0xffffffff8013d0e7 in mi_userret (l=0xfffffe84092b3460) at /archive/foreign/src/sys/sys/userret.h:116
>> > 116             KASSERT(l->l_nopreempt == 0);
>> > (gdb)
>> >
>> > I upgraded from a Jan 28 kernel to a March 3 kernel, and I think it
>> > only started afterwards.
>> >
>> > Any ideas?
>> >  Thomas
>>
>> I saw similar panics and my commit at March 7 (if.c,v 1.326) fixed them.
>> So updating your kernel may solve the problem.
>
> This one?

Yes.

>
> Index: src/sys/net/if.c
> diff -u src/sys/net/if.c:1.325 src/sys/net/if.c:1.326
> --- src/sys/net/if.c:1.325      Fri Feb 19 20:05:43 2016
> +++ src/sys/net/if.c    Mon Mar  7 01:41:55 2016
> @@ -770,6 +770,7 @@
>         ifq = percpu_getref(ipq->ipq_ifqs);
>         if (IF_QFULL(ifq)) {
>                 IF_DROP(ifq);
> +               percpu_putref(ipq->ipq_ifqs);
>                 m_freem(m);
>                 goto out;
>         }
>
> What would trigger that case?

percpu_putref is kpreempt_enable that decrements l_nopreempt.
If we forget it, some other places that accesses l_nopreempt
can be affected. In your case, mi_userret is suffered.

  ozaki-r


Home | Main Index | Thread Index | Old Index