panic: vpanic: kernel diagnostic assertion "!_kernel_lock_held()" failed: file "/syzkaller/managers/multicore/kernel/sys/kern/kern_fork.c", line 675 Stopped at db_enter+0x1c: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *350732 79554 0 0 0x4000000 1 syz-executor.3 103967 81540 0 0x2 0 0 syz-executor.5 db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82795bcf) at panic+0x17b sys/kern/subr_prf.c:198 __assert(ffffffff82813c48,ffffffff827f5892,2a3,ffffffff827caa59) at __assert+0x29 sys/kern/subr_prf.c:157 proc_trampoline_mp() at proc_trampoline_mp+0x135 end trace frame: 0x0, count: 11 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{1}> ddb{1}> set $lines = 0 ddb{1}> set $maxwidth = 0 ddb{1}> show panic *cpu0: vop_generic_badop cpu1: kernel diagnostic assertion "!_kernel_lock_held()" failed: file "/syzkaller/managers/multicore/kernel/sys/kern/kern_fork.c", line 675 ddb{1}> trace db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82795bcf) at panic+0x17b sys/kern/subr_prf.c:198 __assert(ffffffff82813c48,ffffffff827f5892,2a3,ffffffff827caa59) at __assert+0x29 sys/kern/subr_prf.c:157 proc_trampoline_mp() at proc_trampoline_mp+0x135 end trace frame: 0x0, count: -4 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff80002b07d600 rbx 0xffff800020d59b8f rdx 0 rcx 0 rax 0xffff8000212b3340 r8 0x101010101010101 r9 0x8080808080808080 r10 0x91fcd7a9d0156e3f r11 0xc5d2aefb5a0ae2a3 r12 0xffff800020d59990 r13 0 r14 0xffffffff82beb990 cpu_info_full_primary+0x2990 r15 0x1 rip 0xffffffff81e245cc db_enter+0x1c cs 0x8 rflags 0x246 rsp 0xffff80002b07d5f0 ss 0x10 db_enter+0x1c: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.3) pid=350732 stat=onproc flags process=0 proc=4000000 pri=75, usrpri=75, nice=20 forw=0xffffffffffffffff, list=0xffff8000212b3b68,0xffffffff82d3c728 process=0xffff800021293258 user=0xffff80002b078000, vmspace=0xfffffd807effa570 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 79554 306672 28901 0 2 0 syz-executor.3 *79554 350732 28901 0 7 0x4000000 syz-executor.3 25586 441681 85279 0 2 0 syz-executor.2 25586 105134 85279 0 3 0x4000080 fsleep syz-executor.2 20186 226688 99176 0 2 0 syz-executor.6 20186 440808 99176 0 3 0x4000080 pipewr syz-executor.6 54977 136341 57292 0 2 0 syz-executor.4 54977 515363 57292 0 3 0x4000080 pppxread syz-executor.4 93517 92340 0 0 3 0x14200 acct acct 57292 2420 45677 0 3 0x82 nanoslp syz-executor.4 94070 322316 1 0 3 0x100083 ttyin getty 35832 356900 45677 0 3 0x82 nanoslp syz-executor.7 61374 11952 45677 0 2 0x2 syz-executor.0 99176 275305 45677 0 3 0x82 nanoslp syz-executor.6 18337 379965 0 0 3 0x14280 nfsidl nfsio 71866 455313 0 0 3 0x14280 nfsidl nfsio 96347 163229 0 0 3 0x14280 nfsidl nfsio 80601 134359 0 0 3 0x14280 nfsidl nfsio 60856 152255 0 0 3 0x14280 nfsidl nfsio 73469 272890 0 0 3 0x14280 nfsidl nfsio 20904 109455 0 0 3 0x14280 nfsidl nfsio 66353 181838 0 0 3 0x14280 nfsidl nfsio 34548 133440 0 0 3 0x14280 nfsidl nfsio 51715 251625 0 0 3 0x14280 nfsidl nfsio 42978 420795 0 0 3 0x14280 nfsidl nfsio 10135 534 0 0 3 0x14280 nfsidl nfsio 36997 517634 0 0 3 0x14280 nfsidl nfsio 41558 187260 0 0 3 0x14280 nfsidl nfsio 14161 474003 0 0 3 0x14280 nfsidl nfsio 91038 414973 0 0 3 0x14280 nfsidl nfsio 99050 82014 0 0 3 0x14280 nfsidl nfsio 62516 37412 0 0 3 0x14280 nfsidl nfsio 62542 225201 0 0 3 0x14280 nfsidl nfsio 78209 319536 0 0 3 0x14280 nfsidl nfsio 90305 241790 0 0 3 0x14200 bored sosplice 81540 103967 45677 0 7 0x2 syz-executor.5 85279 183378 45677 0 3 0x82 nanoslp syz-executor.2 18259 406644 45677 0 3 0x2 biowait syz-executor.1 28901 16952 45677 0 3 0x82 nanoslp syz-executor.3 45677 202732 69961 0 3 0x82 wait syz-fuzzer 45677 111762 69961 0 3 0x4000082 nanoslp syz-fuzzer 45677 435938 69961 0 2 0x4000002 syz-fuzzer 45677 379632 69961 0 3 0x4000082 thrsleep syz-fuzzer 45677 416925 69961 0 3 0x4000082 wait syz-fuzzer 45677 487414 69961 0 3 0x4000082 wait syz-fuzzer 45677 59489 69961 0 3 0x4000082 wait syz-fuzzer 45677 472138 69961 0 3 0x4000082 wait syz-fuzzer 45677 94951 69961 0 3 0x4000082 thrsleep syz-fuzzer 45677 299237 69961 0 3 0x4000082 thrsleep syz-fuzzer 45677 405301 69961 0 3 0x4000082 thrsleep syz-fuzzer 45677 510127 69961 0 3 0x4000082 wait syz-fuzzer 45677 385140 69961 0 3 0x4000082 wait syz-fuzzer 45677 498062 69961 0 3 0x4000082 thrsleep syz-fuzzer 45677 501230 69961 0 3 0x4000082 thrsleep syz-fuzzer 45677 281157 69961 0 2 0x4000082 syz-fuzzer 45677 442971 69961 0 3 0x4000082 wait syz-fuzzer 69961 439775 77691 0 3 0x10008a sigsusp ksh 77691 62005 69423 0 2 0x9a sshd 69423 42889 1 0 3 0x88 kqread sshd 97907 393643 56742 74 3 0x1100092 bpf pflogd 56742 168093 1 0 3 0x80 netio pflogd 13358 165280 93997 73 3 0x1100090 kqread syslogd 93997 42163 1 0 3 0x100082 netio syslogd 45164 234506 1 0 3 0x100080 kqread resolvd 85694 333417 38565 77 3 0x100092 kqread dhcpleased 46256 269982 38565 77 3 0x100092 kqread dhcpleased 38565 334538 1 0 3 0x80 kqread dhcpleased 1223 512103 0 0 3 0x14200 bored smr 79387 91373 0 0 2 0x14200 zerothread 56328 119356 0 0 3 0x14200 aiodoned aiodoned 702 417113 0 0 3 0x14200 syncer update 49390 448192 0 0 3 0x14200 cleaner cleaner 36168 114496 0 0 3 0x14200 reaper reaper 35828 209321 0 0 3 0x14200 pgdaemon pagedaemon 45219 501190 0 0 3 0x14200 bored viomb 63276 85398 0 0 3 0x40014200 acpi0 acpi0 18560 440705 0 0 3 0x40014200 idle1 41847 251078 0 0 3 0x14200 bored softnet3 6885 189648 0 0 3 0x14200 bored softnet2 50580 309558 0 0 3 0x14200 bored softnet1 28228 405873 0 0 3 0x14200 bored softnet0 58395 254959 0 0 3 0x14200 bored systqmp 88031 457869 0 0 3 0x14200 bored systq 65635 170625 0 0 3 0x40014200 bored softclock 72758 209033 0 0 3 0x40014200 idle0 1 173645 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10205 6491K 6886K 78643K 15374 0 pcb 13 14K 16K 78643K 631 0 rtable 163 14K 17K 78643K 1507 0 pf 37 10K 65674K 78643K 7383 0 ifaddr 38 14K 17K 78643K 188 0 ifgroup 60 2K 3K 78643K 317 0 sysctl 2 0K 0K 78643K 2 0 counters 62 35K 36K 78643K 276 0 ioctlops 0 0K 4K 78643K 1762 0 iov 0 0K 24K 78643K 1260 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 4 0 vnodes 1434 90K 90K 78643K 3864 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 9K 78643K 98 0 VM map 2 1K 1K 78643K 2 0 sem 12 1K 1K 78643K 63 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12548 0 file desc 14 49K 85K 78643K 3543 0 sigio 0 0K 0K 78643K 7 0 proc 72 91K 115K 78643K 979 0 subproc 104 6K 6K 78643K 221 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 89 0 in_multi 64 4K 7K 78643K 279 0 ether_multi 1 0K 0K 78643K 11 0 mrt 0 0K 0K 78643K 26 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 121 546K 546K 78643K 121 0 exec 0 0K 1K 78643K 817 0 tdb 3 0K 0K 78643K 3 0 pagedep 1 8K 8K 78643K 1 0 inodedep 1 32K 32K 78643K 1 0 newblk 1 0K 0K 78643K 1 0 VM swap 8 62K 64K 78643K 10 0 UVM amap 364 90K 101K 78643K 36975 0 UVM aobj 131 4K 4K 78643K 134 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 113 0 NDP 13 0K 1K 78643K 124 0 temp 74 5864K 5999K 78643K 31356 0 kqueue 12 18K 28K 78643K 243 0 SYN cache 2 16K 16K 78643K 2 0 ddb{1}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle plcache 128 22 0 0 1 0 1 1 0 8 0 rtpcb 120 809 0 806 6 5 1 3 0 8 0 rtentry 112 306 0 238 4 0 4 4 0 8 0 unpcb 144 2735 0 2716 42 36 6 11 0 8 5 syncache 296 13 0 13 4 4 0 1 0 8 0 tcpqe 32 344 0 344 4 4 0 1 0 8 0 tcpcb 776 871 0 867 34 33 1 8 0 8 0 arp 120 46 0 34 1 0 1 1 0 8 0 inpcb 368 5514 0 5504 64 62 2 16 0 8 0 nd6 136 60 0 43 1 0 1 1 0 8 0 kcovpl 48 17 0 9 1 0 1 1 0 8 0 mppekey 1024 4 0 4 1 1 0 1 0 8 0 ppxss 1256 62 0 60 6 5 1 1 0 8 0 pppxif 1456 34 0 32 6 5 1 1 0 8 0 pfstscr 40 4 0 4 1 1 0 1 0 8 0 pffrag 232 2 0 2 1 1 0 1 0 482 0 pffrnode 88 2 0 2 1 1 0 1 0 8 0 pffrent 40 121 0 121 5 5 0 1 0 8 0 pfosfp 40 1431 0 1007 5 0 5 5 0 8 0 pfosfpen 112 1431 0 716 21 0 21 21 0 8 0 pfanchor 1288 1061 7 549 45 2 43 43 0 8 0 pfstitem 24 41 0 35 1 0 1 1 0 8 0 pfstkey 128 43 0 39 1 0 1 1 0 8 0 pfstate 384 37 0 33 3 2 1 3 0 8 0 pfrule 1344 21 0 20 2 1 1 2 0 8 0 rttmr 136 9 0 9 3 3 0 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 1408 0 1076 40 14 26 31 0 8 0 art_table 32 1409 0 1076 5 1 4 5 0 8 0 art_node 16 295 0 237 1 0 1 1 0 8 0 semupl 112 6 0 6 2 2 0 1 0 8 0 semapl 112 56 0 46 1 0 1 1 0 8 0 shmpl 112 131 0 3 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 5899 0 4427 93 0 93 93 0 8 0 ffsino 272 5899 0 4427 99 0 99 99 0 8 0 nchpl 144 10743 0 9086 63 0 63 63 0 8 0 uvmvnodes 80 5926 0 0 121 0 121 121 0 8 0 vnodes 216 5926 0 0 330 0 330 330 0 8 0 namei 1024 41324 0 41323 3 2 1 2 0 8 0 percpumem 16 151 0 107 1 0 1 1 0 8 0 kstatmem 264 168 0 142 5 2 3 3 0 8 0 scsiplug 72 6 0 6 2 2 0 1 0 8 0 scxspl 216 31586 0 31585 22 21 1 8 0 8 0 plimitpl 152 280 0 264 1 0 1 1 0 8 0 sigapl 424 3861 0 3794 9 1 8 8 0 8 0 futexpl 64 38592 0 38591 1 0 1 1 0 8 0 knotepl 120 435 0 0 10 0 10 10 0 8 0 kqueuepl 216 589 0 581 11 10 1 5 0 8 0 pipepl 320 499 0 470 9 6 3 6 0 8 0 fdescpl 496 3821 0 3794 5 1 4 5 0 8 0 filepl 152 28384 0 28136 60 45 15 20 0 8 4 lockfpl 104 889 0 887 2 1 1 2 0 8 0 lockfspl 48 220 0 218 1 0 1 1 0 8 0 sessionpl 144 34 0 17 1 0 1 1 0 8 0 pgrppl 48 52 0 34 1 0 1 1 0 8 0 ucredpl 104 4405 0 4391 1 0 1 1 0 8 0 zombiepl 144 3795 0 3794 1 0 1 1 0 8 0 processpl 1072 3861 0 3794 5 0 5 5 0 8 0 procpl 696 9973 0 9886 13 3 10 10 0 8 0 srpgc 96 14 0 14 4 4 0 1 0 8 0 sosppl 168 961 0 961 3 2 1 1 0 8 1 sockpl 488 9108 0 9078 216 196 20 37 0 8 15 mcl64k 65536 16 0 0 2 0 2 2 0 8 0 mcl16k 16384 9 0 0 2 0 2 2 0 8 0 mcl12k 12288 16 0 0 2 0 2 2 0 8 0 mcl9k 9216 13 0 0 1 0 1 1 0 8 0 mcl8k 8192 17 0 0 3 0 3 3 0 8 0 mcl4k 4096 17 0 0 3 0 3 3 0 8 0 mcl2k2 2112 4 0 0 1 0 1 1 0 8 0 mcl2k 2048 453 0 0 56 0 56 56 0 8 0 mtagpl 96 243 0 0 6 0 6 6 0 8 0 mbufpl 256 666 0 0 33 0 33 33 0 8 0 bufpl 288 9461 0 3141 452 0 452 452 0 8 0 anonpl 24 551825 0 534993 167 58 109 119 0 186 0 amapchunkpl 152 125480 0 124564 70 29 41 52 0 158 0 amappl16 200 13204 0 12691 81 54 27 37 0 8 0 amappl15 192 9 0 9 1 1 0 1 0 8 0 amappl14 184 215 0 198 2 1 1 2 0 8 0 amappl13 176 22 0 21 2 1 1 1 0 8 0 amappl12 168 4632 0 4602 2 0 2 2 0 8 0 amappl11 160 59 0 44 1 0 1 1 0 8 0 amappl10 152 40 0 30 2 1 1 1 0 8 0 amappl9 144 223 0 223 5 4 1 2 0 8 1 amappl8 136 306 0 227 3 0 3 3 0 8 0 amappl7 128 101 0 80 1 0 1 1 0 8 0 amappl6 120 365 0 345 2 1 1 2 0 8 0 amappl5 112 270 0 259 1 0 1 1 0 8 0 amappl4 104 789 0 744 4 2 2 4 0 8 0 amappl3 96 22790 0 22714 4 1 3 3 0 8 0 amappl2 88 4488 0 4422 3 1 2 3 0 8 0 amappl1 80 22516 0 21965 23 10 13 23 0 8 0 amappl 88 36248 0 36014 7 0 7 7 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 133 0 3 3 0 3 3 0 8 0 uaddrrnd 24 3821 0 3794 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 3821 0 3794 1 0 1 1 0 8 0 vmmpekpl 168 32827 0 32758 4 0 4 4 0 8 0 vmmpepl 168 250886 0 248468 211 100 111 144 0 357 0 vmsppl 464 3820 0 3794 5 1 4 5 0 8 0 rwobjpl 56 73347 0 65662 118 9 109 112 0 8 0 pdppl 4096 7650 0 7588 300 232 68 80 0 8 6 pvpl 32 1358978 0 1336418 379 186 193 366 0 265 0 pmappl 248 3820 0 3794 3 1 2 3 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 1164 0 318 25 0 25 25 0 8 0 ddb{1}> machine ddbcpu 0 Stopped at x86_ipi_db+0x1e: addq $0x8,%rsp x86_ipi_db(ffffffff82beaff0) at x86_ipi_db+0x1e sys/arch/amd64/amd64/db_interface.c:393 x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23 __mp_lock(ffffffff82d59e88) at __mp_lock+0x129 __mp_lock_spin sys/kern/kern_lock.c:116 [inline] __mp_lock(ffffffff82d59e88) at __mp_lock+0x129 sys/kern/kern_lock.c:147 intr_handler(ffff8000287d32f0,ffff80000006ba00) at intr_handler+0x62 sys/arch/amd64/amd64/intr.c:532 Xintr_ioapic_edge21_untramp() at Xintr_ioapic_edge21_untramp+0x18f Xspllower() at Xspllower+0x1d cnputc(76) at cnputc+0x4f sys/dev/cons.c:218 db_putchar(76) at db_putchar+0x3fc sys/ddb/db_output.c:155 kprintf() at kprintf+0x20fc sys/kern/subr_prf.c:1064 db_printf(ffffffff82818240) at db_printf+0x89 sys/kern/subr_prf.c:498 panic(ffffffff82788b37) at panic+0xdb sys/kern/subr_prf.c:216 vop_generic_badop(ffff8000287d3718) at vop_generic_badop+0x1f sys/kern/vfs_default.c:133 VOP_STRATEGY(fffffd807798e360,fffffd807732eb48) at VOP_STRATEGY+0x9f sys/kern/vfs_vops.c:628 end trace frame: 0xffff8000287d37c0, count: 0 ddb{0}> trace x86_ipi_db(ffffffff82beaff0) at x86_ipi_db+0x1e sys/arch/amd64/amd64/db_interface.c:393 x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23 __mp_lock(ffffffff82d59e88) at __mp_lock+0x129 __mp_lock_spin sys/kern/kern_lock.c:116 [inline] __mp_lock(ffffffff82d59e88) at __mp_lock+0x129 sys/kern/kern_lock.c:147 intr_handler(ffff8000287d32f0,ffff80000006ba00) at intr_handler+0x62 sys/arch/amd64/amd64/intr.c:532 Xintr_ioapic_edge21_untramp() at Xintr_ioapic_edge21_untramp+0x18f Xspllower() at Xspllower+0x1d cnputc(76) at cnputc+0x4f sys/dev/cons.c:218 db_putchar(76) at db_putchar+0x3fc sys/ddb/db_output.c:155 kprintf() at kprintf+0x20fc sys/kern/subr_prf.c:1064 db_printf(ffffffff82818240) at db_printf+0x89 sys/kern/subr_prf.c:498 panic(ffffffff82788b37) at panic+0xdb sys/kern/subr_prf.c:216 vop_generic_badop(ffff8000287d3718) at vop_generic_badop+0x1f sys/kern/vfs_default.c:133 VOP_STRATEGY(fffffd807798e360,fffffd807732eb48) at VOP_STRATEGY+0x9f sys/kern/vfs_vops.c:628 bwrite(fffffd807732eb48) at bwrite+0x1f4 sys/kern/vfs_bio.c:760 VOP_BWRITE(fffffd807732eb48) at VOP_BWRITE+0x4e sys/kern/vfs_vops.c:640 ufs_mkdir(ffff8000287d39b0) at ufs_mkdir+0x6c4 sys/ufs/ufs/ufs_vnops.c:1235 VOP_MKDIR(fffffd80677acdc0,ffff8000287d3b10,ffff8000287d3b40,ffff8000287d3a40) at VOP_MKDIR+0xc3 sys/kern/vfs_vops.c:388 domkdirat(ffff80002122f330,ffffff9c,71246840f2f0,1ff) at domkdirat+0x125 sys/kern/vfs_syscalls.c:3074 syscall(ffff8000287d3cc0) at syscall+0x5e2 mi_syscall sys/sys/syscall_mi.h:110 [inline] syscall(ffff8000287d3cc0) at syscall+0x5e2 sys/arch/amd64/amd64/trap.c:632 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x71246840f360, count: -21 ddb{0}> machine ddbcpu 1 Stopped at db_enter+0x1c: addq $0x8,%rsp db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82795bcf) at panic+0x17b sys/kern/subr_prf.c:198 __assert(ffffffff82813c48,ffffffff827f5892,2a3,ffffffff827caa59) at __assert+0x29 sys/kern/subr_prf.c:157 proc_trampoline_mp() at proc_trampoline_mp+0x135 end trace frame: 0x0, count: 11 ddb{1}> trace db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82795bcf) at panic+0x17b sys/kern/subr_prf.c:198 __assert(ffffffff82813c48,ffffffff827f5892,2a3,ffffffff827caa59) at __assert+0x29 sys/kern/subr_prf.c:157 proc_trampoline_mp() at proc_trampoline_mp+0x135 end trace frame: 0x0, count: -4