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 *291318 84584 0 0 0x4000000 0 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff8343535e) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff833e3fce,ffffffff8332cee7,3b7,ffffffff833e5f4e) at __assert+0x29 sys/kern/subr_prf.c:-1 refcnt_finalize(ffff80002cd1b0b0,ffffffff8332d973) at refcnt_finalize+0x1c8 sys/kern/kern_synch.c:952 pppx_if_destroy(ffff800038152000,ffff80002cd1b0a8) at pppx_if_destroy+0x3d sys/net/if_pppx.c:794 pppxclose(205b92,41,2000,ffff80002a7e94a0) at pppxclose+0xa0 sys/net/if_pppx.c:541 spec_close(ffff80003c987030) at spec_close+0x412 sys/kern/spec_vnops.c:-1 VOP_CLOSE(fffffd8070fbca70,41,fffffd8007bfb7b8,ffff80002a7e94a0) at VOP_CLOSE+0x12a sys/kern/vfs_vops.c:156 vn_closefile(fffffd807a428ca8,ffff80002a7e94a0) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:292 [inline] vn_closefile(fffffd807a428ca8,ffff80002a7e94a0) at vn_closefile+0x11d sys/kern/vfs_vnops.c:615 fdrop(fffffd807a428ca8,ffff80002a7e94a0) at fdrop+0x126 sys/kern/kern_descrip.c:1267 closef(fffffd807a428ca8,ffff80002a7e94a0) at closef+0x190 sys/kern/kern_descrip.c:1251 syscall(ffff80003c987290) at syscall+0x97e mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c987290) at syscall+0x97e sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x6e067ddb820, 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(ffffffff8343535e) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff833e3fce,ffffffff8332cee7,3b7,ffffffff833e5f4e) at __assert+0x29 sys/kern/subr_prf.c:-1 refcnt_finalize(ffff80002cd1b0b0,ffffffff8332d973) at refcnt_finalize+0x1c8 sys/kern/kern_synch.c:952 pppx_if_destroy(ffff800038152000,ffff80002cd1b0a8) at pppx_if_destroy+0x3d sys/net/if_pppx.c:794 pppxclose(205b92,41,2000,ffff80002a7e94a0) at pppxclose+0xa0 sys/net/if_pppx.c:541 spec_close(ffff80003c987030) at spec_close+0x412 sys/kern/spec_vnops.c:-1 VOP_CLOSE(fffffd8070fbca70,41,fffffd8007bfb7b8,ffff80002a7e94a0) at VOP_CLOSE+0x12a sys/kern/vfs_vops.c:156 vn_closefile(fffffd807a428ca8,ffff80002a7e94a0) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:292 [inline] vn_closefile(fffffd807a428ca8,ffff80002a7e94a0) at vn_closefile+0x11d sys/kern/vfs_vnops.c:615 fdrop(fffffd807a428ca8,ffff80002a7e94a0) at fdrop+0x126 sys/kern/kern_descrip.c:1267 closef(fffffd807a428ca8,ffff80002a7e94a0) at closef+0x190 sys/kern/kern_descrip.c:1251 syscall(ffff80003c987290) at syscall+0x97e mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c987290) at syscall+0x97e sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x6e067ddb820, count: -13 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80003c986e10 rbx 0xffffffff81a5aa10 pppxclose rdx 0xffff800001471600 rcx 0 rax 0xffff80002a7e94a0 r8 0 r9 0x8080808080808080 r10 0xb8afc920689163fd r11 0x2c49fee6b3df2792 r12 0 r13 0 r14 0 r15 0x1 rip 0xffffffff81eba925 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80003c986e00 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=291318 pid=84584 tcnt=3 stat=onproc flags process=0 proc=4000000 runpri=32, usrpri=53, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80002a7e9c50,0xffff80002a7e99d0 process=0xffff80003814e010 user=0xffff80003c982000, vmspace=0xfffffd806b9a3a28 estcpu=3, cpticks=0, pctcpu=0.1, user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 44740 167494 67918 0 2 0 syz-executor 44740 179226 67918 0 3 0x4000080 fsleep syz-executor 44740 40392 67918 0 3 0x4000080 fsleep syz-executor 29043 35455 90623 60929 2 0x10 syz-executor 29043 270441 90623 60929 3 0x4000090 ttyout syz-executor 46943 333575 18233 0 2 0x10 syz-executor 46943 69619 18233 0 3 0x4000090 fsleep syz-executor 46943 316234 18233 0 3 0x4000090 fsleep syz-executor 46943 89570 18233 0 3 0x4000090 fsleep syz-executor 16072 285518 48093 0 2 0 syz-executor 16072 1861 48093 0 3 0x4000080 nanoslp syz-executor 16072 337861 48093 0 2 0x4000000 syz-executor 16072 383060 48093 0 3 0x4000080 fsleep syz-executor 45399 450783 24284 0 2 0 syz-executor 45399 92649 24284 0 3 0x4000080 fsleep syz-executor 45399 392280 24284 0 3 0x4000080 fsleep syz-executor 45399 38910 24284 0 3 0x4000080 fsleep syz-executor 84584 168407 91733 0 2 0 syz-executor *84584 291318 91733 0 7 0x4000000 syz-executor 84584 515688 91733 0 3 0x4000080 fsleep syz-executor 77453 35610 89441 0 2 0xc80 syz-executor 77453 372155 89441 0 3 0x4000080 sbwait syz-executor 77453 11516 89441 0 3 0x4000080 fsleep syz-executor 9155 307524 49294 0 2 0xc80 syz-executor 9155 89255 49294 0 3 0x4000080 lockf syz-executor 9155 474311 49294 0 3 0x4000080 fsleep syz-executor 49294 44528 35118 0 3 0x82 nanoslp syz-executor 91733 348177 35118 0 2 0xc82 syz-executor 90623 482124 35118 0 2 0xc82 syz-executor 24284 266864 35118 0 2 0xc82 syz-executor 67918 443523 35118 0 2 0xc82 syz-executor 48093 125509 35118 0 3 0x82 nanoslp syz-executor 89441 74989 35118 0 2 0xc82 syz-executor 18233 33879 35118 0 3 0x82 nanoslp syz-executor 35118 34382 7624 0 3 0x82 kqread syz-executor 7624 63310 71679 0 3 0x10008a sigsusp ksh 71679 477517 25337 0 3 0x98 kqread sshd-session 25337 162226 85935 0 3 0x92 kqread sshd-session 23393 273012 1 0 3 0x100083 ttyin getty 85935 507842 1 0 3 0x88 kqread sshd 25240 145280 70052 73 3 0x1100090 kqread syslogd 70052 467768 1 0 3 0x100082 sbwait syslogd 1654 37736 1 0 3 0x100080 kqread resolvd 5496 376185 41683 77 2 0x100012 dhcpleased 59242 52465 41683 77 3 0x100092 kqread dhcpleased 41683 389992 1 0 3 0x80 kqread dhcpleased 53028 352008 0 0 3 0x14200 bored smr 9464 475280 0 0 2 0x14200 zerothread 36725 439856 0 0 3 0x14200 aiodoned aiodoned 47605 111055 0 0 3 0x14200 syncer update 52320 519075 0 0 3 0x14200 cleaner cleaner 81755 282805 0 0 3 0x14200 reaper reaper 84099 425881 0 0 3 0x14200 pgdaemon pagedaemon 5558 392808 0 0 3 0x14200 bored viomb 90366 433276 0 0 3 0x40014200 acpi0 acpi0 8054 165127 0 0 3 0x14200 bored softnet7 81151 365044 0 0 3 0x14200 bored softnet6 62431 473857 0 0 3 0x14200 bored softnet5 53384 458818 0 0 3 0x14200 bored softnet4 21258 361424 0 0 3 0x14200 bored softnet3 37147 294700 0 0 3 0x14200 bored softnet2 32444 437884 0 0 3 0x14200 bored softnet1 21926 121974 0 0 2 0x14200 softnet0 54781 457721 0 0 3 0x14200 smrbar systqmp 65079 268747 0 0 3 0x14200 bored systq 76553 119932 0 0 3 0x40014200 tmoslp softclock 1664 148666 0 0 3 0x40014200 idle0 1 138692 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 10186 11042K 11298K 166960K 11392 0 pcb 17 12K 12K 166960K 34 0 rtable 207 6K 6K 166960K 271 0 pf 32 13K 14K 166960K 45 0 ifaddr 44 7K 8K 166960K 56 0 ifgroup 54 2K 2K 166960K 71 0 sysctl 2 1K 9K 166960K 6 0 counters 34 17K 18K 166960K 42 0 ioctlops 0 0K 2K 166960K 41 0 iov 0 0K 20K 166960K 5 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1346 85K 85K 166960K 1480 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 4 0 VM map 2 1K 1K 166960K 2 0 sem 5 0K 0K 166960K 6 0 dirhash 12 2K 2K 166960K 12 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 18 65K 89K 166960K 216 0 proc 60 59K 83K 166960K 484 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 0 0K 0K 166960K 6 0 in_multi 99 7K 7K 166960K 102 0 ether_multi 1 0K 0K 166960K 1 0 mrt 0 0K 0K 166960K 3 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 73 334K 334K 166960K 73 0 exec 0 0K 1K 166960K 361 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 235 143K 160K 166960K 3588 0 UVM aobj 7 2K 4K 166960K 8 0 pinsyscall 39 78K 92K 166960K 1243 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 1 0K 0K 166960K 6 0 NDP 14 0K 2K 166960K 34 0 temp 36 8662K 8727K 166960K 4002 0 kqueue 18 26K 26K 166960K 41 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 43 0 40 1 0 1 1 0 8 0 rtentry 136 100 0 6 4 0 4 4 0 8 0 unpcb 144 78 0 56 2 0 2 2 0 8 0 syncache 336 4 0 4 1 0 1 1 0 8 1 tcpcb 736 59 0 50 4 0 4 4 0 8 3 arp 88 11 0 0 1 0 1 1 0 8 0 inpcb 328 137 0 125 4 0 4 4 0 8 2 nd6 104 16 0 0 1 0 1 1 0 8 0 pkpcb 40 1 0 1 1 0 1 1 0 8 1 kcovpl 48 8 0 0 1 0 1 1 0 8 0 ppxss 1072 7 0 6 1 0 1 1 0 8 0 pppxif 1384 3 0 2 1 0 1 1 0 8 0 rttmr 136 1 0 1 1 0 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 481 0 37 30 0 30 30 0 8 2 art_table 40 482 0 37 5 0 5 5 0 8 0 art_node 32 100 0 16 1 0 1 1 0 8 0 sysvmsgpl 40 1 0 0 1 0 1 1 0 8 0 semapl 112 3 0 0 1 0 1 1 0 8 0 shmpl 112 5 0 1 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1758 0 251 95 0 95 95 0 8 0 ffsino 256 1758 0 251 95 0 95 95 0 8 0 nchpl 144 2064 0 372 63 0 63 63 0 8 0 uvmvnodes 80 1877 0 0 39 0 39 39 0 8 0 vnodes 216 1877 0 0 105 0 105 105 0 8 0 namei 1024 6240 0 6240 2 0 2 2 0 8 2 kstatmem 264 36 0 12 2 0 2 2 0 8 0 scxspl 216 6787 0 6787 8 0 8 8 1 8 8 plimitpl 152 173 0 153 1 0 1 1 0 8 0 sigapl 424 498 0 448 7 0 7 7 0 8 1 knotepl 120 5723 0 5668 9 0 9 9 0 8 7 kqueuepl 184 45 0 29 1 0 1 1 0 8 0 pipepl 304 109 0 82 3 0 3 3 0 8 0 fdescpl 448 478 0 448 5 0 5 5 0 8 1 filepl 120 2232 0 1982 9 0 9 9 0 8 1 lockfpl 104 45 0 38 1 0 1 1 0 8 0 lockfspl 48 24 0 19 1 0 1 1 0 8 0 sessionpl 144 22 0 14 1 0 1 1 0 8 0 pgrppl 48 32 0 16 1 0 1 1 0 8 0 ucredpl 104 370 0 357 1 0 1 1 0 8 0 zombiepl 144 448 0 448 1 0 1 1 0 8 1 processpl 1168 498 0 448 5 0 5 5 0 8 1 procpl 656 629 0 561 6 0 6 6 0 8 0 sockpl 552 265 0 228 5 0 5 5 0 8 1 mcl64k 65536 7 0 7 1 0 1 1 0 8 1 mcl8k 8192 4 0 4 1 0 1 1 0 8 1 mcl4k 4096 2527 0 2478 14 0 14 14 0 8 7 mcl2k 2048 274 0 271 1 0 1 1 0 8 0 mtagpl 96 4 0 4 1 0 1 1 0 8 1 mbufpl 256 4923 0 4779 14 0 14 14 0 8 4 bufpl 280 2919 0 117 201 0 201 201 0 8 0 anonpl 24 104504 0 101299 33 0 33 33 0 187 12 amapchunkpl 152 10514 0 10003 24 0 24 24 0 158 4 amappl16 200 1921 0 1896 5 0 5 5 0 8 3 amappl15 192 3 0 3 1 0 1 1 0 8 1 amappl14 184 103 0 93 1 0 1 1 0 8 0 amappl13 176 12 0 12 1 0 1 1 0 8 1 amappl12 168 1087 0 1057 3 0 3 3 0 8 1 amappl11 160 47 0 37 1 0 1 1 0 8 0 amappl10 152 5 0 5 1 0 1 1 0 8 1 amappl9 144 252 0 252 1 0 1 1 0 8 1 amappl8 136 19 0 18 1 0 1 1 0 8 0 amappl7 128 101 0 91 1 0 1 1 0 8 0 amappl6 120 167 0 164 1 0 1 1 0 8 0 amappl5 112 124 0 117 1 0 1 1 0 8 0 amappl4 104 264 0 249 1 0 1 1 0 8 0 amappl3 96 1655 0 1542 3 0 3 3 0 8 0 amappl2 88 609 0 556 2 0 2 2 0 8 0 amappl1 80 8396 0 7848 14 0 14 14 0 8 1 amappl 88 2939 0 2768 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 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 7 0 1 1 0 1 1 0 8 0 uaddrrnd 24 478 0 448 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 478 0 448 1 0 1 1 0 8 0 vmmpekpl 168 5407 0 5384 2 0 2 2 0 8 0 vmmpepl 168 36854 0 34981 87 0 87 87 0 357 0 vmsppl 368 477 0 448 4 0 4 4 0 8 1 rwobjpl 40 14743 0 12018 28 0 28 28 0 8 0 pdppl 4096 962 0 896 92 20 72 78 0 8 6 pvpl 32 232944 0 224353 102 0 102 102 0 265 22 pmappl 216 477 0 448 2 0 2 2 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 371 0 20 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(ffffffff8343535e) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff833e3fce,ffffffff8332cee7,3b7,ffffffff833e5f4e) at __assert+0x29 sys/kern/subr_prf.c:-1 refcnt_finalize(ffff80002cd1b0b0,ffffffff8332d973) at refcnt_finalize+0x1c8 sys/kern/kern_synch.c:952 pppx_if_destroy(ffff800038152000,ffff80002cd1b0a8) at pppx_if_destroy+0x3d sys/net/if_pppx.c:794 pppxclose(205b92,41,2000,ffff80002a7e94a0) at pppxclose+0xa0 sys/net/if_pppx.c:541 spec_close(ffff80003c987030) at spec_close+0x412 sys/kern/spec_vnops.c:-1 VOP_CLOSE(fffffd8070fbca70,41,fffffd8007bfb7b8,ffff80002a7e94a0) at VOP_CLOSE+0x12a sys/kern/vfs_vops.c:156 vn_closefile(fffffd807a428ca8,ffff80002a7e94a0) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:292 [inline] vn_closefile(fffffd807a428ca8,ffff80002a7e94a0) at vn_closefile+0x11d sys/kern/vfs_vnops.c:615 fdrop(fffffd807a428ca8,ffff80002a7e94a0) at fdrop+0x126 sys/kern/kern_descrip.c:1267 closef(fffffd807a428ca8,ffff80002a7e94a0) at closef+0x190 sys/kern/kern_descrip.c:1251 syscall(ffff80003c987290) at syscall+0x97e mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c987290) at syscall+0x97e sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x6e067ddb820, 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(ffffffff8343535e) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff833e3fce,ffffffff8332cee7,3b7,ffffffff833e5f4e) at __assert+0x29 sys/kern/subr_prf.c:-1 refcnt_finalize(ffff80002cd1b0b0,ffffffff8332d973) at refcnt_finalize+0x1c8 sys/kern/kern_synch.c:952 pppx_if_destroy(ffff800038152000,ffff80002cd1b0a8) at pppx_if_destroy+0x3d sys/net/if_pppx.c:794 pppxclose(205b92,41,2000,ffff80002a7e94a0) at pppxclose+0xa0 sys/net/if_pppx.c:541 spec_close(ffff80003c987030) at spec_close+0x412 sys/kern/spec_vnops.c:-1 VOP_CLOSE(fffffd8070fbca70,41,fffffd8007bfb7b8,ffff80002a7e94a0) at VOP_CLOSE+0x12a sys/kern/vfs_vops.c:156 vn_closefile(fffffd807a428ca8,ffff80002a7e94a0) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:292 [inline] vn_closefile(fffffd807a428ca8,ffff80002a7e94a0) at vn_closefile+0x11d sys/kern/vfs_vnops.c:615 fdrop(fffffd807a428ca8,ffff80002a7e94a0) at fdrop+0x126 sys/kern/kern_descrip.c:1267 closef(fffffd807a428ca8,ffff80002a7e94a0) at closef+0x190 sys/kern/kern_descrip.c:1251 syscall(ffff80003c987290) at syscall+0x97e mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c987290) at syscall+0x97e sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x6e067ddb820, count: -13