panic: malloc: out of space in kmem_map Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *364078 17103 0 0x2 0 0 syz-executor.1 340843 26873 0 0x2 0x4000000 1 syz-fuzzer 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,ffff800020c413c0,3,ffff800020b42e28) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff800020c413c0,3,ffff800020b42e28) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd8068018910,80084b01,ffff800020c413c0,3,fffffd807f7c7840,ffff800020b42e28) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd807950bef8,80084b01,ffff800020c413c0,ffff800020b42e28) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b42e28,ffff800020c41500,ffff800020c414f0) at sys_ioctl+0x646 syscall(ffff800020c415a0) at syscall+0x5ac mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c415a0) at syscall+0x5ac sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,36,7f7ffffbec58,36,3,8ce43772890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffbe770, 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+24 panic() at panic+372 malloc(200000,2a,9) at malloc+2773 kcovioctl(1b1300,80084b01,ffff800020c413c0,3,ffff800020b42e28) at kcovioctl+230 VOP_IOCTL(fffffd8068018910,80084b01,ffff800020c413c0,3,fffffd807f7c7840,ffff800020b42e28) at VOP_IOCTL+154 vn_ioctl(fffffd807950bef8,80084b01,ffff800020c413c0,ffff800020b42e28) at vn_ioctl+201 sys_ioctl(ffff800020b42e28,ffff800020c41500,ffff800020c414f0) at sys_ioctl+1606 syscall(ffff800020c415a0) at syscall+1452 Xsyscall(6,36,7f7ffffbec58,36,3,8ce43772890) at Xsyscall+296 end of kernel end trace frame: 0x7f7ffffbe770, count: -9 ddb{0}> show registers rdi 0 rsi 1 rbp 18446603336770916336 rbx 18446603336770916512 rdx 18446744071594925066 apollo_pio_rec+41165 rcx 0 rax 0 r8 18446744071592058003 kprintf+387 r9 1 r10 37 r11 12148221734159423099 r12 206158430216 r13 18446603336770916352 r14 256 r15 1 rip 18446744071587275480 db_enter+24 cs 8 rflags 582 rsp 18446603336770916320 ss 16 db_enter+24: addq $8,%rsp ddb{0}> show proc PROC (syz-executor.1) pid=364078 stat=onproc flags process=2 proc=0 pri=80, usrpri=80, nice=20 forw=0xffffffffffffffff, list=0xffff800020b42018,0xffffffff82347020 process=0xffff800020b453c0 user=0xffff800020c3c000, vmspace=0xfffffd807f00cca8 estcpu=30, cpticks=3, pctcpu=0.0 user=0, sys=2, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND *17103 364078 26873 0 7 0x2 syz-executor.1 94983 288207 1 0 3 0x100083 ttyin getty 5252 100761 26873 0 3 0x82 piperd syz-executor.0 78968 210163 0 0 3 0x14200 bored sosplice 26873 179042 86181 0 3 0x82 thrsleep syz-fuzzer 26873 340843 86181 0 7 0x4000002 syz-fuzzer 26873 28357 86181 0 3 0x4000082 thrsleep syz-fuzzer 26873 462235 86181 0 3 0x4000082 kqread syz-fuzzer 26873 298601 86181 0 3 0x4000082 thrsleep syz-fuzzer 26873 108645 86181 0 3 0x4000082 thrsleep syz-fuzzer 26873 102007 86181 0 3 0x4000082 thrsleep syz-fuzzer 26873 484199 86181 0 3 0x4000082 thrsleep syz-fuzzer 26873 179671 86181 0 3 0x4000082 thrsleep syz-fuzzer 26873 207600 86181 0 3 0x4000082 thrsleep syz-fuzzer 26873 156618 86181 0 3 0x4000082 thrsleep syz-fuzzer 86181 112603 8670 0 3 0x10008a pause ksh 8670 258315 704 0 3 0x92 select sshd 704 45704 1 0 3 0x80 select sshd 3365 352870 83968 73 3 0x100090 kqread syslogd 83968 116945 1 0 3 0x100082 netio syslogd 97698 478557 1 77 3 0x100090 poll dhclient 23242 377079 1 0 3 0x80 poll dhclient 7624 105117 0 0 3 0x14200 pgzero zerothread 89980 443897 0 0 3 0x14200 aiodoned aiodoned 69235 13898 0 0 3 0x14200 syncer update 61888 93878 0 0 3 0x14200 cleaner cleaner 83948 81807 0 0 3 0x14200 reaper reaper 98694 100778 0 0 3 0x14200 pgdaemon pagedaemon 28434 279261 0 0 3 0x14200 bored crynlk 59463 235946 0 0 3 0x14200 bored crypto 46702 303593 0 0 3 0x40014200 acpi0 acpi0 108 175138 0 0 3 0x40014200 idle1 30529 311986 0 0 3 0x14200 bored softnet 52103 295556 0 0 3 0x14200 bored systqmp 6890 168870 0 0 3 0x14200 bored systq 36132 206844 0 0 3 0x40014200 bored softclock 48240 268028 0 0 3 0x40014200 idle0 1 313371 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 17103 (syz-executor.1) thread 0xffff800020b42e28 (364078) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff82340dc0) locked @ /syzkaller/managers/multicore/kernel/sys/sys/syscall_mi.h:90 #0 witness_lock+1418 #1 syscall+1151 #2 Xsyscall+296 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9506 71894K 71902K 78643K 11609 0 0 pcb 23 9K 11K 78643K 1510 0 0 rtable 82 3K 4K 78643K 924 0 0 ifaddr 47 13K 16K 78643K 371 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 2K 78643K 46 0 0 iov 0 0K 16K 78643K 246 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1201 75K 76K 78643K 3239 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 48 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 339 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1792 194K 288K 78643K 12592 0 0 file desc 4 9K 21K 78643K 2972 0 0 sigio 0 0K 0K 78643K 33 0 0 proc 42 38K 58K 78643K 813 0 0 subproc 53 55297K 67586K 78643K 416 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 331 0 0 in_multi 22 1K 2K 78643K 233 0 0 ether_multi 1 0K 0K 78643K 17 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 533 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 87 13K 30K 78643K 10370 0 0 UVM aobj 130 4K 4K 78643K 137 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 78 0 0 NDP 9 0K 0K 78643K 116 0 0 temp 142 2366K 2435K 78643K 11245 0 0 kqueue 0 0K 0K 78643K 40 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 13 0 10 1 0 1 1 0 8 0 inpcbpl 280 1306 0 1299 1 0 1 1 0 8 0 plimitpl 152 59 0 52 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 122 0 91 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 471 0 467 1 0 1 1 0 8 0 nd6 48 22 0 20 1 0 1 1 0 8 0 ppxss 1128 52 0 52 11 11 0 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 563 0 416 12 0 12 12 0 8 0 art_table 32 564 0 416 2 0 2 2 0 8 0 art_node 16 121 0 93 1 0 1 1 0 8 0 sysvmsgpl 40 26 0 14 1 0 1 1 0 8 0 semapl 112 337 0 327 1 0 1 1 0 8 0 shmpl 112 135 0 7 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 7204 0 5777 47 0 47 47 0 8 0 ffsino 272 7204 0 5777 96 0 96 96 0 8 0 nchpl 144 11669 0 10061 61 0 61 61 0 8 0 uvmvnodes 72 5926 0 0 108 0 108 108 0 8 0 vnodes 200 5926 0 0 312 0 312 312 0 8 0 namei 1024 36060 0 36060 3 2 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 3 0 3 2 2 0 1 0 8 0 scxspl 192 32638 0 32638 21 18 3 6 0 8 3 sigapl 432 3116 0 3104 2 0 2 2 0 8 0 futexpl 56 32391 0 32391 2 1 1 1 0 8 1 knotepl 112 950 0 921 6 5 1 2 0 8 0 kqueuepl 104 850 0 848 1 0 1 1 0 8 0 pipepl 112 2142 0 2123 8 7 1 2 0 8 0 fdescpl 488 3117 0 3104 3 1 2 3 0 8 0 filepl 152 19483 0 19395 10 5 5 6 0 8 1 lockfpl 104 951 0 951 4 3 1 1 0 8 1 lockfspl 32 1271 0 1271 4 3 1 1 0 8 1 sessionpl 112 32 0 23 1 0 1 1 0 8 0 pgrppl 48 74 0 65 1 0 1 1 0 8 0 ucredpl 96 5649 0 5642 1 0 1 1 0 8 0 zombiepl 144 3104 0 3104 2 1 1 1 0 8 1 processpl 840 3132 0 3104 4 0 4 4 0 8 0 procpl 600 9510 0 9472 4 0 4 4 0 8 0 srpgc 64 60 0 60 4 3 1 1 0 8 1 sosppl 128 39 0 39 10 9 1 1 0 8 1 sockpl 384 2689 0 2672 6 3 3 4 0 8 1 mcl64k 65536 516 0 0 65 6 59 65 0 8 1 mcl16k 16384 9 0 0 2 0 2 2 0 8 0 mcl12k 12288 23 0 0 2 0 2 2 0 8 0 mcl9k 9216 15 0 0 2 0 2 2 0 8 0 mcl8k 8192 13 0 0 2 0 2 2 0 8 0 mcl4k 4096 17 0 0 3 0 3 3 0 8 0 mcl2k2 2112 9 0 0 1 0 1 1 0 8 0 mcl2k 2048 121 0 0 14 0 14 14 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 694 0 0 36 1 35 36 0 8 0 bufpl 256 9673 0 2701 436 0 436 436 0 8 0 anonpl 16 306608 0 300413 133 93 40 49 0 125 4 amapchunkpl 152 19390 0 19300 38 29 9 11 0 158 4 amappl16 192 16478 0 16082 117 95 22 33 0 8 1 amappl15 184 936 0 935 1 0 1 1 0 8 0 amappl14 176 944 0 940 2 1 1 1 0 8 0 amappl13 168 47 0 43 1 0 1 1 0 8 0 amappl12 160 14 0 14 3 3 0 1 0 8 0 amappl11 152 711 0 701 1 0 1 1 0 8 0 amappl10 144 63 0 63 8 7 1 1 0 8 1 amappl9 136 864 0 860 1 0 1 1 0 8 0 amappl8 128 231 0 199 4 2 2 2 0 8 0 amappl7 120 57 0 51 1 0 1 1 0 8 0 amappl6 112 303 0 294 1 0 1 1 0 8 0 amappl5 104 1096 0 1085 1 0 1 1 0 8 0 amappl4 96 1559 0 1537 1 0 1 1 0 8 0 amappl3 88 253 0 247 1 0 1 1 0 8 0 amappl2 80 29497 0 29457 2 0 2 2 0 8 0 amappl1 72 75513 0 75115 25 15 10 19 0 8 0 amappl 72 9807 0 9776 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 136 0 7 3 0 3 3 0 8 0 uaddrrnd 24 3117 0 3104 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 3117 0 3104 1 0 1 1 0 8 0 vmmpekpl 168 29452 0 29428 2 0 2 2 0 8 0 vmmpepl 168 336281 0 335035 155 81 74 75 0 357 7 vmsppl 360 3116 0 3104 2 0 2 2 0 8 0 pdppl 4096 6241 0 6208 5 0 5 5 0 8 0 pvpl 32 850839 0 841741 250 137 113 129 0 265 19 pmappl 224 3116 0 3104 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 681 0 11 20 0 20 20 0 8 0