On 23/04/19(Tue) 12:16, Olivier Antoine wrote:
> >Synopsis:    panic: Stopped at kqueue_scan
> >Category:    kernel i386
> >Environment:
>     System      : OpenBSD 6.5
>     Details     : OpenBSD 6.5-current (GENERIC.MP) #1368: Sun Apr 21
> 19:50:46 MDT 2019
>              
> [email protected]:/usr/src/sys/arch/i386/compile/GENERIC.MP
> 
>     Architecture: OpenBSD.i386
>     Machine     : i386
> >Description:
> Hi, since my last update I have regular panic crashes. 4 in two days.
> At least 3 of them, with certainty, occurred while I was accessing the
> Internet via my smartphone connected to my OpenBSD WiFi access point
> through my Allways-on VPN isakmp/ipsec/nppp relaying traffic in Tor.
> This setup works for years.
> 
> The machine then displays something like:
> uvm_fault(0xd34e5f3c, 0x0, 0, 2) -> e
> kernel: page fault trap, code=0
> Stopped at kqueue_scan+0x246: movl %eax,0(%ecx)
> ddb{1}>

So this indicates that the `kqueue' is empty.  It should not happen
because the caller, in your case npppd, always places a marker in the
list.

Since the caller is not threaded and the syscall is executed with the
KERNEL_LOCK() held, we can supposed that another part of the kernel is
removing the marker.  That would imply that the other part isn't running
with the KERNEL_LOCK() and requires a MP kernel.

Could you try *very hard* to reproduce the problem with a kernel built
with the diff below?  Hopefully you'll make it crash and we'll find the
bug.  Otherwise we'll look for another possible cause of the marker
removal.

Index: kern/kern_event.c
===================================================================
RCS file: /cvs/src/sys/kern/kern_event.c,v
retrieving revision 1.101
diff -u -p -r1.101 kern_event.c
--- kern/kern_event.c   27 Nov 2018 15:52:50 -0000      1.101
+++ kern/kern_event.c   28 Apr 2019 21:47:25 -0000
@@ -1052,6 +1052,8 @@ knote_drop(struct knote *kn, struct proc
        struct kqueue *kq = kn->kn_kq;
        struct klist *list;
 
+       KERNEL_ASSERT_LOCKED();
+
        if (kn->kn_fop->f_isfd)
                list = &kq->kq_knlist[kn->kn_id];
        else

Reply via email to