panic: kernel diagnostic assertion "nlevel >= IPL_NONE" failed: file "/syzkaller/managers/main/kernel/sys/arch/amd64/amd64/intr.c", line 775
Stopped at      db_enter+0x25:  addq    $0x8,%rsp
    TID    PID    UID     PRFLAGS     PFLAGS  CPU  COMMAND
*268140  26056      0        0x10  0x4000000    0  syz-executor
db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437
panic(ffffffff830b7685) at panic+0x1cf sys/kern/subr_prf.c:198
__assert(ffffffff8306a957,ffffffff8306a6a0,307,ffffffff830251d7) at __assert+0x29
splraise(deadbeef) at splraise+0xad sys/arch/amd64/amd64/intr.c:775
mtx_enter(ffff8000012d8008) at mtx_enter+0x9e sys/kern/kern_lock.c:308
klist_mutex_lock(ffff8000012d8008) at klist_mutex_lock+0x32 sys/kern/kern_event.c:2352
klist_invalidate(ffff8000012d80a8) at klist_invalidate+0xe6 klist_lock sys/kern/kern_event.c:2317 [inline]
klist_invalidate(ffff8000012d80a8) at klist_invalidate+0xe6 sys/kern/kern_event.c:2283
bpfsdetach(ffff800001286fc0) at bpfsdetach+0xff sys/net/bpf.c:1800
bpfdetach(ffff80000128c800) at bpfdetach+0x76
if_detach(ffff80000128c800) at if_detach+0x14f sys/net/if.c:1193
tun_clone_destroy(ffff80000128c800) at tun_clone_destroy+0x2aa sys/net/if_tun.c:338
if_clone_destroy(ffff80003770d650) at if_clone_destroy+0x1d7 sys/net/if.c:1382
sys_ioctl(ffff800035c0c028,ffff80003770d830,ffff80003770d780) at sys_ioctl+0x678
syscall(ffff80003770d830) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577
end trace frame: 0xffff80003770d8b0, count: 0
https://www.openbsd.org/ddb.html describes the minimum info required in bug
reports.  Insufficient info makes it difficult to find and fix bugs.
ddb> 
ddb> set $lines = 0
ddb> set $maxwidth = 0
ddb> show panic
*cpu0: kernel diagnostic assertion "nlevel >= IPL_NONE" failed: file "/syzkaller/managers/main/kernel/sys/arch/amd64/amd64/intr.c", line 775
ddb> trace
db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437
panic(ffffffff830b7685) at panic+0x1cf sys/kern/subr_prf.c:198
__assert(ffffffff8306a957,ffffffff8306a6a0,307,ffffffff830251d7) at __assert+0x29
splraise(deadbeef) at splraise+0xad sys/arch/amd64/amd64/intr.c:775
mtx_enter(ffff8000012d8008) at mtx_enter+0x9e sys/kern/kern_lock.c:308
klist_mutex_lock(ffff8000012d8008) at klist_mutex_lock+0x32 sys/kern/kern_event.c:2352
klist_invalidate(ffff8000012d80a8) at klist_invalidate+0xe6 klist_lock sys/kern/kern_event.c:2317 [inline]
klist_invalidate(ffff8000012d80a8) at klist_invalidate+0xe6 sys/kern/kern_event.c:2283
bpfsdetach(ffff800001286fc0) at bpfsdetach+0xff sys/net/bpf.c:1800
bpfdetach(ffff80000128c800) at bpfdetach+0x76
if_detach(ffff80000128c800) at if_detach+0x14f sys/net/if.c:1193
tun_clone_destroy(ffff80000128c800) at tun_clone_destroy+0x2aa sys/net/if_tun.c:338
if_clone_destroy(ffff80003770d650) at if_clone_destroy+0x1d7 sys/net/if.c:1382
sys_ioctl(ffff800035c0c028,ffff80003770d830,ffff80003770d780) at sys_ioctl+0x678
syscall(ffff80003770d830) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0xa065a63c0, count: -15
ddb> show registers
rdi                                0
rsi                              0x1
rbp               0xffff80003770d2f0
rbx               0xffffffff834a2630    cdevsw+0x730
rdx               0xffff80000125d440
rcx                                0
rax               0xffff800035c0c028
r8                                 0
r9                0x8080808080808080
r10               0xa1b1e9ee14ce0433
r11               0xcccde5454ad51c04
r12                                0
r13               0xffff8000012d80a8
r14                                0
r15                              0x1
rip               0xffffffff81e543d5    db_enter+0x25
cs                               0x8
rflags                         0x246
rsp               0xffff80003770d2e0
ss                              0x10
db_enter+0x25:  addq    $0x8,%rsp
ddb> show proc
PROC (syz-executor) tid=268140 pid=26056 tcnt=3 stat=onproc
    flags process=10<SUGID> proc=4000000<THREAD>
    runpri=32, usrpri=79, slppri=32, nice=20
    wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0
    forw=0xffffffffffffffff, list=0xffff80002a4aea38,0xffff8000355fd200
    process=0xffff8000327f8460 user=0xffff800037708000, vmspace=0xfffffd806c1e0850
    estcpu=29, cpticks=2, pctcpu=0.0, user=0, sys=2, intr=0
