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 * 69889 88267 0 0x2000 0x4080000 0 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff83430ade) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff833e1bfe,ffffffff8332aa44,3b7,ffffffff833e3c56) at __assert+0x29 sys/kern/subr_prf.c:-1 refcnt_finalize(ffff8000ffffb0b0,ffffffff8332f885) at refcnt_finalize+0x1c8 sys/kern/kern_synch.c:952 pppx_if_destroy(0,ffff8000ffffb0a8) at pppx_if_destroy+0x3d sys/net/if_pppx.c:794 pppxclose(205b92,41,2000,ffff80003c9719c8) at pppxclose+0xa0 sys/net/if_pppx.c:541 spec_close(ffff80003c9a1cd0) at spec_close+0x412 sys/kern/spec_vnops.c:-1 VOP_CLOSE(fffffd806a7c3020,41,fffffd8007bfb820,ffff80003c9719c8) at VOP_CLOSE+0x12a sys/kern/vfs_vops.c:156 vn_closefile(fffffd806a897808,ffff80003c9719c8) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:292 [inline] vn_closefile(fffffd806a897808,ffff80003c9719c8) at vn_closefile+0x11d sys/kern/vfs_vnops.c:615 fdrop(fffffd806a897808,ffff80003c9719c8) at fdrop+0x126 sys/kern/kern_descrip.c:1267 closef(fffffd806a897808,ffff80003c9719c8) at closef+0x190 sys/kern/kern_descrip.c:1251 syscall(ffff80003c9a1f30) at syscall+0x97e mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c9a1f30) at syscall+0x97e sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xf6d9d350c70, count: 2 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(ffffffff83430ade) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff833e1bfe,ffffffff8332aa44,3b7,ffffffff833e3c56) at __assert+0x29 sys/kern/subr_prf.c:-1 refcnt_finalize(ffff8000ffffb0b0,ffffffff8332f885) at refcnt_finalize+0x1c8 sys/kern/kern_synch.c:952 pppx_if_destroy(0,ffff8000ffffb0a8) at pppx_if_destroy+0x3d sys/net/if_pppx.c:794 pppxclose(205b92,41,2000,ffff80003c9719c8) at pppxclose+0xa0 sys/net/if_pppx.c:541 spec_close(ffff80003c9a1cd0) at spec_close+0x412 sys/kern/spec_vnops.c:-1 VOP_CLOSE(fffffd806a7c3020,41,fffffd8007bfb820,ffff80003c9719c8) at VOP_CLOSE+0x12a sys/kern/vfs_vops.c:156 vn_closefile(fffffd806a897808,ffff80003c9719c8) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:292 [inline] vn_closefile(fffffd806a897808,ffff80003c9719c8) at vn_closefile+0x11d sys/kern/vfs_vnops.c:615 fdrop(fffffd806a897808,ffff80003c9719c8) at fdrop+0x126 sys/kern/kern_descrip.c:1267 closef(fffffd806a897808,ffff80003c9719c8) at closef+0x190 sys/kern/kern_descrip.c:1251 syscall(ffff80003c9a1f30) at syscall+0x97e mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c9a1f30) at syscall+0x97e sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xf6d9d350c70, count: -13 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80003c9a1ab0 rbx 0xffffffff82a86c70 pppxclose rdx 0 rcx 0 rax 0xffff80003c9719c8 r8 0 r9 0x8080808080808080 r10 0x35a59f34c616ad0 r11 0x8a049fec1c423bee r12 0 r13 0 r14 0 r15 0x1 rip 0xffffffff81708135 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80003c9a1aa0 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=69889 pid=88267 tcnt=3 stat=onproc flags process=2000 proc=4080000 runpri=32, usrpri=86, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0xffff80002a7d19b8 scnt=1 ecnt=0 forw=0xffffffffffffffff, list=0xffff80003c9702b8,0xffff80002a7d19c8 process=0xffff80002cd1e008 user=0xffff80003c99c000, vmspace=0xfffffd807ae045d0 estcpu=36, cpticks=2, pctcpu=0.0, user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 46739 490984 17604 0 2 0 syz-executor 46739 388371 17604 0 3 0x4000080 fsleep syz-executor 13257 300984 17852 0 2 0 syz-executor 13257 327883 17852 0 3 0x4000080 kqread syz-executor 85242 388980 85335 0 3 0x3000 suspend syz-executor 85242 161101 85335 0 2 0x4081000 syz-executor 88267 285973 36790 0 4 0x82000 syz-executor *88267 69889 36790 0 7 0x4082000 syz-executor 88267 507003 36790 0 3 0x4002000 suspend syz-executor 1311 31078 20657 0 2 0xc80 syz-executor 1311 240428 20657 0 3 0x4000080 fifor syz-executor 1311 62119 20657 0 3 0x4000080 fsleep syz-executor 22974 252992 6449 0 3 0x80 nanoslp syz-executor 22974 243508 6449 0 3 0x4000080 kqsel syz-executor 22974 323853 6449 0 3 0x4000080 fsleep syz-executor 70850 139182 39195 0 2 0xc80 syz-executor 70850 433838 39195 0 3 0x4000080 fifow syz-executor 70850 504760 39195 0 3 0x4000080 fsleep syz-executor 85335 85186 85767 0 2 0xc82 syz-executor 36790 11641 85767 0 2 0xc82 syz-executor 17604 503818 85767 0 2 0xc82 syz-executor 17852 371437 85767 0 3 0x82 nanoslp syz-executor 6449 191656 85767 0 3 0x82 nanoslp syz-executor 20657 441283 85767 0 2 0xc82 syz-executor 39195 32521 85767 0 3 0x82 nanoslp syz-executor 24478 495070 85767 0 2 0x2 syz-executor 85767 50437 19732 0 3 0x82 kqread syz-executor 19732 248905 82861 0 3 0x10008a sigsusp ksh 82861 204452 35893 0 3 0x98 kqread sshd-session 35893 238776 53941 0 3 0x92 kqread sshd-session 76975 467437 1 0 3 0x100083 ttyin getty 53941 470569 1 0 3 0x88 kqread sshd 47424 343048 96708 73 3 0x1100090 kqread syslogd 96708 142877 1 0 3 0x100082 sbwait syslogd 35279 424763 1 0 3 0x100080 kqread resolvd 37547 330825 90463 77 2 0x100012 dhcpleased 12171 288619 90463 77 3 0x100092 kqread dhcpleased 90463 118280 1 0 3 0x80 kqread dhcpleased 17858 391291 0 0 3 0x14200 bored smr 45668 5245 0 0 2 0x14200 zerothread 91281 81388 0 0 3 0x14200 aiodoned aiodoned 3733 177129 0 0 3 0x14200 syncer update 98361 511343 0 0 3 0x14200 cleaner cleaner 51050 321354 0 0 3 0x14200 reaper reaper 63792 68169 0 0 3 0x14200 pgdaemon pagedaemon 86682 422673 0 0 3 0x14200 bored viomb 77650 311643 0 0 3 0x40014200 acpi0 acpi0 61397 240893 0 0 3 0x14200 bored softnet7 32138 414100 0 0 3 0x14200 bored softnet6 88569 210024 0 0 3 0x14200 bored softnet5 76390 355250 0 0 3 0x14200 bored softnet4 50495 233360 0 0 3 0x14200 bored softnet3 41958 480320 0 0 3 0x14200 bored softnet2 78675 456009 0 0 3 0x14200 bored softnet1 8536 383921 0 0 2 0x14200 softnet0 69025 487771 0 0 3 0x14200 smrbar systqmp 97003 438659 0 0 3 0x14200 bored systq 12662 409024 0 0 3 0x40014200 tmoslp softclock 9384 165995 0 0 3 0x40014200 idle0 1 163156 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 10177 11038K 11299K 166960K 11330 0 pcb 17 14K 16K 166960K 107 0 rtable 209 6K 6K 166960K 275 0 pf 30 12K 13K 166960K 40 0 ifaddr 42 7K 8K 166960K 51 0 ifgroup 50 2K 2K 166960K 66 0 sysctl 3 1K 9K 166960K 7 0 counters 33 17K 18K 166960K 40 0 ioctlops 0 0K 2K 166960K 37 0 iov 0 0K 2K 166960K 3 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1344 84K 85K 166960K 1394 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 3 0 VM map 2 1K 1K 166960K 2 0 sem 4 0K 0K 166960K 4 0 dirhash 12 2K 2K 166960K 12 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 17 61K 97K 166960K 191 0 sigio 0 0K 0K 166960K 1 0 proc 60 59K 124K 166960K 482 0 subproc 72 4K 4K 166960K 72 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 2 0K 0K 166960K 8 0 in_multi 100 7K 7K 166960K 109 0 ether_multi 1 0K 0K 166960K 4 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 61 281K 281K 166960K 61 0 exec 0 0K 1K 166960K 348 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 225 143K 151K 166960K 3364 0 UVM aobj 6 2K 2K 166960K 7 0 pinsyscall 38 76K 96K 166960K 1223 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 5 0 NDP 27 2K 2K 166960K 31 0 temp 37 8666K 8730K 166960K 4030 0 kqueue 16 26K 26K 166960K 32 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 40 0 37 1 0 1 1 0 8 0 rtentry 136 101 0 6 4 0 4 4 0 8 0 unpcb 144 64 0 44 1 0 1 1 0 8 0 syncache 336 5 0 5 1 0 1 1 0 8 1 tcpqe 32 1 0 1 1 0 1 1 0 8 1 tcpcb 736 23 0 18 1 0 1 1 0 8 0 arp 88 10 0 0 1 0 1 1 0 8 0 ipq 40 1 0 0 1 0 1 1 0 8 0 ipqe 40 1 0 0 1 0 1 1 0 8 0 inpcb 328 160 0 150 7 0 7 7 0 8 6 ip6q 72 2 0 0 1 0 1 1 0 8 0 ip6af 40 2 0 0 1 0 1 1 0 8 0 nd6 104 18 0 1 1 0 1 1 0 8 0 pkpcb 40 2 0 2 1 0 1 1 0 8 1 kcovpl 48 8 0 0 1 0 1 1 0 8 0 ppxss 1072 5 0 4 1 0 1 1 0 8 0 pppxif 1384 4 0 3 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 452 0 6 29 0 29 29 0 8 0 art_table 40 453 0 6 5 0 5 5 0 8 0 art_node 32 101 0 15 1 0 1 1 0 8 0 semapl 112 2 0 0 1 0 1 1 0 8 0 shmpl 112 4 0 1 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1649 0 140 95 0 95 95 0 8 0 ffsino 256 1649 0 140 95 0 95 95 0 8 0 nchpl 144 1917 0 230 63 0 63 63 0 8 0 uvmvnodes 80 1751 0 0 36 0 36 36 0 8 0 vnodes 216 1751 0 0 98 0 98 98 0 8 0 namei 1024 5641 0 5640 2 0 2 2 0 8 1 kstatmem 264 30 0 8 2 0 2 2 0 8 0 scsiplug 72 1 0 1 1 0 1 1 0 8 1 scxspl 216 6587 0 6587 8 0 8 8 1 8 8 plimitpl 152 33 0 17 1 0 1 1 0 8 0 sigapl 424 474 0 425 7 0 7 7 0 8 1 knotepl 120 5043 0 4991 2 0 2 2 0 8 0 kqueuepl 184 35 0 19 1 0 1 1 0 8 0 pipepl 304 100 0 73 3 0 3 3 0 8 0 fdescpl 448 454 0 425 5 0 5 5 0 8 1 filepl 120 1648 0 1431 10 0 10 10 0 8 3 lockfpl 104 34 0 32 1 0 1 1 0 8 0 lockfspl 48 17 0 15 1 0 1 1 0 8 0 sessionpl 144 23 0 15 1 0 1 1 0 8 0 pgrppl 48 33 0 17 1 0 1 1 0 8 0 ucredpl 104 120 0 108 1 0 1 1 0 8 0 zombiepl 144 426 0 425 1 0 1 1 0 8 0 processpl 1168 474 0 425 5 0 5 5 0 8 1 procpl 656 570 0 510 6 0 6 6 0 8 0 sockpl 552 268 0 235 8 0 8 8 0 8 5 mcl64k 65536 2 0 2 1 0 1 1 0 8 1 mcl9k 9216 1 0 1 1 0 1 1 0 8 1 mcl8k 8192 4 0 4 1 0 1 1 0 8 1 mcl4k 4096 2485 0 2433 14 0 14 14 0 8 6 mcl2k 2048 286 0 280 2 0 2 2 0 8 1 mtagpl 96 7 0 7 1 0 1 1 0 8 1 mbufpl 256 4573 0 4439 11 0 11 11 0 8 1 bufpl 280 2877 0 117 198 0 198 198 0 8 0 anonpl 24 98587 0 95459 42 0 42 42 0 187 20 amapchunkpl 152 9665 0 9178 24 0 24 24 0 158 3 amappl16 200 1804 0 1781 14 0 14 14 0 8 12 amappl15 192 9 0 9 1 0 1 1 0 8 1 amappl14 184 128 0 118 1 0 1 1 0 8 0 amappl13 176 8 0 8 1 0 1 1 0 8 1 amappl12 168 1088 0 1059 3 0 3 3 0 8 1 amappl11 160 44 0 34 1 0 1 1 0 8 0 amappl10 152 4 0 4 1 0 1 1 0 8 1 amappl9 144 253 0 253 1 0 1 1 0 8 1 amappl8 136 20 0 19 1 0 1 1 0 8 0 amappl7 128 100 0 90 1 0 1 1 0 8 0 amappl6 120 184 0 181 1 0 1 1 0 8 0 amappl5 112 108 0 102 1 0 1 1 0 8 0 amappl4 104 268 0 251 1 0 1 1 0 8 0 amappl3 96 1525 0 1415 4 0 4 4 0 8 0 amappl2 88 618 0 563 2 0 2 2 0 8 0 amappl1 80 8563 0 8018 14 0 14 14 0 8 1 amappl 88 2714 0 2551 5 0 5 5 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 6 0 6 1 0 1 1 0 8 1 dma128 128 253 0 253 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 6 0 1 1 0 1 1 0 8 0 uaddrrnd 24 454 0 425 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 454 0 425 1 0 1 1 0 8 0 vmmpekpl 168 5349 0 5324 2 0 2 2 0 8 0 vmmpepl 168 35990 0 34180 88 0 88 88 0 357 4 vmsppl 368 453 0 425 4 0 4 4 0 8 1 rwobjpl 40 14540 0 11949 28 0 28 28 0 8 1 pdppl 4096 915 0 850 97 18 79 83 0 8 14 pvpl 32 222193 0 213714 95 0 95 95 0 265 19 pmappl 216 453 0 425 3 0 3 3 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 370 0 18 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(ffffffff83430ade) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff833e1bfe,ffffffff8332aa44,3b7,ffffffff833e3c56) at __assert+0x29 sys/kern/subr_prf.c:-1 refcnt_finalize(ffff8000ffffb0b0,ffffffff8332f885) at refcnt_finalize+0x1c8 sys/kern/kern_synch.c:952 pppx_if_destroy(0,ffff8000ffffb0a8) at pppx_if_destroy+0x3d sys/net/if_pppx.c:794 pppxclose(205b92,41,2000,ffff80003c9719c8) at pppxclose+0xa0 sys/net/if_pppx.c:541 spec_close(ffff80003c9a1cd0) at spec_close+0x412 sys/kern/spec_vnops.c:-1 VOP_CLOSE(fffffd806a7c3020,41,fffffd8007bfb820,ffff80003c9719c8) at VOP_CLOSE+0x12a sys/kern/vfs_vops.c:156 vn_closefile(fffffd806a897808,ffff80003c9719c8) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:292 [inline] vn_closefile(fffffd806a897808,ffff80003c9719c8) at vn_closefile+0x11d sys/kern/vfs_vnops.c:615 fdrop(fffffd806a897808,ffff80003c9719c8) at fdrop+0x126 sys/kern/kern_descrip.c:1267 closef(fffffd806a897808,ffff80003c9719c8) at closef+0x190 sys/kern/kern_descrip.c:1251 syscall(ffff80003c9a1f30) at syscall+0x97e mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c9a1f30) at syscall+0x97e sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xf6d9d350c70, count: -13 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff83430ade) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff833e1bfe,ffffffff8332aa44,3b7,ffffffff833e3c56) at __assert+0x29 sys/kern/subr_prf.c:-1 refcnt_finalize(ffff8000ffffb0b0,ffffffff8332f885) at refcnt_finalize+0x1c8 sys/kern/kern_synch.c:952 pppx_if_destroy(0,ffff8000ffffb0a8) at pppx_if_destroy+0x3d sys/net/if_pppx.c:794 pppxclose(205b92,41,2000,ffff80003c9719c8) at pppxclose+0xa0 sys/net/if_pppx.c:541 spec_close(ffff80003c9a1cd0) at spec_close+0x412 sys/kern/spec_vnops.c:-1 VOP_CLOSE(fffffd806a7c3020,41,fffffd8007bfb820,ffff80003c9719c8) at VOP_CLOSE+0x12a sys/kern/vfs_vops.c:156 vn_closefile(fffffd806a897808,ffff80003c9719c8) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:292 [inline] vn_closefile(fffffd806a897808,ffff80003c9719c8) at vn_closefile+0x11d sys/kern/vfs_vnops.c:615 fdrop(fffffd806a897808,ffff80003c9719c8) at fdrop+0x126 sys/kern/kern_descrip.c:1267 closef(fffffd806a897808,ffff80003c9719c8) at closef+0x190 sys/kern/kern_descrip.c:1251 syscall(ffff80003c9a1f30) at syscall+0x97e mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c9a1f30) at syscall+0x97e sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xf6d9d350c70, count: -13