panic: malloc: out of space in kmem_map Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *354094 17557 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,ffff800020c2dbf0,3,ffff800020b05c28) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff800020c2dbf0,3,ffff800020b05c28) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd80629316f8,80084b01,ffff800020c2dbf0,3,fffffd807f7c6960,ffff800020b05c28) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8068c77310,80084b01,ffff800020c2dbf0,ffff800020b05c28) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b05c28,ffff800020c2dd30,ffff800020c2dd20) at sys_ioctl+0x651 syscall(ffff800020c2ddd0) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c2ddd0) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,36,7f7fffff74f8,36,3,8eae31e1890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffff7010, 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,ffff800020c2dbf0,3,ffff800020b05c28) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff800020c2dbf0,3,ffff800020b05c28) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd80629316f8,80084b01,ffff800020c2dbf0,3,fffffd807f7c6960,ffff800020b05c28) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8068c77310,80084b01,ffff800020c2dbf0,ffff800020b05c28) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b05c28,ffff800020c2dd30,ffff800020c2dd20) at sys_ioctl+0x651 syscall(ffff800020c2ddd0) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c2ddd0) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,36,7f7fffff74f8,36,3,8eae31e1890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffff7010, count: -9 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff800020c2d820 rbx 0xffff800020c2d8d0 rdx 0xffffffff81f89682 apollo_pio_rec+0x9060 rcx 0 rax 0 r8 0xffffffff8182bbb3 kprintf+0x183 r9 0x1 r10 0x25 r11 0xed730f75fdfff305 r12 0x3000000008 r13 0xffff800020c2d830 r14 0x100 r15 0x1 rip 0xffffffff81c8ebf8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c2d810 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.1) pid=354094 stat=onproc flags process=2 proc=0 pri=52, usrpri=52, nice=20 forw=0xffffffffffffffff, list=0xffff800020b04bc0,0xffffffff823ddcc0 process=0xffff800020b7c018 user=0xffff800020c28000, vmspace=0xfffffd807f00b870 estcpu=2, cpticks=3, pctcpu=0.0 user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND *17557 354094 71714 0 7 0x2 syz-executor.1 78582 256167 71714 0 3 0x82 piperd syz-executor.0 71714 450367 26141 0 3 0x82 thrsleep syz-fuzzer 71714 511748 26141 0 3 0x4000082 nanosleep syz-fuzzer 71714 243809 26141 0 3 0x4000082 thrsleep syz-fuzzer 71714 454283 26141 0 3 0x4000082 kqread syz-fuzzer 71714 419693 26141 0 3 0x4000082 thrsleep syz-fuzzer 71714 470682 26141 0 3 0x4000082 thrsleep syz-fuzzer 71714 58855 26141 0 3 0x4000082 thrsleep syz-fuzzer 71714 236221 26141 0 3 0x4000082 thrsleep syz-fuzzer 71714 272153 26141 0 3 0x4000082 thrsleep syz-fuzzer 71714 433720 26141 0 3 0x4000082 thrsleep syz-fuzzer 26141 29059 92894 0 3 0x10008a pause ksh 92894 292411 87470 0 3 0x92 select sshd 37501 70706 1 0 3 0x100083 ttyin getty 87470 152078 1 0 3 0x80 select sshd 54728 220511 98512 74 3 0x100092 bpf pflogd 98512 142244 1 0 3 0x80 netio pflogd 53682 287393 99839 73 3 0x100090 kqread syslogd 99839 388516 1 0 3 0x100082 netio syslogd 82648 444283 1 77 3 0x100090 poll dhclient 17374 1171 1 0 3 0x80 poll dhclient 35513 53081 0 0 3 0x14200 pgzero zerothread 53988 251651 0 0 3 0x14200 aiodoned aiodoned 73919 25756 0 0 3 0x14200 syncer update 12196 350775 0 0 3 0x14200 cleaner cleaner 18872 343072 0 0 3 0x14200 reaper reaper 22905 3794 0 0 3 0x14200 pgdaemon pagedaemon 56262 1399 0 0 3 0x14200 bored crynlk 5781 236316 0 0 3 0x14200 bored crypto 22638 438505 0 0 3 0x40014200 acpi0 acpi0 31180 422206 0 0 7 0x40014200 idle1 34571 64196 0 0 3 0x14200 bored softnet 19653 257931 0 0 3 0x14200 bored systqmp 25070 356920 0 0 3 0x14200 bored systq 62636 503701 0 0 2 0x40014200 softclock 69623 383781 0 0 3 0x40014200 idle0 8594 487903 0 0 3 0x14200 bored smr 1 263274 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 17557 (syz-executor.1) thread 0xffff800020b05c28 (354094) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff823d1188) 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 9489 71942K 71950K 78643K 10636 0 0 pcb 25 9K 10K 78643K 168 0 0 rtable 82 3K 4K 78643K 203 0 0 ifaddr 43 10K 11K 78643K 55 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1473 0 0 iov 0 0K 12K 78643K 19 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1203 75K 75K 78643K 1299 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 6 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 37 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 4 9K 21K 78643K 190 0 0 proc 54 51K 71K 78643K 341 0 0 subproc 53 55297K 67586K 78643K 89 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 27 0 0 in_multi 22 1K 2K 78643K 51 0 0 ether_multi 1 0K 0K 78643K 1 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 66 291K 291K 78643K 66 0 0 exec 0 0K 1K 78643K 197 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 80 12K 29K 78643K 1466 0 0 UVM aobj 13 2K 2K 78643K 13 0 0 memdesc 1 4K 4K 78643K 1 0 0 crypto data 1 1K 1K 78643K 1 0 0 ip6_options 0 0K 1K 78643K 12 0 0 NDP 8 0K 0K 78643K 14 0 0 temp 110 2368K 2435K 78643K 3559 0 0 kqueue 0 0K 0K 78643K 2 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 4 0 1 1 0 1 1 0 8 0 inpcbpl 280 127 0 120 2 1 1 2 0 8 0 plimitpl 152 23 0 15 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 41 0 10 2 0 2 2 0 8 1 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 49 0 45 1 0 1 1 0 8 0 nd6 48 4 0 2 1 0 1 1 0 8 0 ppxss 1128 1 0 1 1 1 0 1 0 8 0 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 12 0 2 1 0 1 1 0 8 0 pfstkey 112 12 0 2 1 0 1 1 0 8 0 pfstate 328 12 0 2 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 186 0 41 12 0 12 12 0 8 2 art_table 32 187 0 41 2 0 2 2 0 8 0 art_node 16 40 0 12 1 0 1 1 0 8 0 sysvmsgpl 40 6 0 2 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 35 0 25 1 0 1 1 0 8 0 shmpl 112 11 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1741 0 324 46 0 46 46 0 8 0 ffsino 272 1741 0 324 95 0 95 95 0 8 0 nchpl 144 2220 0 590 61 0 61 61 0 8 0 uvmvnodes 72 1812 0 0 33 0 33 33 0 8 0 vnodes 200 1812 0 0 96 0 96 96 0 8 0 namei 1024 6042 0 6042 2 1 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 1 0 1 1 1 0 1 0 8 0 scxspl 192 5600 0 5600 8 7 1 5 0 8 1 sigapl 432 383 0 369 2 0 2 2 0 8 0 futexpl 56 2045 0 2045 1 0 1 1 0 8 1 knotepl 112 127 0 98 2 1 1 2 0 8 0 kqueuepl 104 61 0 59 1 0 1 1 0 8 0 pipepl 112 286 0 267 2 1 1 1 0 8 0 fdescpl 488 384 0 369 3 0 3 3 0 8 0 filepl 152 2195 0 2102 5 0 5 5 0 8 1 lockfpl 104 46 0 46 2 1 1 1 0 8 1 lockfspl 32 95 0 95 2 1 1 1 0 8 1 sessionpl 112 18 0 8 1 0 1 1 0 8 0 pgrppl 48 19 0 9 1 0 1 1 0 8 0 ucredpl 96 353 0 344 1 0 1 1 0 8 0 zombiepl 144 369 0 369 2 1 1 1 0 8 1 processpl 840 399 0 369 4 0 4 4 0 8 0 procpl 600 803 0 764 4 0 4 4 0 8 1 srpgc 64 6 0 6 1 0 1 1 0 8 1 sockpl 384 259 0 240 4 1 3 4 0 8 1 mcl64k 65536 4 0 0 1 0 1 1 0 8 0 mcl12k 12288 5 0 0 1 0 1 1 0 8 0 mcl9k 9216 1 0 0 1 0 1 1 0 8 0 mcl8k 8192 3 0 0 1 0 1 1 0 8 0 mcl4k 4096 5 0 0 1 0 1 1 0 8 0 mcl2k2 2112 1 0 0 1 0 1 1 0 8 0 mcl2k 2048 123 0 0 15 0 15 15 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 141 0 0 8 0 8 8 0 8 0 bufpl 256 5705 0 1044 292 0 292 292 0 8 0 anonpl 16 49020 0 41898 54 3 51 51 0 125 15 amapchunkpl 152 2013 0 1929 9 2 7 9 0 158 2 amappl16 192 1521 0 1073 34 2 32 34 0 8 8 amappl15 184 1 0 0 1 0 1 1 0 8 0 amappl14 176 117 0 112 1 0 1 1 0 8 0 amappl13 168 26 0 23 1 0 1 1 0 8 0 amappl12 160 9 0 8 1 0 1 1 0 8 0 amappl11 152 213 0 200 1 0 1 1 0 8 0 amappl10 144 154 0 149 1 0 1 1 0 8 0 amappl9 136 371 0 368 1 0 1 1 0 8 0 amappl8 128 135 0 119 1 0 1 1 0 8 0 amappl7 120 28 0 23 1 0 1 1 0 8 0 amappl6 112 146 0 137 1 0 1 1 0 8 0 amappl5 104 111 0 97 1 0 1 1 0 8 0 amappl4 96 396 0 369 2 1 1 2 0 8 0 amappl3 88 134 0 127 1 0 1 1 0 8 0 amappl2 80 2394 0 2350 2 0 2 2 0 8 0 amappl1 72 17857 0 17436 24 14 10 19 0 8 0 amappl 72 1045 0 1013 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 12 0 0 1 0 1 1 0 8 0 uaddrrnd 24 384 0 369 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 384 0 369 1 0 1 1 0 8 0 vmmpekpl 168 7258 0 7237 2 0 2 2 0 8 0 vmmpepl 168 48173 0 46838 99 20 79 80 0 357 14 vmsppl 360 383 0 369 2 0 2 2 0 8 0 pdppl 4096 776 0 738 6 0 6 6 0 8 0 pvpl 32 163534 0 153348 138 6 132 132 0 265 34 pmappl 224 383 0 369 2 1 1 2 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 442 0 4 13 0 13 13 0 8 0