panic: malloc: out of space in kmem_map Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *155552 88953 0 0x2 0 1K syz-executor.0 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x174 sys/kern/subr_prf.c:208 malloc(200000,2a,9) at malloc+0xad5 sys/kern/kern_malloc.c:242 kcovioctl(1a1300,80084b01,ffff800020c3d320,3,ffff800020b74720) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1a1300,80084b01,ffff800020c3d320,3,ffff800020b74720) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd80623b6a90,80084b01,ffff800020c3d320,3,fffffd807f7c67e0,ffff800020b74720) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd80677170b0,80084b01,ffff800020c3d320,ffff800020b74720) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b74720,ffff800020c3d460,ffff800020c3d450) at sys_ioctl+0x651 syscall(ffff800020c3d500) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c3d500) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,36,7f7fffffa2d8,36,3,c7685b5d7c8) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffff9df0, 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{1}> ddb{1}> set $lines = 0 ddb{1}> set $maxwidth = 0 ddb{1}> show panic malloc: out of space in kmem_map ddb{1}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x174 sys/kern/subr_prf.c:208 malloc(200000,2a,9) at malloc+0xad5 sys/kern/kern_malloc.c:242 kcovioctl(1a1300,80084b01,ffff800020c3d320,3,ffff800020b74720) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1a1300,80084b01,ffff800020c3d320,3,ffff800020b74720) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd80623b6a90,80084b01,ffff800020c3d320,3,fffffd807f7c67e0,ffff800020b74720) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd80677170b0,80084b01,ffff800020c3d320,ffff800020b74720) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b74720,ffff800020c3d460,ffff800020c3d450) at sys_ioctl+0x651 syscall(ffff800020c3d500) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c3d500) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,36,7f7fffffa2d8,36,3,c7685b5d7c8) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffff9df0, count: -9 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff800020c3cf50 rbx 0xffff800020c3d000 rdx 0xffffffff81f8c5e5 apollo_pio_rec+0x91c9 rcx 0 rax 0 r8 0xffffffff811c2a43 kprintf+0x183 r9 0x1 r10 0x25 r11 0x9ebdbae62f88b5b4 r12 0x3000000008 r13 0xffff800020c3cf60 r14 0x100 r15 0x1 rip 0xffffffff813c20e8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c3cf40 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.0) pid=155552 stat=onproc flags process=2 proc=0 pri=51, usrpri=51, nice=20 forw=0xffffffffffffffff, list=0xffff800020b759e0,0xffffffff82367ba0 process=0xffff800020b8c360 user=0xffff800020c38000, vmspace=0xfffffd807f00c2d0 estcpu=1, cpticks=3, pctcpu=0.0 user=0, sys=2, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND *88953 155552 5006 0 7 0x2 syz-executor.0 47448 24800 5006 0 3 0x82 piperd syz-executor.1 44184 170112 0 0 3 0x14200 bored sosplice 5006 461276 29891 0 3 0x82 thrsleep syz-fuzzer 5006 348224 29891 0 3 0x4000082 nanosleep syz-fuzzer 5006 239816 29891 0 3 0x4000082 thrsleep syz-fuzzer 5006 487469 29891 0 3 0x4000082 thrsleep syz-fuzzer 5006 115719 29891 0 3 0x4000082 thrsleep syz-fuzzer 5006 522120 29891 0 3 0x4000082 thrsleep syz-fuzzer 5006 350903 29891 0 3 0x4000082 thrsleep syz-fuzzer 5006 205041 29891 0 3 0x4000082 kqread syz-fuzzer 5006 136166 29891 0 3 0x4000082 thrsleep syz-fuzzer 5006 231948 29891 0 3 0x4000082 thrsleep syz-fuzzer 29891 372244 83160 0 3 0x10008a pause ksh 83160 297020 99119 0 3 0x92 select sshd 55817 47096 1 0 3 0x100083 ttyin getty 99119 445008 1 0 3 0x80 select sshd 92997 181646 15132 74 3 0x100092 bpf pflogd 15132 209778 1 0 3 0x80 netio pflogd 15753 510184 96851 73 3 0x100090 kqread syslogd 96851 276631 1 0 3 0x100082 netio syslogd 4965 80450 1 77 3 0x100090 poll dhclient 44701 129411 1 0 3 0x80 poll dhclient 67367 362220 0 0 3 0x14200 pgzero zerothread 81664 279684 0 0 3 0x14200 aiodoned aiodoned 69238 477540 0 0 3 0x14200 syncer update 29835 260613 0 0 3 0x14200 cleaner cleaner 85635 112338 0 0 3 0x14200 reaper reaper 88250 210758 0 0 3 0x14200 pgdaemon pagedaemon 50702 27595 0 0 3 0x14200 bored crynlk 25686 138583 0 0 3 0x14200 bored crypto 25265 318502 0 0 3 0x40014200 acpi0 acpi0 44212 70122 0 0 3 0x40014200 idle1 20382 499258 0 0 3 0x14200 bored softnet 86141 195043 0 0 3 0x14200 bored systqmp 20832 67334 0 0 3 0x14200 bored systq 13748 316025 0 0 3 0x40014200 bored softclock 83039 442187 0 0 7 0x40014200 idle0 41619 237964 0 0 3 0x14200 bored smr 1 303562 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 88953 (syz-executor.0) thread 0xffff800020b74720 (155552) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff82396898) 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{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9463 71926K 71934K 78643K 10581 0 0 pcb 25 9K 10K 78643K 99 0 0 rtable 82 3K 4K 78643K 225 0 0 ifaddr 34 9K 10K 78643K 53 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1470 0 0 iov 0 0K 16K 78643K 2 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1200 75K 75K 78643K 1263 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 3 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 6 0K 0K 78643K 6 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 4 9K 21K 78643K 85 0 0 sigio 0 0K 0K 78643K 2 0 0 proc 52 50K 71K 78643K 357 0 0 subproc 51 53249K 67586K 78643K 121 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 5 0 0 in_multi 22 1K 2K 78643K 49 0 0 ether_multi 1 0K 0K 78643K 2 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 54 238K 238K 78643K 54 0 0 exec 0 0K 1K 78643K 200 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 76 12K 21K 78643K 1096 0 0 UVM aobj 3 2K 2K 78643K 3 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 6 0 0 NDP 7 0K 0K 78643K 14 0 0 temp 79 2365K 2431K 78643K 3430 0 0 kqueue 0 0K 0K 78643K 1 0 0 SYN cache 2 16K 16K 78643K 2 0 0 ddb{1}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 5 0 2 1 0 1 1 0 8 0 inpcbpl 280 71 0 64 1 0 1 1 0 8 0 plimitpl 152 19 0 11 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 50 0 19 2 0 2 2 0 8 1 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 22 0 18 1 0 1 1 0 8 0 nd6 48 6 0 4 1 0 1 1 0 8 0 ppxss 1128 1 0 1 1 0 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 13 0 2 1 0 1 1 0 8 0 pfstkey 112 13 0 2 1 0 1 1 0 8 0 pfstate 328 13 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 233 0 89 12 0 12 12 0 8 3 art_table 32 234 0 89 2 0 2 2 0 8 0 art_node 16 49 0 21 1 0 1 1 0 8 0 sysvmsgpl 40 4 0 0 1 0 1 1 0 8 0 semapl 112 4 0 0 1 0 1 1 0 8 0 shmpl 112 1 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1544 0 123 46 0 46 46 0 8 0 ffsino 272 1544 0 123 95 0 95 95 0 8 0 nchpl 144 1862 0 227 61 0 61 61 0 8 0 uvmvnodes 72 1618 0 0 30 0 30 30 0 8 0 vnodes 200 1618 0 0 86 0 86 86 0 8 0 namei 1024 5183 0 5183 2 1 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 4538 0 4538 7 5 2 6 0 8 2 sigapl 432 278 0 264 2 0 2 2 0 8 0 futexpl 56 757 0 757 1 0 1 1 0 8 1 knotepl 112 115 0 94 1 0 1 1 0 8 0 kqueuepl 104 20 0 18 1 0 1 1 0 8 0 pipepl 112 190 0 171 2 1 1 1 0 8 0 fdescpl 488 279 0 264 3 0 3 3 0 8 0 filepl 152 1500 0 1408 5 0 5 5 0 8 1 lockfpl 104 16 0 16 2 1 1 1 0 8 1 lockfspl 32 6 0 6 2 1 1 1 0 8 1 sessionpl 112 19 0 9 1 0 1 1 0 8 0 pgrppl 48 19 0 9 1 0 1 1 0 8 0 ucredpl 96 156 0 147 1 0 1 1 0 8 0 zombiepl 144 264 0 264 2 1 1 1 0 8 1 processpl 840 295 0 264 4 0 4 4 0 8 0 procpl 600 431 0 391 4 0 4 4 0 8 0 srpgc 64 10 0 10 1 0 1 1 0 8 1 sockpl 384 139 0 120 3 0 3 3 0 8 1 mcl64k 65536 1 0 0 1 0 1 1 0 8 0 mcl4k 4096 4 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 145 0 0 9 0 9 9 0 8 1 bufpl 256 5714 0 1143 286 0 286 286 0 8 0 anonpl 16 36664 0 29392 45 2 43 43 0 125 8 amapchunkpl 152 1326 0 1243 9 0 9 9 0 158 5 amappl16 192 805 0 375 24 0 24 24 0 8 1 amappl15 184 57 0 53 1 0 1 1 0 8 0 amappl14 176 31 0 27 2 1 1 1 0 8 0 amappl13 168 26 0 23 1 0 1 1 0 8 0 amappl12 160 19 0 17 1 0 1 1 0 8 0 amappl11 152 20 0 5 1 0 1 1 0 8 0 amappl10 144 124 0 121 1 0 1 1 0 8 0 amappl9 136 586 0 583 1 0 1 1 0 8 0 amappl8 128 137 0 123 1 0 1 1 0 8 0 amappl7 120 56 0 51 1 0 1 1 0 8 0 amappl6 112 61 0 54 1 0 1 1 0 8 0 amappl5 104 115 0 101 1 0 1 1 0 8 0 amappl4 96 510 0 481 2 1 1 2 0 8 0 amappl3 88 118 0 110 1 0 1 1 0 8 0 amappl2 80 1236 0 1191 2 0 2 2 0 8 1 amappl1 72 15868 0 15448 25 14 11 20 0 8 1 amappl 72 675 0 643 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 2 0 0 1 0 1 1 0 8 0 uaddrrnd 24 279 0 264 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 279 0 264 1 0 1 1 0 8 0 vmmpekpl 168 6339 0 6316 2 0 2 2 0 8 0 vmmpepl 168 37815 0 36497 88 10 78 78 0 357 16 vmsppl 360 278 0 264 2 0 2 2 0 8 0 pdppl 4096 566 0 528 6 0 6 6 0 8 0 pvpl 32 136801 0 126392 123 7 116 116 0 265 19 pmappl 224 278 0 264 2 0 2 2 0 8 1 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 436 0 4 13 0 13 13 0 8 0