panic: malloc: out of space in kmem_map Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *280898 25651 0 0x2 0 0K syz-executor.1 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:399 panic() at panic+0x174 sys/kern/subr_prf.c:208 malloc(200000,2a,9) at malloc+0xad5 sys/kern/kern_malloc.c:242 kcovioctl(1b1300,80084b01,ffff800020c0b7f0,3,ffff800020b29c38) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff800020c0b7f0,3,ffff800020b29c38) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd8068e967d0,80084b01,ffff800020c0b7f0,3,fffffd807f7c6780,ffff800020b29c38) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8068cc2570,80084b01,ffff800020c0b7f0,ffff800020b29c38) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b29c38,ffff800020c0b930,ffff800020c0b920) at sys_ioctl+0x651 syscall(ffff800020c0b9d0) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c0b9d0) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,36,7f7fffff6f18,36,3,2a71a4f0890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffff6a30, count: 6 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 malloc: out of space in kmem_map ddb{0}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:399 panic() at panic+0x174 sys/kern/subr_prf.c:208 malloc(200000,2a,9) at malloc+0xad5 sys/kern/kern_malloc.c:242 kcovioctl(1b1300,80084b01,ffff800020c0b7f0,3,ffff800020b29c38) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff800020c0b7f0,3,ffff800020b29c38) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd8068e967d0,80084b01,ffff800020c0b7f0,3,fffffd807f7c6780,ffff800020b29c38) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8068cc2570,80084b01,ffff800020c0b7f0,ffff800020b29c38) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b29c38,ffff800020c0b930,ffff800020c0b920) at sys_ioctl+0x651 syscall(ffff800020c0b9d0) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c0b9d0) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,36,7f7fffff6f18,36,3,2a71a4f0890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffff6a30, count: -9 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff800020c0b420 rbx 0xffff800020c0b4d0 rdx 0xffffffff81f8be0b cy_pio_rec+0xbc9 rcx 0 rax 0 r8 0xffffffff81cff133 kprintf+0x183 r9 0x1 r10 0x25 r11 0xa7841b70a674fe2 r12 0x3000000008 r13 0xffff800020c0b430 r14 0x100 r15 0x1 rip 0xffffffff81896608 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c0b410 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.1) pid=280898 stat=onproc flags process=2 proc=0 pri=50, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff800020b29530,0xffffffff823613a0 process=0xffff800020b7c9f0 user=0xffff800020c06000, vmspace=0xfffffd807f00b708 estcpu=0, cpticks=2, pctcpu=0.0 user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND *25651 280898 86273 0 7 0x2 syz-executor.1 83473 338246 86273 0 3 0x82 piperd syz-executor.0 39762 397835 0 0 3 0x14200 bored sosplice 86273 500438 17952 0 3 0x82 thrsleep syz-fuzzer 86273 386101 17952 0 3 0x4000082 thrsleep syz-fuzzer 86273 427593 17952 0 3 0x4000082 thrsleep syz-fuzzer 86273 194137 17952 0 3 0x4000082 thrsleep syz-fuzzer 86273 271322 17952 0 3 0x4000082 thrsleep syz-fuzzer 86273 414844 17952 0 3 0x4000082 thrsleep syz-fuzzer 86273 218448 17952 0 3 0x4000082 thrsleep syz-fuzzer 86273 363478 17952 0 3 0x4000082 thrsleep syz-fuzzer 86273 367325 17952 0 3 0x4000082 thrsleep syz-fuzzer 86273 509672 17952 0 3 0x4000082 kqread syz-fuzzer 17952 27778 54977 0 3 0x10008a pause ksh 54977 414408 92843 0 3 0x92 select sshd 10039 251569 1 0 3 0x100083 ttyin getty 92843 193151 1 0 3 0x80 select sshd 38199 443207 49075 74 3 0x100092 bpf pflogd 49075 189429 1 0 3 0x80 netio pflogd 94168 15706 99520 73 3 0x100090 kqread syslogd 99520 147548 1 0 3 0x100082 netio syslogd 89774 342720 1 77 3 0x100090 poll dhclient 58591 169240 1 0 3 0x80 poll dhclient 83378 338333 0 0 3 0x14200 pgzero zerothread 72852 289887 0 0 3 0x14200 aiodoned aiodoned 71900 386786 0 0 3 0x14200 syncer update 57177 157435 0 0 3 0x14200 cleaner cleaner 71243 515822 0 0 3 0x14200 reaper reaper 52515 440286 0 0 3 0x14200 pgdaemon pagedaemon 46663 324573 0 0 3 0x14200 bored crynlk 58567 186067 0 0 3 0x14200 bored crypto 64743 47555 0 0 3 0x40014200 acpi0 acpi0 49017 518813 0 0 7 0x40014200 idle1 81869 355947 0 0 3 0x14200 bored softnet 28278 385576 0 0 3 0x14200 bored systqmp 90307 327563 0 0 3 0x14200 bored systq 1739 35035 0 0 3 0x40014200 bored softclock 46384 378542 0 0 3 0x40014200 idle0 38864 415473 0 0 3 0x14200 bored smr 1 450071 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 25651 (syz-executor.1) thread 0xffff800020b29c38 (280898) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff82373b28) locked @ /syzkaller/managers/multicore/kernel/sys/sys/syscall_mi.h:90 #0 witness_lock+0x594 sys/kern/subr_witness.c:1201 #1 syscall+0x48b mi_syscall sys/sys/syscall_mi.h:91 [inline] #1 syscall+0x48b sys/arch/amd64/amd64/trap.c:574 #2 Xsyscall+0x128 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9531 71963K 71971K 78643K 10888 0 0 pcb 25 9K 11K 78643K 481 0 0 rtable 82 3K 4K 78643K 480 0 0 ifaddr 57 13K 14K 78643K 166 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1481 0 0 iov 0 0K 12K 78643K 110 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1195 75K 76K 78643K 1759 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 2 1K 5K 78643K 16 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 1K 78643K 148 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 4 9K 25K 78643K 859 0 0 sigio 0 0K 0K 78643K 4 0 0 proc 54 51K 71K 78643K 579 0 0 subproc 53 55297K 67586K 78643K 259 0 0 NFS srvsock 1 0K 0K 78643K 1 0 0 NFS daemon 1 16K 16K 78643K 1 0 0 ip_moptions 0 0K 0K 78643K 121 0 0 in_multi 22 1K 2K 78643K 108 0 0 ether_multi 1 0K 0K 78643K 8 0 0 mrt 0 0K 0K 78643K 8 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 102 450K 450K 78643K 102 0 0 exec 0 0K 1K 78643K 281 0 0 pfkey data 0 0K 0K 78643K 2 0 0 pagedep 1 8K 8K 78643K 1 0 0 inodedep 1 32K 32K 78643K 1 0 0 newblk 1 0K 0K 78643K 1 0 0 VM swap 7 26K 26K 78643K 7 0 0 UVM amap 88 13K 30K 78643K 3622 0 0 UVM aobj 47 4K 4K 78643K 53 0 0 memdesc 1 4K 4K 78643K 1 0 0 crypto data 1 1K 1K 78643K 1 0 0 ip6_options 0 0K 0K 78643K 41 0 0 NDP 12 0K 0K 78643K 50 0 0 temp 164 2375K 2443K 78643K 5686 0 0 kqueue 0 0K 0K 78643K 8 0 0 SYN cache 2 16K 16K 78643K 2 0 0 ddb{0}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 9 0 6 1 0 1 1 0 8 0 inpcbpl 280 498 0 491 1 0 1 1 0 8 0 plimitpl 152 47 0 39 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 87 0 56 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 153 0 149 1 0 1 1 0 8 0 rttmr 72 1 0 1 1 1 0 1 0 8 0 nd6 48 14 0 12 1 0 1 1 0 8 0 ppxss 1128 16 0 16 5 4 1 1 0 8 1 pfosfp 40 846 0 423 5 0 5 5 0 8 0 pfosfpen 112 1428 0 714 21 0 21 21 0 8 0 pfstitem 24 25 0 17 1 0 1 1 0 8 0 pfstkey 112 25 0 17 1 0 1 1 0 8 0 pfstate 328 25 0 17 1 0 1 1 0 8 0 pfrule 1360 21 0 16 2 1 1 2 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 396 0 249 12 0 12 12 0 8 2 art_table 32 397 0 249 2 0 2 2 0 8 0 art_node 16 86 0 58 1 0 1 1 0 8 0 sysvmsgpl 40 15 0 4 1 0 1 1 0 8 0 semapl 112 144 0 134 1 0 1 1 0 8 0 shmpl 112 51 0 6 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 3011 0 1568 47 0 47 47 0 8 0 ffsino 272 3011 0 1568 97 0 97 97 0 8 0 nchpl 144 4476 0 2843 61 0 61 61 0 8 0 uvmvnodes 72 3208 0 0 59 0 59 59 0 8 0 vnodes 200 3208 0 0 169 0 169 169 0 8 0 namei 1024 13786 0 13786 4 3 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 3 0 3 3 2 1 1 0 8 1 scxspl 192 12105 0 12105 18 17 1 6 0 8 1 sigapl 432 1037 0 1023 3 1 2 3 0 8 0 futexpl 56 10453 0 10453 2 1 1 1 0 8 1 knotepl 112 393 0 364 5 3 2 2 0 8 1 kqueuepl 104 255 0 253 1 0 1 1 0 8 0 pipepl 112 808 0 789 5 3 2 2 0 8 1 fdescpl 488 1038 0 1023 3 0 3 3 0 8 0 filepl 152 6658 0 6565 9 3 6 7 0 8 2 lockfpl 104 280 0 280 3 2 1 1 0 8 1 lockfspl 32 311 0 311 3 2 1 1 0 8 1 sessionpl 112 23 0 13 1 0 1 1 0 8 0 pgrppl 48 33 0 23 1 0 1 1 0 8 0 ucredpl 96 1588 0 1579 1 0 1 1 0 8 0 zombiepl 144 1023 0 1023 2 1 1 1 0 8 1 processpl 840 1054 0 1023 4 0 4 4 0 8 0 procpl 600 2825 0 2785 4 0 4 4 0 8 0 srpgc 64 37 0 37 4 3 1 1 0 8 1 sosppl 128 14 0 14 4 3 1 1 0 8 1 sockpl 384 908 0 889 6 3 3 4 0 8 1 mcl64k 65536 11 0 0 2 0 2 2 0 8 0 mcl16k 16384 1 0 0 1 0 1 1 0 8 0 mcl12k 12288 5 0 0 1 0 1 1 0 8 0 mcl9k 9216 6 0 0 1 0 1 1 0 8 0 mcl8k 8192 5 0 0 1 0 1 1 0 8 0 mcl4k 4096 17 0 0 3 0 3 3 0 8 0 mcl2k2 2112 2 0 0 1 0 1 1 0 8 0 mcl2k 2048 126 0 0 15 0 15 15 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 202 0 0 8 0 8 8 0 8 0 bufpl 256 7073 0 1048 377 0 377 377 0 8 0 anonpl 16 112440 0 105415 66 22 44 53 0 125 4 amapchunkpl 152 5872 0 5779 14 5 9 9 0 158 4 amappl16 192 5000 0 4540 53 23 30 36 0 8 5 amappl15 184 125 0 124 1 0 1 1 0 8 0 amappl14 176 140 0 136 1 0 1 1 0 8 0 amappl13 168 40 0 37 1 0 1 1 0 8 0 amappl12 160 122 0 122 2 1 1 1 0 8 1 amappl11 152 355 0 342 1 0 1 1 0 8 0 amappl10 144 331 0 326 1 0 1 1 0 8 0 amappl9 136 773 0 768 1 0 1 1 0 8 0 amappl8 128 182 0 159 1 0 1 1 0 8 0 amappl7 120 45 0 36 1 0 1 1 0 8 0 amappl6 112 184 0 173 1 0 1 1 0 8 0 amappl5 104 257 0 243 1 0 1 1 0 8 0 amappl4 96 359 0 334 2 1 1 2 0 8 0 amappl3 88 559 0 552 1 0 1 1 0 8 0 amappl2 80 8621 0 8576 2 0 2 2 0 8 0 amappl1 72 31979 0 31554 24 14 10 19 0 8 0 amappl 72 3114 0 3080 1 0 1 1 0 75 0 dma4096 4096 1 0 1 1 1 0 1 0 8 0 dma256 256 6 0 6 1 1 0 1 0 8 0 dma64 64 259 0 259 1 1 0 1 0 8 0 dma32 32 7 0 7 1 1 0 1 0 8 0 dma16 16 17 0 17 1 1 0 1 0 8 0 aobjpl 64 52 0 6 1 0 1 1 0 8 0 uaddrrnd 24 1038 0 1023 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1038 0 1023 1 0 1 1 0 8 0 vmmpekpl 168 12725 0 12699 2 0 2 2 0 8 0 vmmpepl 168 118838 0 117480 112 31 81 81 0 357 10 vmsppl 360 1037 0 1023 2 0 2 2 0 8 0 pdppl 4096 2084 0 2046 6 0 6 6 0 8 0 pvpl 32 334115 0 323994 155 35 120 138 0 265 16 pmappl 224 1037 0 1023 2 1 1 2 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 535 0 6 16 0 16 16 0 8 0