panic: kernel diagnostic assertion "refs != ~0" failed: file "/syzkaller/managers/main/kernel/sys/kern/kern_synch.c", line 951 Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff8333d232) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff833791ab,ffffffff833d80c7,3b7,ffffffff833b1a9d) at __assert+0x29 sys/kern/subr_prf.c:-1 refcnt_finalize(ffff80003c9b70b0,ffffffff83330155) at refcnt_finalize+0x1c8 sys/kern/kern_synch.c:952 pppx_if_destroy(205b9a,ffff80003c9b70a8) at pppx_if_destroy+0x3d sys/net/if_pppx.c:794 pppxclose(205b9a,1,2000,ffff80003c97fa18) at pppxclose+0xa0 sys/net/if_pppx.c:541 spec_close(ffff80003916d310) at spec_close+0x417 sys/kern/spec_vnops.c:-1 VOP_CLOSE(fffffd805dbc0028,1,fffffd8007bfb618,ffff80003c97fa18) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156 vn_closefile(fffffd806537fbd0,ffff80003c97fa18) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:292 [inline] vn_closefile(fffffd806537fbd0,ffff80003c97fa18) at vn_closefile+0x11d sys/kern/vfs_vnops.c:615 fdrop(fffffd806537fbd0,ffff80003c97fa18) at fdrop+0x121 sys/kern/kern_descrip.c:1280 closef(fffffd806537fbd0,ffff80003c97fa18) at closef+0x190 sys/kern/kern_descrip.c:1264 fdfree(ffff80003c97fa18) at fdfree+0x115 sys/kern/kern_descrip.c:1195 exit1(ffff80003c97fa18,0,0,1) at exit1+0x576 sys/kern/kern_exit.c:215 sys_exit(ffff80003c97fa18,ffff80003916d670,ffff80003916d5c0) at sys_exit+0x1a sys/kern/kern_exit.c:-1 end trace frame: 0xffff80003916d660, 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 "refs != ~0" failed: file "/syzkaller/managers/main/kernel/sys/kern/kern_synch.c", line 951 ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff8333d232) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff833791ab,ffffffff833d80c7,3b7,ffffffff833b1a9d) at __assert+0x29 sys/kern/subr_prf.c:-1 refcnt_finalize(ffff80003c9b70b0,ffffffff83330155) at refcnt_finalize+0x1c8 sys/kern/kern_synch.c:952 pppx_if_destroy(205b9a,ffff80003c9b70a8) at pppx_if_destroy+0x3d sys/net/if_pppx.c:794 pppxclose(205b9a,1,2000,ffff80003c97fa18) at pppxclose+0xa0 sys/net/if_pppx.c:541 spec_close(ffff80003916d310) at spec_close+0x417 sys/kern/spec_vnops.c:-1 VOP_CLOSE(fffffd805dbc0028,1,fffffd8007bfb618,ffff80003c97fa18) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156 vn_closefile(fffffd806537fbd0,ffff80003c97fa18) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:292 [inline] vn_closefile(fffffd806537fbd0,ffff80003c97fa18) at vn_closefile+0x11d sys/kern/vfs_vnops.c:615 fdrop(fffffd806537fbd0,ffff80003c97fa18) at fdrop+0x121 sys/kern/kern_descrip.c:1280 closef(fffffd806537fbd0,ffff80003c97fa18) at closef+0x190 sys/kern/kern_descrip.c:1264 fdfree(ffff80003c97fa18) at fdfree+0x115 sys/kern/kern_descrip.c:1195 exit1(ffff80003c97fa18,0,0,1) at exit1+0x576 sys/kern/kern_exit.c:215 sys_exit(ffff80003c97fa18,ffff80003916d670,ffff80003916d5c0) at sys_exit+0x1a sys/kern/kern_exit.c:-1 syscall(ffff80003916d670) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003916d670) at syscall+0x962 sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x71f8564cea80, count: -16 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80003916d0f0 rbx 0 rdx 0 rcx 0 rax 0xffff80003c97fa18 r8 0x101010101010101 r9 0x8080808080808080 r10 0x4ef7757d0d4a23cd r11 0xbc7d2dcf88015ed6 r12 0 r13 0 r14 0 r15 0x1 rip 0xffffffff82e963b5 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80003916d0e0 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=144341 pid=93490 tcnt=0 stat=onproc flags process=1008 proc=2000 runpri=0, usrpri=74, slppri=0, nice=20 wchan=0x0, wmesg=, ps_single=0xffff80003c97fa18 scnt=-1 ecnt=1 forw=0xffffffffffffffff, list=0xffff80003c97ed20,0xffff80003c97ea98 process=0xffff80002cd31248 user=0xffff800039168000, vmspace=0xfffffd806ba45a20 estcpu=24, cpticks=5, pctcpu=0.2, user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 65215 2011 61815 0 2 0 syz-executor 65215 197952 61815 0 3 0x4000080 fsleep syz-executor 65215 384837 61815 0 3 0x4000080 fsleep syz-executor 65215 461506 61815 0 3 0x4000080 fsleep syz-executor 61371 278690 10920 0 2 0 syz-executor 61371 442646 10920 0 3 0x4000000 smrbar syz-executor 99908 319493 37859 0 2 0 syz-executor 99908 386911 37859 0 3 0x4000080 fsleep syz-executor 76436 84292 69159 0 2 0 syz-executor 76436 223957 69159 0 3 0x4000080 kqread syz-executor 76436 293759 69159 0 2 0x4000000 syz-executor 49871 119093 91034 0 2 0 syz-executor 49871 49491 91034 0 3 0x4000080 fsleep syz-executor 25568 32711 55554 0 3 0x80 nanoslp syz-executor 25568 391000 55554 0 3 0x4000080 tunread syz-executor 25568 281167 55554 0 3 0x4000080 tunread syz-executor 25568 327396 55554 0 3 0x4000080 fsleep syz-executor 79393 48678 95302 0 2 0 syz-executor 79393 198859 95302 0 3 0x4000080 fifow syz-executor 79393 80476 95302 0 2 0x4000000 syz-executor 10920 371624 36190 0 2 0xc82 syz-executor 86047 436914 0 0 3 0x14200 bored sosplice 55554 376456 36190 0 3 0x82 nanoslp syz-executor 95302 356938 36190 0 3 0x82 nanoslp syz-executor 37859 162419 36190 0 2 0xc82 syz-executor 8970 313314 36190 0 2 0xc82 syz-executor 61815 382550 36190 0 3 0x82 nanoslp syz-executor 91034 479606 36190 0 2 0xc82 syz-executor 69159 287674 36190 0 3 0x82 nanoslp syz-executor 36190 506303 59469 0 3 0x82 kqread syz-executor 59469 338922 71699 0 3 0x10008a sigsusp ksh 71699 122615 50171 0 3 0x98 kqread sshd-session 50171 456220 89825 0 3 0x92 kqread sshd-session 61661 307018 1 0 3 0x100083 ttyin getty 89825 156228 1 0 3 0x88 kqread sshd 22208 324381 12600 73 3 0x1100090 kqread syslogd 12600 304280 1 0 3 0x100082 sbwait syslogd 65827 154095 1 0 3 0x100080 kqread resolvd 80136 308347 20411 77 3 0x100092 kqread dhcpleased 94424 21804 20411 77 3 0x100092 kqread dhcpleased 20411 4712 1 0 3 0x80 kqread dhcpleased 45657 517853 0 0 3 0x14200 bored smr 3397 476484 0 0 2 0x14200 zerothread 87218 234410 0 0 3 0x14200 aiodoned aiodoned 49037 476011 0 0 3 0x14200 syncer update 80232 29473 0 0 3 0x14200 cleaner cleaner 53287 449912 0 0 3 0x14200 reaper reaper 84833 37086 0 0 3 0x14200 pgdaemon pagedaemon 72518 114367 0 0 3 0x14200 bored viomb 35612 52940 0 0 3 0x40014200 acpi0 acpi0 41661 281585 0 0 3 0x14200 bored softnet7 68211 35727 0 0 3 0x14200 bored softnet6 43319 224567 0 0 3 0x14200 bored softnet5 65077 437808 0 0 3 0x14200 bored softnet4 41207 1637 0 0 3 0x14200 bored softnet3 18510 356979 0 0 3 0x14200 bored softnet2 66922 133653 0 0 3 0x14200 bored softnet1 62589 197368 0 0 3 0x14200 bored softnet0 90488 514694 0 0 3 0x14200 smrbar systqmp 13529 472261 0 0 3 0x14200 bored systq 65651 130993 0 0 3 0x40014200 tmoslp softclock 8209 447258 0 0 3 0x40014200 idle0 1 274254 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 10200 11123K 12260K 166960K 11686 0 pcb 17 13K 14K 166960K 90 0 rtable 201 7K 7K 166960K 325 0 pf 42 15K 15K 166960K 66 0 ifaddr 43 6K 7K 166960K 67 0 ifgroup 70 2K 2K 166960K 96 0 sysctl 3 1K 9K 166960K 7 0 counters 39 18K 18K 166960K 52 0 ioctlops 0 0K 4K 166960K 87 0 iov 0 0K 16K 166960K 44 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1411 89K 89K 166960K 1525 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 6 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 0K 166960K 71 0 dirhash 12 2K 2K 166960K 12 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 18 65K 97K 166960K 272 0 sigio 0 0K 0K 166960K 5 0 proc 60 59K 116K 166960K 519 0 subproc 72 4K 4K 166960K 81 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 15 0 in_multi 79 5K 7K 166960K 120 0 ether_multi 1 0K 0K 166960K 3 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 55 254K 254K 166960K 55 0 exec 0 0K 1K 166960K 374 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 240 135K 151K 166960K 3918 0 UVM aobj 12 2K 2K 166960K 12 0 pinsyscall 39 78K 96K 166960K 1320 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 1 0K 0K 166960K 11 0 NDP 16 0K 1K 166960K 43 0 temp 39 8635K 8699K 166960K 13200 0 kqueue 15 22K 33K 166960K 53 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 113 0 109 3 0 3 3 0 8 2 rtentry 136 112 0 31 4 0 4 4 0 8 0 unpcb 144 322 0 296 6 0 6 6 0 8 5 syncache 336 3 0 3 1 0 1 1 0 8 1 tcpcb 736 106 0 98 7 0 7 7 0 8 6 arp 88 13 0 3 1 0 1 1 0 8 0 ipq 40 1 0 0 1 0 1 1 0 8 0 ipqe 40 3 0 2 1 0 1 1 0 8 0 inpcb 328 249 0 238 7 0 7 7 0 8 5 nd6 104 18 0 6 1 0 1 1 0 8 0 pkpcb 40 2 0 2 1 0 1 1 0 8 1 kcovpl 48 9 0 1 1 0 1 1 0 8 0 ppxss 1072 13 0 10 1 0 1 1 0 8 0 pppxif 1384 4 0 2 1 0 1 1 0 8 0 pfrule 1344 2 0 2 1 0 1 1 0 8 1 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 502 0 138 28 0 28 28 0 8 2 art_table 40 504 0 138 5 0 5 5 0 8 0 art_node 32 112 0 38 1 0 1 1 0 8 0 sysvmsgpl 40 5 0 5 1 0 1 1 0 8 1 semapl 112 69 0 59 1 0 1 1 0 8 0 shmpl 112 9 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1775 0 268 95 0 95 95 0 8 0 ffsino 256 1775 0 268 95 0 95 95 0 8 0 nchpl 144 2137 0 446 63 0 63 63 0 8 0 rtmask 32 2 0 2 1 0 1 1 0 8 1 uvmvnodes 80 1984 0 0 41 0 41 41 0 8 0 vnodes 216 1984 0 0 111 0 111 111 0 8 0 namei 1024 6570 0 6570 2 0 2 2 0 8 2 kstatmem 264 50 0 18 3 0 3 3 0 8 0 scsiplug 72 1 0 1 1 0 1 1 0 8 1 scxspl 216 7103 0 7103 8 0 8 8 1 8 8 plimitpl 152 46 0 29 1 0 1 1 0 8 0 sigapl 424 552 0 501 7 0 7 7 0 8 1 knotepl 120 155389 0 155338 17 0 17 17 0 8 15 kqueuepl 184 75 0 60 1 0 1 1 0 8 0 pipepl 304 119 0 91 3 0 3 3 0 8 0 fdescpl 448 531 0 501 5 0 5 5 0 8 1 filepl 120 2552 0 2316 12 0 12 12 0 8 3 lockfpl 104 64 0 62 1 0 1 1 0 8 0 lockfspl 48 30 0 28 1 0 1 1 0 8 0 sessionpl 144 22 0 14 1 0 1 1 0 8 0 pgrppl 48 35 0 19 1 0 1 1 0 8 0 ucredpl 104 212 0 200 1 0 1 1 0 8 0 zombiepl 144 502 0 501 1 0 1 1 0 8 0 processpl 1168 552 0 501 5 0 5 5 0 8 1 procpl 664 740 0 676 6 0 6 6 0 8 0 sosppl 168 2 0 2 1 0 1 1 0 8 1 sockpl 552 690 0 649 14 3 11 14 0 8 8 mcl64k 65536 8 0 8 1 0 1 1 0 8 1 mcl8k 8192 5 0 5 1 0 1 1 0 8 1 mcl4k 4096 2597 0 2547 15 0 15 15 0 8 8 mcl2k 2048 456 0 452 5 0 5 5 0 8 4 mtagpl 96 9 0 5 1 0 1 1 0 8 0 mbufpl 256 5408 0 5254 18 0 18 18 0 8 3 bufpl 280 2963 0 117 204 0 204 204 0 8 0 anonpl 24 120104 0 113688 62 0 62 62 0 187 16 amapchunkpl 152 12322 0 11721 35 0 35 35 0 158 11 amappl16 200 2385 0 2234 19 0 19 19 0 8 8 amappl15 192 6 0 6 1 0 1 1 0 8 1 amappl14 184 109 0 99 1 0 1 1 0 8 0 amappl13 176 2 0 2 1 0 1 1 0 8 1 amappl12 168 1155 0 1125 2 0 2 2 0 8 0 amappl11 160 113 0 103 1 0 1 1 0 8 0 amappl10 152 12 0 12 1 0 1 1 0 8 1 amappl9 144 277 0 277 1 0 1 1 0 8 1 amappl8 136 65 0 62 1 0 1 1 0 8 0 amappl7 128 94 0 84 1 0 1 1 0 8 0 amappl6 120 243 0 239 1 0 1 1 0 8 0 amappl5 112 119 0 112 1 0 1 1 0 8 0 amappl4 104 267 0 249 1 0 1 1 0 8 0 amappl3 96 2014 0 1894 3 0 3 3 0 8 0 amappl2 88 617 0 562 2 0 2 2 0 8 0 amappl1 80 8629 0 8067 13 0 13 13 0 8 1 amappl 88 3252 0 3073 4 0 4 4 0 92 0 dma4096 4096 1 0 1 1 0 1 1 0 8 1 dma1024 1024 1 0 0 1 0 1 1 0 8 0 dma256 256 7 0 7 1 0 1 1 0 8 1 dma128 128 254 0 254 1 0 1 1 0 8 1 dma64 64 6 0 6 1 0 1 1 0 8 1 dma32 32 7 0 7 1 0 1 1 0 8 1 dma16 16 18 0 17 1 0 1 1 0 8 0 aobjpl 72 11 0 0 1 0 1 1 0 8 0 uaddrrnd 24 531 0 501 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 531 0 501 1 0 1 1 0 8 0 vmmpekpl 168 5639 0 5611 2 0 2 2 0 8 0 vmmpepl 168 40704 0 38651 95 0 95 95 0 357 5 vmsppl 368 530 0 501 4 0 4 4 0 8 1 rwobjpl 40 15883 0 12884 31 0 31 31 0 8 0 pdppl 4096 1069 0 1002 99 30 69 83 0 8 2 pvpl 32 267530 0 255144 131 0 131 131 0 265 27 pmappl 216 530 0 501 3 0 3 3 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 389 0 30 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:438 panic(ffffffff8333d232) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff833791ab,ffffffff833d80c7,3b7,ffffffff833b1a9d) at __assert+0x29 sys/kern/subr_prf.c:-1 refcnt_finalize(ffff80003c9b70b0,ffffffff83330155) at refcnt_finalize+0x1c8 sys/kern/kern_synch.c:952 pppx_if_destroy(205b9a,ffff80003c9b70a8) at pppx_if_destroy+0x3d sys/net/if_pppx.c:794 pppxclose(205b9a,1,2000,ffff80003c97fa18) at pppxclose+0xa0 sys/net/if_pppx.c:541 spec_close(ffff80003916d310) at spec_close+0x417 sys/kern/spec_vnops.c:-1 VOP_CLOSE(fffffd805dbc0028,1,fffffd8007bfb618,ffff80003c97fa18) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156 vn_closefile(fffffd806537fbd0,ffff80003c97fa18) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:292 [inline] vn_closefile(fffffd806537fbd0,ffff80003c97fa18) at vn_closefile+0x11d sys/kern/vfs_vnops.c:615 fdrop(fffffd806537fbd0,ffff80003c97fa18) at fdrop+0x121 sys/kern/kern_descrip.c:1280 closef(fffffd806537fbd0,ffff80003c97fa18) at closef+0x190 sys/kern/kern_descrip.c:1264 fdfree(ffff80003c97fa18) at fdfree+0x115 sys/kern/kern_descrip.c:1195 exit1(ffff80003c97fa18,0,0,1) at exit1+0x576 sys/kern/kern_exit.c:215 sys_exit(ffff80003c97fa18,ffff80003916d670,ffff80003916d5c0) at sys_exit+0x1a sys/kern/kern_exit.c:-1 syscall(ffff80003916d670) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003916d670) at syscall+0x962 sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x71f8564cea80, count: -16 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff8333d232) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff833791ab,ffffffff833d80c7,3b7,ffffffff833b1a9d) at __assert+0x29 sys/kern/subr_prf.c:-1 refcnt_finalize(ffff80003c9b70b0,ffffffff83330155) at refcnt_finalize+0x1c8 sys/kern/kern_synch.c:952 pppx_if_destroy(205b9a,ffff80003c9b70a8) at pppx_if_destroy+0x3d sys/net/if_pppx.c:794 pppxclose(205b9a,1,2000,ffff80003c97fa18) at pppxclose+0xa0 sys/net/if_pppx.c:541 spec_close(ffff80003916d310) at spec_close+0x417 sys/kern/spec_vnops.c:-1 VOP_CLOSE(fffffd805dbc0028,1,fffffd8007bfb618,ffff80003c97fa18) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156 vn_closefile(fffffd806537fbd0,ffff80003c97fa18) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:292 [inline] vn_closefile(fffffd806537fbd0,ffff80003c97fa18) at vn_closefile+0x11d sys/kern/vfs_vnops.c:615 fdrop(fffffd806537fbd0,ffff80003c97fa18) at fdrop+0x121 sys/kern/kern_descrip.c:1280 closef(fffffd806537fbd0,ffff80003c97fa18) at closef+0x190 sys/kern/kern_descrip.c:1264 fdfree(ffff80003c97fa18) at fdfree+0x115 sys/kern/kern_descrip.c:1195 exit1(ffff80003c97fa18,0,0,1) at exit1+0x576 sys/kern/kern_exit.c:215 sys_exit(ffff80003c97fa18,ffff80003916d670,ffff80003916d5c0) at sys_exit+0x1a sys/kern/kern_exit.c:-1 syscall(ffff80003916d670) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003916d670) at syscall+0x962 sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x71f8564cea80, count: -16