ddb> ps
   PID     TID   PPID    UID  S       FLAGS  WAIT          COMMAND
 38569  307188  62393      0  2           0                syz-executor
 38569  392927  62393      0  2   0x4000000                syz-executor
 21474  509954  57272      0  2           0                syz-executor
 21474  113049  57272      0  2   0x4000000                syz-executor
 59075    6900  67658      0  2           0                syz-executor
 59075  370873  67658      0  3   0x4000080  fsleep        syz-executor
 64883  158747  50656      0  2           0                syz-executor
 64883   18967  50656      0  2   0x4000000                syz-executor
 26056  244927  89634      0  3        0x90  nanoslp       syz-executor
*26056  268140  89634      0  7   0x4000010                syz-executor
 26056  300825  89634      0  3   0x4000090  fsleep        syz-executor
 58812  343122  10386      0  2       0x480                syz-executor
 58812  460189  10386      0  3   0x4000080  pipewr        syz-executor
 58812  432433  10386      0  3   0x4000080  pipewr        syz-executor
 88890  159712  15593     -1  3        0x90  nanoslp       syz-executor
 88890  442413  15593     -1  3   0x4000090  ttyout        syz-executor
 88890   52996  15593     -1  3   0x4000090  fsleep        syz-executor
 88890   84075  15593     -1  3   0x4000090  fsleep        syz-executor
  5977   14811      0      0  3     0x14280  nfsidl        nfsio
 56839  101996      0      0  3     0x14280  nfsidl        nfsio
 55784  461912      0      0  3     0x14280  nfsidl        nfsio
 58566  176149      0      0  3     0x14280  nfsidl        nfsio
 31694  365315      0      0  3     0x14280  nfsidl        nfsio
 87641  161442      0      0  3     0x14280  nfsidl        nfsio
 61184  410245      0      0  3     0x14280  nfsidl        nfsio
  2061  110468      0      0  3     0x14280  nfsidl        nfsio
 30726  245052      0      0  3     0x14280  nfsidl        nfsio
 20304   24537      0      0  3     0x14280  nfsidl        nfsio
 54214  101148      0      0  3     0x14280  nfsidl        nfsio
 37474  122185      0      0  3     0x14280  nfsidl        nfsio
 32486  423095      0      0  3     0x14280  nfsidl        nfsio
 28287  221324      0      0  3     0x14280  nfsidl        nfsio
 90736  118803      0      0  3     0x14280  nfsidl        nfsio
 36644  385259      0      0  3     0x14280  nfsidl        nfsio
  8606  222145      0      0  3     0x14280  nfsidl        nfsio
 67369  454314      0      0  3     0x14280  nfsidl        nfsio
 70128  257252      0      0  3     0x14280  nfsidl        nfsio
 89935  226013      0      0  3     0x14280  nfsidl        nfsio
 26303   66408      0      0  3     0x14200  bored         sosplice
 83531  283357      0      0  3     0x14200  acct          acct
 15593  432062   8837      0  3        0x82  nanoslp       syz-executor
 10386  493001   8837      0  3        0x82  nanoslp       syz-executor
 62393  152535   8837      0  2       0x482                syz-executor
 57272  339261   8837      0  3        0x82  nanoslp       syz-executor
 16631  467254   8837      0  3        0x82  nanoslp       syz-executor
 67658   81141   8837      0  2       0x482                syz-executor
 89634  153646   8837      0  3        0x82  nanoslp       syz-executor
 50656  240777   8837      0  2       0x482                syz-executor
  8837   21027  86401      0  3        0x82  kqread        syz-executor
 86401  449959  21162      0  3    0x10008a  sigsusp       ksh
 21162  510380   7091      0  3        0x98  kqread        sshd-session
  7091  421859  27801      0  3        0x92  kqread        sshd-session
 17633  191111      1      0  3    0x100083  ttyin         getty
 27801  295674      1      0  3        0x88  kqread        sshd
 85789  124538  34674     73  3   0x1100090  kqread        syslogd
 34674  133379      1      0  3    0x100082  sbwait        syslogd
 24404  233763      1      0  3    0x100080  kqread        resolvd
 17614  301603  53474     77  3    0x100092  kqread        dhcpleased
 47884  483969  53474     77  3    0x100092  kqread        dhcpleased
 53474  170074      1      0  3        0x80  kqread        dhcpleased
 34861   91681      0      0  3     0x14200  bored         smr
  5935   79008      0      0  2     0x14200                zerothread
 21736  146533      0      0  3     0x14200  aiodoned      aiodoned
  1986   11134      0      0  3     0x14200  syncer        update
 93285  293408      0      0  3     0x14200  cleaner       cleaner
 66282  352915      0      0  2     0x14200                reaper
 23954   56392      0      0  3     0x14200  pgdaemon      pagedaemon
 95817  143191      0      0  3     0x14200  bored         viomb
 17522  370699      0      0  3  0x40014200  acpi0         acpi0
  5995   57195      0      0  3     0x14200  bored         softnet3
 45047  274726      0      0  3     0x14200  bored         softnet2
 92544  439307      0      0  3     0x14200  bored         softnet1
 86310  341996      0      0  3     0x14200  bored         softnet0
 62462   14891      0      0  3     0x14200  bored         systqmp
 82340  405394      0      0  3     0x14200  bored         systq
 24460  331086      0      0  2  0x40014200                softclock
 53958  442760      0      0  3  0x40014200                idle0
     1  330669      0      0  3        0x82  wait          init
     0       0     -1      0  3     0x10200  scheduler     swapper
