panic: malloc: out of space in kmem_map Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *436551 20342 0 0x2 0 1K 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,ffff800020c0b860,3,ffff800020b28bd0) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff800020c0b860,3,ffff800020b28bd0) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd80624e8040,80084b01,ffff800020c0b860,3,fffffd807f7c68a0,ffff800020b28bd0) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd806759a900,80084b01,ffff800020c0b860,ffff800020b28bd0) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b28bd0,ffff800020c0b9a0,ffff800020c0b990) at sys_ioctl+0x651 syscall(ffff800020c0ba40) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c0ba40) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,36,7f7ffffe4f18,36,3,4c750917890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe4a30, 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: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,ffff800020c0b860,3,ffff800020b28bd0) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff800020c0b860,3,ffff800020b28bd0) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd80624e8040,80084b01,ffff800020c0b860,3,fffffd807f7c68a0,ffff800020b28bd0) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd806759a900,80084b01,ffff800020c0b860,ffff800020b28bd0) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b28bd0,ffff800020c0b9a0,ffff800020c0b990) at sys_ioctl+0x651 syscall(ffff800020c0ba40) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c0ba40) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,36,7f7ffffe4f18,36,3,4c750917890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe4a30, count: -9 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff800020c0b490 rbx 0xffff800020c0b540 rdx 0xffffffff81f8ad7c cy_pio_rec+0x366f rcx 0 rax 0 r8 0xffffffff819bd5f3 kprintf+0x183 r9 0x1 r10 0x25 r11 0xfd02ed187e12562d r12 0x3000000008 r13 0xffff800020c0b4a0 r14 0x100 r15 0x1 rip 0xffffffff81459958 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c0b480 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.1) pid=436551 stat=onproc flags process=2 proc=0 pri=51, usrpri=51, nice=20 forw=0xffffffffffffffff, list=0xffff800020b284c8,0xffffffff823dac40 process=0xffff800020b7c9f0 user=0xffff800020c06000, vmspace=0xfffffd807effd438 estcpu=1, cpticks=3, pctcpu=0.0 user=0, sys=2, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND *20342 436551 65433 0 7 0x2 syz-executor.1 77029 143156 65433 0 3 0x82 piperd syz-executor.0 8279 66265 0 0 3 0x14200 bored sosplice 65433 389738 12695 0 3 0x82 thrsleep syz-fuzzer 65433 88788 12695 0 3 0x4000082 thrsleep syz-fuzzer 65433 293011 12695 0 3 0x4000082 thrsleep syz-fuzzer 65433 518978 12695 0 3 0x4000082 thrsleep syz-fuzzer 65433 62261 12695 0 3 0x4000082 thrsleep syz-fuzzer 65433 402869 12695 0 3 0x4000082 thrsleep syz-fuzzer 65433 34342 12695 0 3 0x4000082 thrsleep syz-fuzzer 65433 149144 12695 0 3 0x4000082 thrsleep syz-fuzzer 65433 474669 12695 0 3 0x4000082 thrsleep syz-fuzzer 65433 249691 12695 0 3 0x4000082 kqread syz-fuzzer 12695 148092 88868 0 3 0x10008a pause ksh 88868 318695 93205 0 3 0x92 select sshd 82421 259463 1 0 3 0x100083 ttyin getty 93205 382903 1 0 3 0x80 select sshd 46633 266649 76891 74 3 0x100092 bpf pflogd 76891 128038 1 0 3 0x80 netio pflogd 90292 405511 64939 73 3 0x100090 kqread syslogd 64939 275039 1 0 3 0x100082 netio syslogd 59965 51952 1 77 3 0x100090 poll dhclient 83062 231195 1 0 3 0x80 poll dhclient 29470 357654 0 0 3 0x14200 pgzero zerothread 97811 215746 0 0 3 0x14200 aiodoned aiodoned 90595 232116 0 0 3 0x14200 syncer update 4681 312846 0 0 3 0x14200 cleaner cleaner 49612 359172 0 0 3 0x14200 reaper reaper 35354 408216 0 0 3 0x14200 pgdaemon pagedaemon 88754 449196 0 0 3 0x14200 bored crynlk 47175 218582 0 0 3 0x14200 bored crypto 33898 308329 0 0 3 0x40014200 acpi0 acpi0 30561 468777 0 0 3 0x40014200 idle1 42177 509308 0 0 3 0x14200 bored softnet 7224 63968 0 0 3 0x14200 bored systqmp 7067 330634 0 0 3 0x14200 bored systq 65341 480350 0 0 3 0x40014200 bored softclock 75100 86916 0 0 7 0x40014200 idle0 3539 116695 0 0 3 0x14200 bored smr 1 148579 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 20342 (syz-executor.1) thread 0xffff800020b28bd0 (436551) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff823ca8c0) 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 9514 71947K 71967K 78643K 11077 0 0 pcb 25 9K 11K 78643K 271 0 0 rtable 82 3K 4K 78643K 300 0 0 ifaddr 52 12K 13K 78643K 87 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1471 0 0 iov 0 0K 16K 78643K 623 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1193 75K 75K 78643K 1811 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 7 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 62 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 4 9K 21K 78643K 776 0 0 sigio 0 0K 0K 78643K 4 0 0 proc 53 50K 71K 78643K 401 0 0 subproc 53 55297K 67586K 78643K 157 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 37 0 0 in_multi 22 1K 2K 78643K 69 0 0 ether_multi 1 0K 0K 78643K 4 0 0 mrt 0 0K 0K 78643K 6 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 225 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 85 13K 25K 78643K 3200 0 0 UVM aobj 20 3K 3K 78643K 22 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 23 0 0 NDP 11 0K 0K 78643K 26 0 0 temp 153 2374K 2439K 78643K 4971 0 0 kqueue 0 0K 0K 78643K 8 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 6 0 3 1 0 1 1 0 8 0 inpcbpl 280 250 0 243 1 0 1 1 0 8 0 plimitpl 152 28 0 20 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 61 0 30 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 69 0 65 1 0 1 1 0 8 0 nd6 48 8 0 6 1 0 1 1 0 8 0 ppxss 1128 2 0 2 2 2 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 21 0 15 1 0 1 1 0 8 0 pfstkey 112 21 0 15 1 0 1 1 0 8 0 pfstate 328 21 0 15 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 271 0 123 12 0 12 12 0 8 1 art_table 32 272 0 123 2 0 2 2 0 8 0 art_node 16 58 0 30 1 0 1 1 0 8 0 sysvmsgpl 40 6 0 2 1 0 1 1 0 8 0 semapl 112 60 0 50 1 0 1 1 0 8 0 shmpl 112 20 0 2 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 3249 0 1823 46 0 46 46 0 8 0 ffsino 272 3249 0 1823 96 0 96 96 0 8 0 nchpl 144 4436 0 2797 61 0 61 61 0 8 0 uvmvnodes 72 3354 0 0 61 0 61 61 0 8 0 vnodes 200 3354 0 0 177 0 177 177 0 8 0 namei 1024 11862 0 11862 3 2 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 11704 0 11704 9 7 2 6 0 8 2 sigapl 432 963 0 949 2 0 2 2 0 8 0 futexpl 56 7617 0 7617 1 0 1 1 0 8 1 knotepl 112 203 0 174 3 1 2 2 0 8 1 kqueuepl 104 105 0 103 1 0 1 1 0 8 0 pipepl 112 430 0 411 4 3 1 2 0 8 0 fdescpl 488 964 0 949 3 0 3 3 0 8 0 filepl 152 4637 0 4544 9 4 5 7 0 8 1 lockfpl 104 149 0 149 5 4 1 1 0 8 1 lockfspl 32 111 0 111 5 4 1 1 0 8 1 sessionpl 112 20 0 10 1 0 1 1 0 8 0 pgrppl 48 26 0 16 1 0 1 1 0 8 0 ucredpl 96 811 0 802 1 0 1 1 0 8 0 zombiepl 144 949 0 949 3 2 1 1 0 8 1 processpl 840 980 0 949 4 0 4 4 0 8 0 procpl 600 2483 0 2443 4 0 4 4 0 8 0 srpgc 64 18 0 18 3 2 1 1 0 8 1 sosppl 128 5 0 5 2 2 0 1 0 8 0 sockpl 384 464 0 445 5 2 3 4 0 8 1 mcl64k 65536 284 0 0 34 0 34 34 0 8 0 mcl16k 16384 5 0 0 1 0 1 1 0 8 0 mcl12k 12288 3 0 0 1 0 1 1 0 8 0 mcl9k 9216 5 0 0 1 0 1 1 0 8 0 mcl8k 8192 4 0 0 1 0 1 1 0 8 0 mcl4k 4096 9 0 0 2 0 2 2 0 8 0 mcl2k2 2112 2 0 0 1 0 1 1 0 8 0 mcl2k 2048 116 0 0 14 0 14 14 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 376 0 0 20 0 20 20 0 8 0 bufpl 256 6563 0 1049 345 0 345 345 0 8 0 anonpl 16 106332 0 99305 67 19 48 50 0 125 10 amapchunkpl 152 4853 0 4766 8 3 5 7 0 158 0 amappl16 192 5052 0 4585 56 25 31 36 0 8 6 amappl15 184 416 0 414 1 0 1 1 0 8 0 amappl14 176 131 0 126 1 0 1 1 0 8 0 amappl13 168 30 0 27 1 0 1 1 0 8 0 amappl12 160 122 0 119 1 0 1 1 0 8 0 amappl11 152 316 0 302 1 0 1 1 0 8 0 amappl10 144 195 0 192 1 0 1 1 0 8 0 amappl9 136 466 0 461 1 0 1 1 0 8 0 amappl8 128 253 0 236 1 0 1 1 0 8 0 amappl7 120 35 0 29 1 0 1 1 0 8 0 amappl6 112 58 0 50 1 0 1 1 0 8 0 amappl5 104 537 0 523 1 0 1 1 0 8 0 amappl4 96 460 0 435 2 1 1 2 0 8 0 amappl3 88 147 0 141 1 0 1 1 0 8 0 amappl2 80 8105 0 8056 2 0 2 2 0 8 0 amappl1 72 28750 0 28324 24 14 10 19 0 8 0 amappl 72 2745 0 2712 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 21 0 2 1 0 1 1 0 8 0 uaddrrnd 24 964 0 949 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 964 0 949 1 0 1 1 0 8 0 vmmpekpl 168 11485 0 11461 2 0 2 2 0 8 0 vmmpepl 168 108443 0 107075 115 33 82 82 0 357 13 vmsppl 360 963 0 949 2 0 2 2 0 8 0 pdppl 4096 1936 0 1898 6 0 6 6 0 8 0 pvpl 32 329300 0 319149 164 35 129 131 0 265 29 pmappl 224 963 0 949 2 1 1 2 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 543 0 5 16 0 16 16 0 8 0