panic: kernel diagnostic assertion "pg->wire_count != 0" failed: file "/syzkaller/managers/multicore/kernel/sys/uvm/uvm_page.c", line 1207 Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 106613 54566 0 0 0 1 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff834bb28a) at panic+0x1e5 sys/kern/subr_prf.c:198 __assert(ffffffff834fb0be,ffffffff834ef37c,4b7,ffffffff83451122) at __assert+0x29 sys/kern/subr_prf.c:-1 uvm_pageunwire(fffff1000832b9e8) at uvm_pageunwire+0x17d sys/uvm/uvm_page.c:1206 uvm_fault_unwire_locked(fffff10064db43f8,243b256f000,243b296e000) at uvm_fault_unwire_locked+0x33a sys/uvm/uvm_fault.c:1790 uvm_unmap_kill_entry_withlock(fffff10064db43f8,fffff1006c2d5ee8,0) at uvm_unmap_kill_entry_withlock+0x81 sys/uvm/uvm_map.c:1866 uvm_map_teardown(fffff10064db43f8) at uvm_map_teardown+0x117 uvm_map_addr_RBT_LEFT sys/uvm/uvm_map.h:-1 [inline] uvm_map_teardown(fffff10064db43f8) at uvm_map_teardown+0x117 sys/uvm/uvm_map.c:2497 exit1(ffff8000fffe9a10,0,0,1) at exit1+0x6fc sys/kern/kern_exit.c:260 sys_exit(ffff8000fffe9a10,ffff80002a26e110,ffff80002a26e060) at sys_exit+0x1a sys/kern/kern_exit.c:-1 syscall(ffff80002a26e110) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80002a26e110) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x77c5b61b4890, count: 4 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{0}> ddb{0}> set $lines = 0 ddb{0}> set $maxwidth = 0 ddb{0}> show panic *cpu0: kernel diagnostic assertion "pg->wire_count != 0" failed: file "/syzkaller/managers/multicore/kernel/sys/uvm/uvm_page.c", line 1207 ddb{0}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff834bb28a) at panic+0x1e5 sys/kern/subr_prf.c:198 __assert(ffffffff834fb0be,ffffffff834ef37c,4b7,ffffffff83451122) at __assert+0x29 sys/kern/subr_prf.c:-1 uvm_pageunwire(fffff1000832b9e8) at uvm_pageunwire+0x17d sys/uvm/uvm_page.c:1206 uvm_fault_unwire_locked(fffff10064db43f8,243b256f000,243b296e000) at uvm_fault_unwire_locked+0x33a sys/uvm/uvm_fault.c:1790 uvm_unmap_kill_entry_withlock(fffff10064db43f8,fffff1006c2d5ee8,0) at uvm_unmap_kill_entry_withlock+0x81 sys/uvm/uvm_map.c:1866 uvm_map_teardown(fffff10064db43f8) at uvm_map_teardown+0x117 uvm_map_addr_RBT_LEFT sys/uvm/uvm_map.h:-1 [inline] uvm_map_teardown(fffff10064db43f8) at uvm_map_teardown+0x117 sys/uvm/uvm_map.c:2497 exit1(ffff8000fffe9a10,0,0,1) at exit1+0x6fc sys/kern/kern_exit.c:260 sys_exit(ffff8000fffe9a10,ffff80002a26e110,ffff80002a26e060) at sys_exit+0x1a sys/kern/kern_exit.c:-1 syscall(ffff80002a26e110) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80002a26e110) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x77c5b61b4890, count: -11 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff80002a26dd30 rbx 0xffffffff83911e07 cpu_info_full_primary+0x2e07 rdx 0 rcx 0xffff8000fffe9a10 rax 0xffffffff83910ff0 cpu_info_full_primary+0x1ff0 r8 0x101010101010101 r9 0x8080808080808080 r10 0x82fd4e9475f13050 r11 0x354f79bb02f29391 r12 0xffffffff83911c08 cpu_info_full_primary+0x2c08 r13 0 r14 0 r15 0x1 rip 0xffffffff81792d45 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80002a26dd20 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor) tid=404239 pid=64227 tcnt=0 stat=onproc flags process=1008 proc=2000 runpri=32, usrpri=73, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0xffff8000fffe9a10 scnt=-1 ecnt=1 forw=0xffffffffffffffff, list=0xffff80002a240018,0xffff8000fffe2d30 process=0xffff8000fffe7510 user=0xffff80002a269000, vmspace=0xfffff10064db43f8 estcpu=23, cpticks=8, pctcpu=0.5, user=0, sys=2, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 54566 106613 3504 0 7 0 syz-executor 54566 189111 3504 0 2 0x4000000 syz-executor 94385 190934 15716 0 2 0x1 syz-executor 94385 164566 15716 0 3 0x4000080 fsleep syz-executor 94385 34587 15716 0 3 0x4000080 fsleep syz-executor 94385 17504 15716 0 3 0x4000080 fsleep syz-executor 9663 313938 25528 0 2 0x1 syz-executor 9663 471572 25528 0 3 0x4000080 fsleep syz-executor 9663 411267 25528 0 3 0x4000080 fsleep syz-executor 53110 173610 67671 0 2 0 syz-executor 53110 489439 67671 0 3 0x4000080 fsleep syz-executor 79750 278339 52530 0 2 0x1 syz-executor 79750 207944 52530 0 3 0x4000080 msgwait syz-executor 79750 27646 52530 0 3 0x4000080 fsleep syz-executor 27998 447935 52681 0 2 0x1 syz-executor 27998 441255 52681 0 3 0x4000080 kqsel syz-executor 27998 35004 52681 0 3 0x4000080 fsleep syz-executor 95075 107060 0 0 3 0x14200 acct acct 14767 43240 1 0 3 0x80 nanoslp init 84657 300155 4452 0 2 0x3 syz-executor 52530 381821 4452 0 2 0x3 syz-executor 52681 350237 4452 0 2 0x3 syz-executor 67671 52400 4452 0 2 0x3 syz-executor 25528 102753 4452 0 2 0x3 syz-executor 3504 186626 4452 0 2 0xc82 syz-executor 27987 277431 4452 0 3 0x82 wait syz-executor 15716 141967 4452 0 2 0x3 syz-executor 4452 95196 1 0 3 0x82 kqread syz-executor 96207 476085 1 74 3 0x1100092 bpf pflogd 40569 322716 1 73 3 0x1100090 kqread syslogd 76932 319900 0 0 3 0x14200 bored smr 18978 490472 0 0 3 0x14200 pgzero zerothread 74328 426309 0 0 3 0x14200 aiodoned aiodoned 52509 240352 0 0 3 0x14200 syncer update 53081 273002 0 0 3 0x14200 cleaner cleaner 50155 356536 0 0 2 0x14200 reaper 55615 325321 0 0 3 0x14200 pgdaemon pagedaemon 50666 290966 0 0 3 0x14200 bored viomb 55966 233678 0 0 3 0x40014200 acpi0 acpi0 74317 179022 0 0 3 0x40014200 idle1 23064 454551 0 0 3 0x14200 bored softnet1 11714 306663 0 0 3 0x14200 bored softnet0 64716 97284 0 0 3 0x14200 bored systqmp 45636 388148 0 0 3 0x14200 bored systq 76514 53192 0 0 3 0x14200 tmoslp softclockmp 90396 204884 0 0 3 0x40014200 tmoslp softclock 40652 516180 0 0 3 0x40014200 idle0 1 357046 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 54566 (syz-executor) thread 0xffff8000fffe9778 (189111) exclusive rwlock vmmaplk r = 0 (0xfffff1006f3784d8) #0 witness_lock+0x5f1 stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5f1 sys/kern/subr_witness.c:1160 #1 rw_do_enter_read+0x3e8 sys/kern/kern_rwlock.c:413 #2 uvmfault_lookup+0x122 sys/uvm/uvm_fault.c:1880 #3 uvm_fault_check+0x4f sys/uvm/uvm_fault.c:693 #4 uvm_fault+0x106 sys/uvm/uvm_fault.c:627 #5 upageflttrap+0xa9 sys/arch/amd64/amd64/trap.c:192 #6 usertrap+0x430 sys/arch/amd64/amd64/trap.c:640 #7 recall_trap+0x8 Process 50155 (reaper) thread 0xffff8000ffffd9f8 (356536) exclusive rwlock kmmaplk r = 0 (0xffffffff83abd598) #0 witness_lock+0x5f1 stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5f1 sys/kern/subr_witness.c:1160 #1 rw_do_enter_write+0x419 sys/kern/kern_rwlock.c:320 #2 vm_map_lock_ln+0x12e sys/uvm/uvm_map.c:5171 #3 uvm_unmap+0x7d sys/uvm/uvm_map.c:1798 #4 km_free+0x85 sys/uvm/uvm_km.c:714 #5 uvm_uarea_free+0x4f sys/uvm/uvm_glue.c:304 #6 reaper+0x1ca sys/kern/kern_exit.c:493 #7 proc_trampoline+0x10 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 11055 12090K 12368K 166960K 12589 0 pcb 17 14K 15K 166960K 114 0 rtable 236 8K 11K 166960K 508 0 pf 33 17K 24K 166960K 140 0 ifaddr 39 6K 7K 166960K 78 0 ifgroup 51 2K 2K 166960K 119 0 sysctl 4 1K 9K 166960K 11 0 counters 68 36K 38K 166960K 126 0 ioctlops 0 0K 4K 166960K 1643 0 iov 0 0K 17K 166960K 16 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1357 85K 86K 166960K 1816 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 9K 166960K 11 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 0K 166960K 16 0 dirhash 12 2K 2K 166960K 12 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 17 61K 93K 166960K 448 0 sigio 0 0K 0K 166960K 4 0 proc 15 33K 148K 166960K 644 0 subproc 72 4K 4K 166960K 91 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 44 0 in_multi 88 6K 7K 166960K 136 0 ether_multi 1 0K 0K 166960K 2 0 mrt 0 0K 0K 166960K 18 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 91 413K 413K 166960K 91 0 exec 0 0K 1K 166960K 430 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 171 90K 177K 166960K 6011 0 UVM aobj 15 2K 4K 166960K 18 0 pinsyscall 22 44K 104K 166960K 1673 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 11 0 NDP 11 0K 2K 166960K 51 0 temp 53 9122K 9169K 166960K 18159 0 kqueue 3 4K 29K 166960K 89 0 SYN cache 2 16K 16K 166960K 2 0 ddb{0}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle plcache 128 26 0 0 1 0 1 1 0 8 0 rtpcb 120 50 0 50 1 0 1 1 0 8 1 rtentry 176 149 0 48 6 0 6 6 0 8 0 unpcb 144 383 0 378 8 5 3 6 0 8 2 syncache 336 70 0 70 2 1 1 1 0 8 1 tcpqe 32 1 0 1 1 0 1 1 0 8 1 tcpcb 736 141 0 139 7 6 1 7 0 8 0 arp 136 23 0 7 1 0 1 1 0 8 0 ipq 40 1 0 1 1 1 0 1 0 8 0 ipqe 40 3 0 3 1 1 0 1 0 8 0 inpcb 328 477 0 475 13 6 7 7 0 8 5 nd6 152 34 0 12 1 0 1 1 0 8 0 pkpcb 40 1 0 1 1 0 1 1 0 8 1 kcovpl 48 10 0 2 1 0 1 1 0 8 0 mppekey 1024 3 0 3 2 1 1 1 0 8 1 ppxss 1192 17 0 17 1 0 1 1 0 8 1 pppxif 1576 6 0 6 2 1 1 1 0 8 1 pffrag 232 27 0 25 1 0 1 1 0 482 0 pffrnode 88 27 0 25 1 0 1 1 0 8 0 pffrent 40 54 0 51 1 0 1 1 0 8 0 pfosfp 40 1428 0 1005 5 0 5 5 0 8 0 pfosfpen 112 1428 0 714 21 0 21 21 0 8 0 pfrktable 1344 13 0 13 1 1 0 1 0 8 0 pfanchor 1288 11 0 11 2 1 1 1 0 8 1 pftag 88 3 0 3 1 1 0 1 0 8 0 pfstitem 24 43 0 0 1 0 1 1 0 8 0 pfstkey 128 45 0 2 2 0 2 2 0 8 0 pfstate 448 44 0 1 5 0 5 5 0 8 0 pfrule 1360 29 0 24 2 1 1 2 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 630 0 184 36 3 33 33 0 8 2 art_table 40 631 0 184 7 1 6 6 0 8 0 art_node 32 148 0 56 1 0 1 1 0 8 0 sysvmsgpl 40 4 0 4 1 0 1 1 0 8 1 semapl 72 14 0 4 1 0 1 1 0 8 0 shmpl 112 15 0 3 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 2184 0 715 93 0 93 93 0 8 0 ffsino 296 2184 0 715 114 0 114 114 0 8 0 nchpl 144 2802 0 1092 64 0 64 64 0 8 0 rtmask 32 2 0 2 1 1 0 1 0 8 0 vnodes 216 2528 0 0 141 0 141 141 0 8 0 namei 1024 9510 0 9510 1 0 1 1 0 8 1 percpumem 16 78 0 29 1 0 1 1 0 8 0 pfiaddrpl 120 4 0 4 1 1 0 1 0 8 0 kstatmem 264 63 0 38 3 1 2 3 0 8 0 scsiplug 72 1 0 1 1 1 0 1 0 8 0 scxspl 216 9025 0 9025 10 2 8 8 1 8 8 plimitpl 152 100 0 88 1 0 1 1 0 8 0 sigapl 424 766 0 727 7 1 6 7 0 8 0 knotepl 120 500 0 0 16 0 16 16 0 8 0 kqueuepl 224 133 0 129 2 1 1 2 0 8 0 pipepl 344 146 0 119 3 0 3 3 0 8 0 fdescpl 528 749 0 728 3 0 3 3 0 8 0 filepl 160 4452 0 4275 20 7 13 17 0 8 2 lockfpl 104 402 0 401 3 1 2 2 0 8 1 lockfspl 48 103 0 102 1 0 1 1 0 8 0 sessionpl 144 42 0 38 1 0 1 1 0 8 0 pgrppl 48 58 0 46 1 0 1 1 0 8 0 ucredpl 104 862 0 855 1 0 1 1 0 8 0 zombiepl 144 832 0 830 1 0 1 1 0 8 0 processpl 1232 766 0 727 5 0 5 5 0 8 0 procpl 664 1295 0 1244 6 0 6 6 0 8 0 sosppl 176 1 0 1 1 1 0 1 0 8 0 sockpl 752 931 0 924 22 13 9 17 0 8 6 mcl64k 65536 6 0 0 1 0 1 1 0 8 0 mcl16k 16384 2 0 0 1 0 1 1 0 8 0 mcl9k128 9344 1 0 0 1 0 1 1 0 8 0 mcl8k 8192 3 0 0 1 0 1 1 0 8 0 mcl4k 4096 117 0 0 15 0 15 15 0 8 0 mcl2k2 2112 2 0 0 1 0 1 1 0 8 0 mcl2k 2048 24 0 0 3 0 3 3 0 8 0 mtagpl 96 4 0 0 1 0 1 1 0 8 0 mbufpl 256 209 0 0 14 0 14 14 0 8 0 bufpl 272 5481 0 107 359 0 359 359 0 8 0 anonpl 32 7563 0 0 61 0 61 61 0 246 0 amapchunkpl 152 18385 0 17677 31 3 28 28 0 158 0 amappl16 200 2903 0 2879 30 17 13 15 0 8 8 amappl15 192 4 0 4 1 1 0 1 0 8 0 amappl14 184 460 0 458 1 0 1 1 0 8 0 amappl13 176 137 0 135 1 0 1 1 0 8 0 amappl12 168 1035 0 1015 2 0 2 2 0 8 0 amappl11 160 7 0 7 2 2 0 1 0 8 0 amappl10 152 74 0 70 1 0 1 1 0 8 0 amappl9 144 287 0 287 1 1 0 1 0 8 0 amappl8 136 105 0 104 1 0 1 1 0 8 0 amappl7 128 157 0 152 1 0 1 1 0 8 0 amappl6 120 175 0 174 1 0 1 1 0 8 0 amappl5 112 105 0 102 1 0 1 1 0 8 0 amappl4 104 308 0 297 1 0 1 1 0 8 0 amappl3 96 3514 0 3416 4 0 4 4 0 8 0 amappl2 88 582 0 562 2 0 2 2 0 8 0 amappl1 80 12270 0 12107 18 2 16 16 0 8 3 amappl 88 5180 0 5032 5 0 5 5 0 92 0 uvmvnodes 80 110 0 0 3 0 3 3 0 8 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 254 0 254 2 2 0 1 0 8 0 dma64 64 6 0 6 1 1 0 1 0 8 0 dma32 32 9 0 9 2 2 0 1 0 8 0 dma16 16 18 0 17 1 0 1 1 0 8 0 aobjpl 72 17 0 3 1 0 1 1 0 8 0 uaddrrnd 24 749 0 727 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 749 0 727 1 0 1 1 0 8 0 vmmpekpl 168 8280 0 8244 3 0 3 3 0 8 0 vmmpepl 168 57342 0 56296 107 9 98 98 0 357 35 vmsppl 488 748 0 727 6 1 5 5 0 8 1 rwobjpl 80 19578 0 19040 30 4 26 27 0 8 2 pdppl 4096 1505 0 1454 107 54 53 85 0 8 2 pvpl 32 25958 0 0 210 0 210 210 0 265 0 pmappl 256 748 0 727 3 0 3 3 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 659 0 68 17 0 17 17 0 8 0 ddb{0}> machine ddbcpu 0 Invalid cpu 0 ddb{0}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff834bb28a) at panic+0x1e5 sys/kern/subr_prf.c:198 __assert(ffffffff834fb0be,ffffffff834ef37c,4b7,ffffffff83451122) at __assert+0x29 sys/kern/subr_prf.c:-1 uvm_pageunwire(fffff1000832b9e8) at uvm_pageunwire+0x17d sys/uvm/uvm_page.c:1206 uvm_fault_unwire_locked(fffff10064db43f8,243b256f000,243b296e000) at uvm_fault_unwire_locked+0x33a sys/uvm/uvm_fault.c:1790 uvm_unmap_kill_entry_withlock(fffff10064db43f8,fffff1006c2d5ee8,0) at uvm_unmap_kill_entry_withlock+0x81 sys/uvm/uvm_map.c:1866 uvm_map_teardown(fffff10064db43f8) at uvm_map_teardown+0x117 uvm_map_addr_RBT_LEFT sys/uvm/uvm_map.h:-1 [inline] uvm_map_teardown(fffff10064db43f8) at uvm_map_teardown+0x117 sys/uvm/uvm_map.c:2497 exit1(ffff8000fffe9a10,0,0,1) at exit1+0x6fc sys/kern/kern_exit.c:260 sys_exit(ffff8000fffe9a10,ffff80002a26e110,ffff80002a26e060) at sys_exit+0x1a sys/kern/kern_exit.c:-1 syscall(ffff80002a26e110) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80002a26e110) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x77c5b61b4890, count: -11 ddb{0}> machine ddbcpu 1 Stopped at x86_ipi_db+0x27: addq $0x8,%rsp x86_ipi_db(ffff80002999dff0) at x86_ipi_db+0x27 sys/arch/amd64/amd64/db_interface.c:394 x86_ipi_handler() at x86_ipi_handler+0xd9 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x27 end of kernel end trace frame: 0x76c96a5a3f20, count: 12 ddb{1}> trace x86_ipi_db(ffff80002999dff0) at x86_ipi_db+0x27 sys/arch/amd64/amd64/db_interface.c:394 x86_ipi_handler() at x86_ipi_handler+0xd9 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x27 end of kernel end trace frame: 0x76c96a5a3f20, count: -3 ddb{1}>