ddb> show all locks
No such command
ddb> show malloc
           Type InUse  MemUse  HighUse   Limit  Requests Type Lim
         devbuf 10178  11107K   11428K 166960K     11569        0
            pcb    17     12K      12K 166960K        67        0
         rtable   204      6K       7K 166960K       395        0
             pf    32     13K      14K 166960K        51        0
         ifaddr    40      6K       7K 166960K        52        0
        ifgroup    54      2K       2K 166960K        71        0
         sysctl     0      0K       0K 166960K         2        0
       counters    31     17K      17K 166960K        35        0
       ioctlops     0      0K       4K 166960K        49        0
            iov     1     12K      12K 166960K        10        0
          mount     1      1K       1K 166960K         1        0
            log     0      0K       0K 166960K         4        0
         vnodes  1429     90K      90K 166960K      1604        0
      UFS quota     1     32K      32K 166960K         1        0
      UFS mount     5     36K      36K 166960K         5        0
            shm     2      1K       5K 166960K        10        0
         VM map     2      1K       1K 166960K         2        0
            sem     8      0K       0K 166960K         9        0
        dirhash    12      2K       2K 166960K        27        0
           ACPI  1690    195K     286K 166960K     12468        0
      file desc    17     61K      93K 166960K       383        0
          sigio     0      0K       0K 166960K        42        0
           proc    60     59K     108K 166960K       503        0
        subproc   104      6K       6K 166960K       104        0
    NFS srvsock     1      0K       0K 166960K         1        0
     NFS daemon     1     16K      16K 166960K         1        0
    ip_moptions     0      0K       0K 166960K        29        0
       in_multi    88      6K       7K 166960K       109        0
    ether_multi     1      0K       0K 166960K         2        0
            mrt     0      0K       0K 166960K         1        0
    ISOFS mount     1     32K      32K 166960K         1        0
  MSDOSFS mount     1     16K      16K 166960K         1        0
           ttys    67    307K     307K 166960K        67        0
           exec     0      0K       1K 166960K       451        0
   fusefs mount     1     32K      32K 166960K         1        0
            tdb     3      0K       0K 166960K         3        0
        VM swap     8     62K      64K 166960K        10        0
       UVM amap   237     73K      86K 166960K      4983        0
       UVM aobj    81      3K       3K 166960K        82        0
     pinsyscall    38     76K      98K 166960K      1406        0
        memdesc     1      4K       4K 166960K         1        0
    crypto data     1      1K       1K 166960K         1        0
    ip6_options     0      0K       0K 166960K         6        0
            NDP    12      0K       2K 166960K        32        0
           temp    48   6817K    6881K 166960K     19518        0
         kqueue    13     20K      28K 166960K        68        0
      SYN cache     2     16K      16K 166960K         2        0
