0

I encountered a NetBSD 5 kernel crash running on MIPS. From panic string it looks like we were stuck in a kernel thread and could never come out of it.

Functions in the stack trace (see below)from mini-core are unrelated functions. As per code none of two function calls have caller-callee relationship. As I understand genfs_getpages() is a page fault handling routine which is allowed to sleep/block untill the request is fulfilled. Any ideas to help me understand this stack trace is welcome.

This seems slightly foolish to think that two different kind of interrupts (bottom halves) get scheduled on a kernel thread while the first one is still unfinished.

panic string is :No context switch for too long

sys/netmy/if_lip.c:2627: 8038f13c <check_my_vlt_mrtmsync_pkt+0x34>:
              sys/net/route.c:3552: 802f7e38 <mySetPeerRouting>:
          sys/kern/kern_lwp.c:1467: 80263b60 <lwp_initspecific>:
       sys/uvm_mips/uvm_amap.c:183: 80224190 <amap_alloc+0x8>:
              sys/net/route.c:2156: 802fafbc <my_rtalloc1_xten+0x13c>:
   sys/miscfs/genfs/genfs_io.c:313: 802e5860 <genfs_getpages+0x2a8>:
                 sys/net/if.c:3685: 802eed08 <my_gen_ctl_request+0x588>:
                 sys/net/if.c:1690: 802efcfc <if_slowtimo+0x84>:
   sys/miscfs/genfs/genfs_io.c:200: 802e5700 <genfs_getpages+0x148>:
sys/miscfs/genfs/genfs_vnops.c:416: 802e67fc <filt_genfsvnode+0x4>:
        sys/net/if_ethersubr.c:585: 802f37a0 <ether_output+0xa68>:
            sys/dev/clockctl.c:105: 80241bc0 <clockctlioctl+0xc8>:
     sys/uvm_mips/uvm_object.c:145: 80234c58 <uobj_unwirepages+0x18>:
                 sys/net/if.c:1915: 802f00d0 <ifioctl_common+0x2d0>:
    sys/miscfs/genfs/genfs_io.c:76: 802e5a0c <genfs_getpages+0x454>:
------------KERNEL PROBABLY LOOPING AROUND HERE--------------
ultimate cause
  • 2,264
  • 4
  • 27
  • 44
  • It was long time ago when I was looking into NetBSD guts, but from here I could tell you that first the user did a IOCTL on *genfs* (What is *genfs*? Don't remember anymore), later it went to network support (interfaces), returns to *genfs* and called again `get_pages()`. The latter went to something called `mySetPeerRouting()` which I suspect your own part of code and stuck there. Usually it happens when task went to interruptible sleep, but no interrupts of any kind have come. – 0andriy Oct 13 '15 at 18:40
  • @Andy Shevchenko: genfs is a generic library, which any (almost all) filesystem can use for common operations. genfs_getpages is a page fault handler as I mentioned and is permitted to sleep. When I referred code, I do not see any function calling any other function. Its weird. – ultimate cause Oct 13 '15 at 18:52
  • Oops, it might be actual picture is a **forward** trace, so, what is exactly `mySetPeerRouting()` is doing? Who wrote it? – 0andriy Oct 13 '15 at 18:59

0 Answers0