panic: malloc: out of space in kmem_map Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND * 72744 19801 0 0x2 0 0K syz-executor.0 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,ffff800020c08fe0,3,ffff800020b28018) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff800020c08fe0,3,ffff800020b28018) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd8066978460,80084b01,ffff800020c08fe0,3,fffffd807f7c6840,ffff800020b28018) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd806758b1e8,80084b01,ffff800020c08fe0,ffff800020b28018) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b28018,ffff800020c09120,ffff800020c09110) at sys_ioctl+0x651 syscall(ffff800020c091c0) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c091c0) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,36,7f7ffffc4bf8,36,3,d6ef38c2890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffc4710, 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,ffff800020c08fe0,3,ffff800020b28018) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff800020c08fe0,3,ffff800020b28018) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd8066978460,80084b01,ffff800020c08fe0,3,fffffd807f7c6840,ffff800020b28018) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd806758b1e8,80084b01,ffff800020c08fe0,ffff800020b28018) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b28018,ffff800020c09120,ffff800020c09110) at sys_ioctl+0x651 syscall(ffff800020c091c0) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c091c0) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,36,7f7ffffc4bf8,36,3,d6ef38c2890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffc4710, count: -9 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff800020c08c10 rbx 0xffff800020c08cc0 rdx 0xffffffff81f8be0b cy_pio_rec+0xbc9 rcx 0 rax 0 r8 0xffffffff81cff133 kprintf+0x183 r9 0x1 r10 0x25 r11 0x8990afbd2bd3d50c r12 0x3000000008 r13 0xffff800020c08c20 r14 0x100 r15 0x1 rip 0xffffffff81896608 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c08c00 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.0) pid=72744 stat=onproc flags process=2 proc=0 pri=52, usrpri=52, nice=20 forw=0xffffffffffffffff, list=0xffff800020b28720,0xffffffff823613a0 process=0xffff800020b7d3c8 user=0xffff800020c04000, vmspace=0xfffffd807f00b000 estcpu=2, cpticks=2, pctcpu=0.0 user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND *19801 72744 52258 0 7 0x2 syz-executor.0 4664 49064 52258 0 3 0x82 piperd syz-executor.1 7342 79639 1 0 3 0x100083 ttyin getty 54246 94115 0 0 3 0x14200 bored sosplice 52258 325955 97962 0 3 0x82 thrsleep syz-fuzzer 52258 487076 97962 0 3 0x4000082 thrsleep syz-fuzzer 52258 212850 97962 0 3 0x4000082 thrsleep syz-fuzzer 52258 200552 97962 0 3 0x4000082 thrsleep syz-fuzzer 52258 520666 97962 0 3 0x4000082 thrsleep syz-fuzzer 52258 377 97962 0 3 0x4000082 thrsleep syz-fuzzer 52258 233497 97962 0 3 0x4000082 thrsleep syz-fuzzer 52258 420653 97962 0 3 0x4000082 kqread syz-fuzzer 52258 122678 97962 0 3 0x4000082 thrsleep syz-fuzzer 52258 306131 97962 0 3 0x4000082 thrsleep syz-fuzzer 97962 221159 62462 0 3 0x10008a pause ksh 62462 162226 98945 0 3 0x92 select sshd 98945 423164 1 0 3 0x80 select sshd 53900 322408 63429 74 3 0x100092 bpf pflogd 63429 731 1 0 3 0x80 netio pflogd 49802 298159 37553 73 3 0x100090 kqread syslogd 37553 510183 1 0 3 0x100082 netio syslogd 64634 486936 1 77 3 0x100090 poll dhclient 13796 389340 1 0 3 0x80 poll dhclient 26080 404815 0 0 3 0x14200 pgzero zerothread 18261 493820 0 0 3 0x14200 aiodoned aiodoned 63239 101466 0 0 3 0x14200 syncer update 5223 420621 0 0 3 0x14200 cleaner cleaner 68453 480281 0 0 3 0x14200 reaper reaper 82430 376011 0 0 3 0x14200 pgdaemon pagedaemon 88832 213903 0 0 3 0x14200 bored crynlk 9667 393853 0 0 3 0x14200 bored crypto 20767 272552 0 0 3 0x40014200 acpi0 acpi0 83631 379150 0 0 7 0x40014200 idle1 41198 418460 0 0 3 0x14200 bored softnet 71100 484690 0 0 3 0x14200 bored systqmp 94375 4756 0 0 3 0x14200 bored systq 48192 451330 0 0 3 0x40014200 bored softclock 80616 275191 0 0 3 0x40014200 idle0 51675 91897 0 0 3 0x14200 bored smr 1 16096 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 19801 (syz-executor.0) thread 0xffff800020b28018 (72744) 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 9529 71955K 71975K 78643K 10886 0 0 pcb 25 9K 11K 78643K 497 0 0 rtable 82 3K 4K 78643K 570 0 0 ifaddr 55 12K 14K 78643K 188 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1491 0 0 iov 0 0K 24K 78643K 102 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1199 75K 76K 78643K 1725 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 14 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 87 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 4 9K 21K 78643K 784 0 0 sigio 0 0K 0K 78643K 4 0 0 proc 54 51K 71K 78643K 594 0 0 subproc 53 55297K 67586K 78643K 329 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 88 0 0 in_multi 22 1K 2K 78643K 125 0 0 ether_multi 1 0K 0K 78643K 2 0 0 mrt 0 0K 0K 78643K 4 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 78 344K 344K 78643K 78 0 0 exec 0 0K 1K 78643K 279 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 83 13K 30K 78643K 3472 0 0 UVM aobj 47 3K 3K 78643K 49 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 20 0 0 NDP 12 0K 0K 78643K 59 0 0 temp 159 2374K 2493K 78643K 5606 0 0 kqueue 0 0K 0K 78643K 5 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 11 0 8 1 0 1 1 0 8 0 inpcbpl 280 486 0 479 3 2 1 2 0 8 0 plimitpl 152 41 0 33 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 105 0 74 2 0 2 2 0 8 1 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 168 0 164 1 0 1 1 0 8 0 rttmr 72 1 0 1 1 1 0 1 0 8 0 nd6 48 18 0 16 1 0 1 1 0 8 0 ppxss 1128 19 0 19 5 5 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 31 0 20 1 0 1 1 0 8 0 pfstkey 112 31 0 20 1 0 1 1 0 8 0 pfstate 328 31 0 20 2 0 2 2 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 492 0 344 13 1 12 13 0 8 2 art_table 32 493 0 344 2 0 2 2 0 8 0 art_node 16 104 0 76 1 0 1 1 0 8 0 sysvmsgpl 40 21 0 15 1 0 1 1 0 8 0 semapl 112 81 0 71 1 0 1 1 0 8 0 shmpl 112 47 0 2 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2797 0 1345 47 0 47 47 0 8 0 ffsino 272 2797 0 1345 97 0 97 97 0 8 0 nchpl 144 4080 0 2441 62 0 62 62 0 8 0 uvmvnodes 72 3034 0 0 56 0 56 56 0 8 0 vnodes 200 3034 0 0 160 0 160 160 0 8 0 namei 1024 12327 0 12327 3 2 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 12179 0 12179 14 13 1 6 0 8 1 sigapl 432 957 0 943 2 0 2 2 0 8 0 futexpl 56 8560 0 8560 1 0 1 1 0 8 1 knotepl 112 384 0 355 4 3 1 2 0 8 0 kqueuepl 104 232 0 230 1 0 1 1 0 8 0 pipepl 112 708 0 689 4 3 1 2 0 8 0 fdescpl 488 958 0 943 3 0 3 3 0 8 0 filepl 152 6015 0 5922 8 3 5 7 0 8 1 lockfpl 104 317 0 317 2 1 1 1 0 8 1 lockfspl 32 343 0 343 2 1 1 1 0 8 1 sessionpl 112 26 0 16 1 0 1 1 0 8 0 pgrppl 48 32 0 22 1 0 1 1 0 8 0 ucredpl 96 1271 0 1262 1 0 1 1 0 8 0 zombiepl 144 943 0 943 3 2 1 1 0 8 1 processpl 840 974 0 943 4 0 4 4 0 8 0 procpl 600 2646 0 2606 4 0 4 4 0 8 0 srpgc 64 47 0 47 6 5 1 1 0 8 1 sosppl 128 5 0 5 3 3 0 1 0 8 0 sockpl 384 897 0 878 6 3 3 4 0 8 1 mcl64k 65536 8 0 0 1 0 1 1 0 8 0 mcl16k 16384 2 0 0 1 0 1 1 0 8 0 mcl12k 12288 7 0 0 1 0 1 1 0 8 0 mcl9k 9216 3 0 0 1 0 1 1 0 8 0 mcl8k 8192 2 0 0 1 0 1 1 0 8 0 mcl4k 4096 11 0 0 2 0 2 2 0 8 0 mcl2k2 2112 1 0 0 1 0 1 1 0 8 0 mcl2k 2048 127 0 0 15 0 15 15 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 220 0 0 10 1 9 9 0 8 0 bufpl 256 7672 0 1043 415 0 415 415 0 8 0 anonpl 16 107800 0 100780 56 10 46 51 0 125 8 amapchunkpl 152 5707 0 5622 22 13 9 9 0 158 5 amappl16 192 4525 0 4059 43 12 31 36 0 8 7 amappl15 184 225 0 224 1 0 1 1 0 8 0 amappl14 176 151 0 145 1 0 1 1 0 8 0 amappl13 168 325 0 322 1 0 1 1 0 8 0 amappl12 160 153 0 150 1 0 1 1 0 8 0 amappl11 152 283 0 270 1 0 1 1 0 8 0 amappl10 144 169 0 165 1 0 1 1 0 8 0 amappl9 136 373 0 368 1 0 1 1 0 8 0 amappl8 128 323 0 303 1 0 1 1 0 8 0 amappl7 120 234 0 227 1 0 1 1 0 8 0 amappl6 112 184 0 176 1 0 1 1 0 8 0 amappl5 104 360 0 346 1 0 1 1 0 8 0 amappl4 96 337 0 310 2 1 1 2 0 8 0 amappl3 88 158 0 153 1 0 1 1 0 8 0 amappl2 80 7838 0 7794 3 1 2 2 0 8 1 amappl1 72 30421 0 30000 24 14 10 19 0 8 0 amappl 72 2945 0 2913 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 48 0 2 1 0 1 1 0 8 0 uaddrrnd 24 958 0 943 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 958 0 943 1 0 1 1 0 8 0 vmmpekpl 168 12356 0 12334 2 0 2 2 0 8 0 vmmpepl 168 110163 0 108802 133 52 81 81 0 357 12 vmsppl 360 957 0 943 2 0 2 2 0 8 0 pdppl 4096 1924 0 1886 6 0 6 6 0 8 0 pvpl 32 325031 0 314922 155 31 124 131 0 265 25 pmappl 224 957 0 943 2 1 1 2 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 573 0 7 17 0 17 17 0 8 0