ddb> show all pools
Name      Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle
rtpcb      120       56    0       53     1     0     1     1     0     8    0
rtentry    112      117    0       25     4     0     4     4     0     8    0
unpcb      144      437    0      420     6     5     1     6     0     8    0
syncache   336        3    0        3     1     1     0     1     0     8    0
tcpcb      808      126    0      122     7     6     1     7     0     8    0
arp         88       18    0        2     1     0     1     1     0     8    0
inpcb      336      333    0      326     6     4     2     6     0     8    1
nd6        104       27    0        4     1     0     1     1     0     8    0
kcovpl      48        8    0        0     1     0     1     1     0     8    0
ppxss      1072       1    0        1     1     1     0     1     0     8    0
pftag       88        2    0        0     1     0     1     1     0     8    0
pfrule     1344       2    0        2     2     1     1     1     0     8    1
art_heap8  4096       1    0        0     1     0     1     1     0     8    0
art_heap4  256      496    0       93    29     1    28    29     0     8    1
art_table   32      497    0       93     4     0     4     4     0     8    0
art_node    16      115    0       33     1     0     1     1     0     8    0
sysvmsgpl   40        7    0        5     1     0     1     1     0     8    0
semapl     112        7    0        1     1     0     1     1     0     8    0
shmpl      112       79    0        1     3     0     3     3     0     8    0
dirhash    1024      27    0       10     3     0     3     3     0     8    0
dino2pl    256     1998    0      498    95     0    95    95     0     8    0
ffsino     240     1998    0      498    89     0    89    89     0     8    0
nchpl      144     2575    0      899    63     0    63    63     0     8    0
uvmvnodes   80     2270    0        0    47     0    47    47     0     8    0
vnodes     216     2270    0        0   127     0   127   127     0     8    0
namei      1024    8014    0     8014     4     2     2     2     0     8    2
kstatmem   264       32    0        8     2     0     2     2     0     8    0
scsiplug    72        1    0        1     1     1     0     1     0     8    0
scxspl     216     7664    0     7664     8     7     1     8     1     8    1
plimitpl   152       65    0       48     1     0     1     1     0     8    0
sigapl     424      685    0      617     8     0     8     8     0     8    0
futexpl     64     4441    0     4437     1     0     1     1     0     8    0
knotepl    120    19659    0    19612    22    13     9    16     0     8    7
kqueuepl   184       96    0       86     1     0     1     1     0     8    0
pipepl     288      134    0      106     4     1     3     3     0     8    0
fdescpl    432      647    0      618     5     1     4     5     0     8    0
filepl     120     3260    0     3014    13     3    10    12     0     8    2
lockfpl    104      169    0      166     1     0     1     1     0     8    0
lockfspl    48       45    0       42     1     0     1     1     0     8    0
sessionpl  144       21    0       13     1     0     1     1     0     8    0
pgrppl      48       31    0       15     1     0     1     1     0     8    0
ucredpl    104      404    0      391     1     0     1     1     0     8    0
zombiepl   144      658    0      657     1     0     1     1     0     8    0
processpl  1096     685    0      617     5     0     5     5     0     8    0
procpl     648     1077    0      998     8     0     8     8     0     8    0
sosppl     168        4    0        4     1     1     0     1     0     8    0
sockpl     504      830    0      803    25    20     5    21     0     8    0
mcl64k     65536      2    0        2     2     1     1     1     0     8    1
mcl8k      8192      10    0       10     1     1     0     1     0     8    0
mcl4k      4096    2911    0     2860    16     8     8    15     0     8    0
mcl2k      2048     440    0      439     5     3     2     4     0     8    1
mtagpl      96       19    0        7     1     0     1     1     0     8    0
mbufpl     256     6695    0     6546    15     3    12    14     0     8    0
bufpl      280     2658    0       94   184     0   184   184     0     8    0
anonpl      24   161535    0   158033    23     1    22    22     0   187    0
amapchunkpl 152   17310    0    16772    37     7    30    30     0   158    9
amappl16   200     3678    0     3649     4     2     2     4     0     8    0
amappl15   192       15    0       14     1     0     1     1     0     8    0
amappl14   184      113    0      103     1     0     1     1     0     8    0
amappl13   176       10    0       10     1     1     0     1     0     8    0
amappl12   168     1263    0     1232     3     1     2     3     0     8    0
amappl11   160       49    0       39     1     0     1     1     0     8    0
amappl10   152       17    0       17     1     1     0     1     0     8    0
amappl9    144      112    0      112     1     1     0     1     0     8    0
amappl8    136       19    0       17     1     0     1     1     0     8    0
amappl7    128       98    0       88     1     0     1     1     0     8    0
amappl6    120      164    0      163     1     0     1     1     0     8    0
amappl5    112      128    0      119     1     0     1     1     0     8    0
amappl4    104      285    0      269     1     0     1     1     0     8    0
amappl3     96     3167    0     3065     3     0     3     3     0     8    0
amappl2     88      916    0      835     2     0     2     2     0     8    0
amappl1     80     8015    0     7496    13     2    11    13     0     8    0
amappl      88     4617    0     4434     5     0     5     5     0    92    0
dma4096    4096       1    0        1     1     1     0     1     0     8    0
dma1024    1024       1    0        0     1     0     1     1     0     8    0
dma256     256        6    0        6     1     1     0     1     0     8    0
dma128     128      253    0      253     1     1     0     1     0     8    0
dma64       64        6    0        6     1     1     0     1     0     8    0
dma32       32        7    0        7     1     1     0     1     0     8    0
dma16       16       18    0       17     1     0     1     1     0     8    0
aobjpl      72       81    0        1     2     0     2     2     0     8    0
uaddrrnd    24      647    0      617     1     0     1     1     0     8    0
uaddrbest   32        2    0        0     1     0     1     1     0     8    0
uaddr       24      647    0      617     1     0     1     1     0     8    0
vmmpekpl   168     6347    0     6309     2     0     2     2     0     8    0
vmmpepl    168    46711    0    44910    80     0    80    80     0   357    1
vmsppl     352      646    0      617     4     1     3     4     0     8    0
rwobjpl     24    18930    0    15710    20     0    20    20     0     8    0
pdppl      4096    1301    0     1234    95    28    67    81     0     8    0
pvpl        32   333404    0   324568    82     5    77    81     0   265    1
pmappl     216      646    0      617     3     0     3     3     0     8    0
extentpl    40       55    0       38     1     0     1     1     0     8    0
phpool     112      401    0       81    11     0    11    11     0     8    0
ddb> machine ddbcpu 0
No such command
ddb> trace
db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437
panic(ffffffff830b7685) at panic+0x1cf sys/kern/subr_prf.c:198
__assert(ffffffff8306a957,ffffffff8306a6a0,307,ffffffff830251d7) at __assert+0x29
splraise(deadbeef) at splraise+0xad sys/arch/amd64/amd64/intr.c:775
mtx_enter(ffff8000012d8008) at mtx_enter+0x9e sys/kern/kern_lock.c:308
klist_mutex_lock(ffff8000012d8008) at klist_mutex_lock+0x32 sys/kern/kern_event.c:2352
klist_invalidate(ffff8000012d80a8) at klist_invalidate+0xe6 klist_lock sys/kern/kern_event.c:2317 [inline]
klist_invalidate(ffff8000012d80a8) at klist_invalidate+0xe6 sys/kern/kern_event.c:2283
bpfsdetach(ffff800001286fc0) at bpfsdetach+0xff sys/net/bpf.c:1800
bpfdetach(ffff80000128c800) at bpfdetach+0x76
if_detach(ffff80000128c800) at if_detach+0x14f sys/net/if.c:1193
tun_clone_destroy(ffff80000128c800) at tun_clone_destroy+0x2aa sys/net/if_tun.c:338
if_clone_destroy(ffff80003770d650) at if_clone_destroy+0x1d7 sys/net/if.c:1382
sys_ioctl(ffff800035c0c028,ffff80003770d830,ffff80003770d780) at sys_ioctl+0x678
syscall(ffff80003770d830) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0xa065a63c0, count: -15
ddb> machine ddbcpu 1
No such command
ddb> trace
db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437
panic(ffffffff830b7685) at panic+0x1cf sys/kern/subr_prf.c:198
__assert(ffffffff8306a957,ffffffff8306a6a0,307,ffffffff830251d7) at __assert+0x29
splraise(deadbeef) at splraise+0xad sys/arch/amd64/amd64/intr.c:775
mtx_enter(ffff8000012d8008) at mtx_enter+0x9e sys/kern/kern_lock.c:308
klist_mutex_lock(ffff8000012d8008) at klist_mutex_lock+0x32 sys/kern/kern_event.c:2352
klist_invalidate(ffff8000012d80a8) at klist_invalidate+0xe6 klist_lock sys/kern/kern_event.c:2317 [inline]
klist_invalidate(ffff8000012d80a8) at klist_invalidate+0xe6 sys/kern/kern_event.c:2283
bpfsdetach(ffff800001286fc0) at bpfsdetach+0xff sys/net/bpf.c:1800
bpfdetach(ffff80000128c800) at bpfdetach+0x76
if_detach(ffff80000128c800) at if_detach+0x14f sys/net/if.c:1193
tun_clone_destroy(ffff80000128c800) at tun_clone_destroy+0x2aa sys/net/if_tun.c:338
if_clone_destroy(ffff80003770d650) at if_clone_destroy+0x1d7 sys/net/if.c:1382
sys_ioctl(ffff800035c0c028,ffff80003770d830,ffff80003770d780) at sys_ioctl+0x678
syscall(ffff80003770d830) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0xa065a63c0, count: -15