panic: malloc: out of space in kmem_map Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *388595 88200 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,ffff800020c0f1d0,3,ffff800020b42270) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff800020c0f1d0,3,ffff800020b42270) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd8062d3d480,80084b01,ffff800020c0f1d0,3,fffffd807f7c7a80,ffff800020b42270) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd806707e020,80084b01,ffff800020c0f1d0,ffff800020b42270) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b42270,ffff800020c0f310,ffff800020c0f300) at sys_ioctl+0x646 syscall(ffff800020c0f3b0) at syscall+0x5ac mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c0f3b0) at syscall+0x5ac sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,36,7f7fffff32d8,36,3,961a2c86890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffff2df0, 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,ffff800020c0f1d0,3,ffff800020b42270) at kcovioctl+230 VOP_IOCTL(fffffd8062d3d480,80084b01,ffff800020c0f1d0,3,fffffd807f7c7a80,ffff800020b42270) at VOP_IOCTL+154 vn_ioctl(fffffd806707e020,80084b01,ffff800020c0f1d0,ffff800020b42270) at vn_ioctl+201 sys_ioctl(ffff800020b42270,ffff800020c0f310,ffff800020c0f300) at sys_ioctl+1606 syscall(ffff800020c0f3b0) at syscall+1452 Xsyscall(6,36,7f7fffff32d8,36,3,961a2c86890) at Xsyscall+296 end of kernel end trace frame: 0x7f7fffff2df0, count: -9 ddb{0}> show registers rdi 0 rsi 1 rbp 18446603336770711040 rbx 18446603336770711216 rdx 18446744071594908300 apollo_pio_rec+35292 rcx 0 rax 0 r8 18446744071585311987 kprintf+387 r9 1 r10 37 r11 6828844070148264768 r12 206158430216 r13 18446603336770711056 r14 256 r15 1 rip 18446744071590259448 db_enter+24 cs 8 rflags 582 rsp 18446603336770711024 ss 16 db_enter+24: addq $8,%rsp ddb{0}> show proc PROC (syz-executor.1) pid=388595 stat=onproc flags process=2 proc=0 pri=50, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff800020b432d8,0xffffffff82353980 process=0xffff800020b45708 user=0xffff800020c0a000, vmspace=0xfffffd807f00db40 estcpu=0, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND *88200 388595 98795 0 7 0x2 syz-executor.1 90423 367003 98795 0 3 0x82 piperd syz-executor.0 46571 371070 1 0 3 0x100083 ttyin getty 31042 238489 0 0 3 0x14200 bored sosplice 98795 1433 7170 0 3 0x82 thrsleep syz-fuzzer 98795 106273 7170 0 3 0x4000082 thrsleep syz-fuzzer 98795 431167 7170 0 3 0x4000082 thrsleep syz-fuzzer 98795 415080 7170 0 3 0x4000082 kqread syz-fuzzer 98795 288376 7170 0 3 0x4000082 thrsleep syz-fuzzer 98795 220944 7170 0 3 0x4000082 thrsleep syz-fuzzer 98795 428960 7170 0 3 0x4000082 thrsleep syz-fuzzer 98795 395548 7170 0 3 0x4000082 thrsleep syz-fuzzer 98795 286374 7170 0 3 0x4000082 thrsleep syz-fuzzer 98795 86323 7170 0 3 0x4000082 thrsleep syz-fuzzer 7170 442122 52159 0 3 0x10008a pause ksh 52159 430808 28001 0 3 0x92 select sshd 28001 145820 1 0 3 0x80 select sshd 37061 295740 50168 73 3 0x100090 kqread syslogd 50168 438493 1 0 3 0x100082 netio syslogd 22569 497564 1 77 3 0x100090 poll dhclient 50723 281031 1 0 3 0x80 poll dhclient 15733 445790 0 0 3 0x14200 pgzero zerothread 42074 250500 0 0 3 0x14200 aiodoned aiodoned 54248 220854 0 0 3 0x14200 syncer update 7876 412869 0 0 3 0x14200 cleaner cleaner 28659 272930 0 0 3 0x14200 reaper reaper 98517 146517 0 0 3 0x14200 pgdaemon pagedaemon 61924 458297 0 0 3 0x14200 bored crynlk 53588 172830 0 0 3 0x14200 bored crypto 94545 248686 0 0 3 0x40014200 acpi0 acpi0 74219 288959 0 0 7 0x40014200 idle1 15296 302500 0 0 3 0x14200 bored softnet 9670 506490 0 0 3 0x14200 bored systqmp 38176 146974 0 0 3 0x14200 bored systq 84866 343839 0 0 3 0x40014200 bored softclock 2255 427312 0 0 3 0x40014200 idle0 1 80709 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 88200 (syz-executor.1) thread 0xffff800020b42270 (388595) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff82309fb0) 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 9517 71882K 71890K 78643K 11190 0 0 pcb 23 9K 11K 78643K 794 0 0 rtable 82 3K 4K 78643K 481 0 0 ifaddr 49 12K 13K 78643K 215 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 2K 78643K 35 0 0 iov 0 0K 24K 78643K 165 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1187 74K 75K 78643K 2123 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 23 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 200 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1792 194K 288K 78643K 12592 0 0 file desc 4 9K 21K 78643K 1469 0 0 sigio 0 0K 0K 78643K 17 0 0 proc 42 38K 58K 78643K 471 0 0 subproc 53 55297K 67586K 78643K 127 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 180 0 0 in_multi 22 1K 2K 78643K 82 0 0 ether_multi 1 0K 0K 78643K 9 0 0 mrt 0 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 102 450K 450K 78643K 102 0 0 exec 0 0K 1K 78643K 297 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 87 13K 29K 78643K 5661 0 0 UVM aobj 90 3K 3K 78643K 97 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 51 0 0 NDP 10 0K 0K 78643K 60 0 0 temp 149 2366K 2437K 78643K 6948 0 0 kqueue 0 0K 0K 78643K 34 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 5 0 2 1 0 1 1 0 8 0 inpcbpl 280 766 0 759 1 0 1 1 0 8 0 plimitpl 152 37 0 30 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 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 246 0 242 1 0 1 1 0 8 0 nd6 48 6 0 4 1 0 1 1 0 8 0 ppxss 1128 32 0 32 12 11 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 229 0 82 12 0 12 12 0 8 2 art_table 32 230 0 82 2 0 2 2 0 8 0 art_node 16 49 0 21 1 0 1 1 0 8 0 sysvmsgpl 40 27 0 10 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 198 0 188 1 0 1 1 0 8 0 shmpl 112 95 0 7 4 1 3 3 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 4247 0 2837 46 0 46 46 0 8 0 ffsino 272 4247 0 2837 95 0 95 95 0 8 0 nchpl 144 6591 0 4984 61 0 61 61 0 8 0 uvmvnodes 72 4472 0 0 82 0 82 82 0 8 0 vnodes 200 4472 0 0 236 0 236 236 0 8 0 namei 1024 19623 0 19623 1 0 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 3 0 3 3 3 0 1 0 8 0 scxspl 192 19279 0 19279 17 16 1 6 0 8 1 sigapl 432 1632 0 1620 2 0 2 2 0 8 0 futexpl 56 16297 0 16297 1 0 1 1 0 8 1 knotepl 112 554 0 525 9 8 1 2 0 8 0 kqueuepl 104 487 0 485 1 0 1 1 0 8 0 pipepl 112 1036 0 1017 5 4 1 2 0 8 0 fdescpl 488 1633 0 1620 3 1 2 3 0 8 0 filepl 152 10041 0 9953 7 2 5 5 0 8 1 lockfpl 104 556 0 556 4 3 1 1 0 8 1 lockfspl 32 810 0 810 4 3 1 1 0 8 1 sessionpl 112 19 0 10 1 0 1 1 0 8 0 pgrppl 48 32 0 23 1 0 1 1 0 8 0 ucredpl 96 2748 0 2741 1 0 1 1 0 8 0 zombiepl 144 1620 0 1620 2 1 1 1 0 8 1 processpl 840 1648 0 1620 4 0 4 4 0 8 0 procpl 600 4969 0 4932 4 0 4 4 0 8 0 srpgc 64 12 0 12 2 1 1 1 0 8 1 sosppl 128 24 0 24 6 6 0 1 0 8 0 sockpl 384 1425 0 1408 8 5 3 4 0 8 1 mcl64k 65536 9 0 0 2 0 2 2 0 8 0 mcl16k 16384 3 0 0 1 0 1 1 0 8 0 mcl12k 12288 16 0 0 2 0 2 2 0 8 0 mcl9k 9216 8 0 0 1 0 1 1 0 8 0 mcl8k 8192 4 0 0 1 0 1 1 0 8 0 mcl4k 4096 15 0 0 2 0 2 2 0 8 0 mcl2k2 2112 3 0 0 1 0 1 1 0 8 0 mcl2k 2048 114 0 0 13 0 13 13 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 520 0 0 28 0 28 28 0 8 0 bufpl 256 8060 0 1088 436 0 436 436 0 8 0 anonpl 16 181614 0 175480 120 86 34 49 0 125 0 amapchunkpl 152 10438 0 10355 39 35 4 11 0 158 0 amappl16 192 8878 0 8474 103 81 22 33 0 8 1 amappl15 184 1 0 0 1 0 1 1 0 8 0 amappl14 176 10 0 6 2 1 1 1 0 8 0 amappl13 168 612 0 608 1 0 1 1 0 8 0 amappl12 160 14 0 14 2 1 1 1 0 8 1 amappl11 152 908 0 899 1 0 1 1 0 8 0 amappl10 144 197 0 191 2 1 1 1 0 8 0 amappl9 136 1080 0 1077 1 0 1 1 0 8 0 amappl8 128 162 0 137 1 0 1 1 0 8 0 amappl7 120 629 0 622 1 0 1 1 0 8 0 amappl6 112 53 0 45 1 0 1 1 0 8 0 amappl5 104 134 0 123 1 0 1 1 0 8 0 amappl4 96 288 0 265 1 0 1 1 0 8 0 amappl3 88 190 0 185 1 0 1 1 0 8 0 amappl2 80 15208 0 15163 2 0 2 2 0 8 0 amappl1 72 43841 0 43448 24 14 10 19 0 8 0 amappl 72 5219 0 5189 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 96 0 7 2 0 2 2 0 8 0 uaddrrnd 24 1633 0 1620 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1633 0 1620 1 0 1 1 0 8 0 vmmpekpl 168 17117 0 17092 2 0 2 2 0 8 0 vmmpepl 168 181393 0 180153 138 64 74 74 0 357 10 vmsppl 360 1632 0 1620 2 0 2 2 0 8 0 pdppl 4096 3273 0 3240 5 0 5 5 0 8 0 pvpl 32 519646 0 510617 218 123 95 126 0 265 5 pmappl 224 1632 0 1620 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 603 0 2 18 0 18 18 0 8 0