>>panic: malloc: out of space in kmem_map Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *466409 33790 0 0x2 0 0 syz-executor.0 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x15c sys/kern/subr_prf.c:208 malloc(200000,2a,9) at malloc+0xa79 sys/kern/kern_malloc.c:242 kcovioctl(1b1300,80084b01,ffff8000149e8000,3,ffff8000ffff24c8) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff8000149e8000,3,ffff8000ffff24c8) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd802ab379f0,80084b01,ffff8000149e8000,3,fffffd803f7c6c00,ffff8000ffff24c8) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd803ea2ae18,80084b01,ffff8000149e8000,ffff8000ffff24c8) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000ffff24c8,ffff8000149e8140,ffff8000149e8130) at sys_ioctl+0x638 syscall(ffff8000149e81e0) at syscall+0x541 Xsyscall(6,36,7f7ffffbfea8,36,3,438b9d62890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffbf9c0, 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> ddb> set $lines = 0 ddb> set $maxwidth = 0 ddb> show panic malloc: out of space in kmem_map ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x15c sys/kern/subr_prf.c:208 malloc(200000,2a,9) at malloc+0xa79 sys/kern/kern_malloc.c:242 kcovioctl(1b1300,80084b01,ffff8000149e8000,3,ffff8000ffff24c8) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff8000149e8000,3,ffff8000ffff24c8) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd802ab379f0,80084b01,ffff8000149e8000,3,fffffd803f7c6c00,ffff8000ffff24c8) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd803ea2ae18,80084b01,ffff8000149e8000,ffff8000ffff24c8) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000ffff24c8,ffff8000149e8140,ffff8000149e8130) at sys_ioctl+0x638 syscall(ffff8000149e81e0) at syscall+0x541 Xsyscall(6,36,7f7ffffbfea8,36,3,438b9d62890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffbf9c0, count: -9 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000149e7c30 rbx 0xffff8000149e7ce0 rdx 0x2 rcx 0 rax 0 r8 0xffff8000149e7bf0 r9 0x1 r10 0 r11 0xb5adbed2ab271893 r12 0x3000000008 r13 0xffff8000149e7c40 r14 0x100 r15 0x1 rip 0xffffffff8161b028 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000149e7c20 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=466409 stat=onproc flags process=2 proc=0 pri=50, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff9070,0xffffffff82290d98 process=0xffff8000ffff66a0 user=0xffff8000149e3000, vmspace=0xfffffd803f014c60 estcpu=0, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND *33790 466409 10382 0 7 0x2 syz-executor.0 7130 513479 10382 0 3 0x82 piperd syz-executor.1 76822 438012 1 0 3 0x100083 ttyin getty 1920 271582 0 0 3 0x14200 bored sosplice 10382 42816 62372 0 3 0x82 thrsleep syz-fuzzer 10382 189093 62372 0 3 0x4000082 thrsleep syz-fuzzer 10382 472818 62372 0 3 0x4000082 thrsleep syz-fuzzer 10382 63716 62372 0 3 0x4000082 thrsleep syz-fuzzer 10382 506489 62372 0 3 0x4000082 thrsleep syz-fuzzer 10382 285312 62372 0 3 0x4000082 kqread syz-fuzzer 10382 65805 62372 0 3 0x4000082 thrsleep syz-fuzzer 10382 109646 62372 0 3 0x4000082 thrsleep syz-fuzzer 62372 391649 72070 0 3 0x10008a pause ksh 72070 96526 19709 0 3 0x92 select sshd 19709 418892 1 0 3 0x80 select sshd 20160 165702 83023 73 3 0x100090 kqread syslogd 83023 466172 1 0 3 0x100082 netio syslogd 2165 214104 0 0 3 0x14200 pgzero zerothread 69429 467011 0 0 3 0x14200 aiodoned aiodoned 47777 311156 0 0 3 0x14200 syncer update 21975 367752 0 0 3 0x14200 cleaner cleaner 40709 313344 0 0 3 0x14200 reaper reaper 24930 442414 0 0 3 0x14200 pgdaemon pagedaemon 8756 395260 0 0 3 0x14200 bored crynlk 93535 148963 0 0 3 0x14200 bored crypto 31974 96911 0 0 3 0x40014200 acpi0 acpi0 92431 373014 0 0 3 0x14200 bored softnet 70442 441936 0 0 3 0x14200 bored systqmp 88801 177420 0 0 3 0x14200 bored systq 39714 413905 0 0 3 0x40014200 bored softclock 56602 98679 0 0 3 0x40014200 idle0 58228 303462 0 0 3 0x14200 bored smr 1 44596 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb> show all locks No such command ddb> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9536 71831K 71839K 78643K 11770 0 0 pcb 19 8K 11K 78643K 1686 0 0 rtable 82 3K 4K 78643K 1416 0 0 ifaddr 66 17K 20K 78643K 583 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 87 0 0 iov 0 0K 32K 78643K 384 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1196 75K 76K 78643K 3130 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 2 1K 9K 78643K 47 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 1K 78643K 365 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 4 9K 21K 78643K 2821 0 0 sigio 0 0K 0K 78643K 47 0 0 proc 42 30K 54K 78643K 1205 0 0 subproc 53 55297K 67586K 78643K 1116 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 386 0 0 in_multi 22 1K 2K 78643K 493 0 0 ether_multi 1 0K 0K 78643K 23 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 108 477K 477K 78643K 108 0 0 exec 0 0K 1K 78643K 584 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 75 12K 29K 78643K 7969 0 0 UVM aobj 130 8K 8K 78643K 138 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 138 0 0 NDP 15 0K 0K 78643K 198 0 0 temp 184 2359K 2428K 78643K 12538 0 0 kqueue 0 0K 0K 78643K 28 0 0 SYN cache 2 16K 16K 78643K 2 0 0 ddb> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 34 0 31 1 0 1 1 0 8 0 inpcbpl 280 1425 0 1421 1 0 1 1 0 8 0 plimitpl 152 133 0 127 1 0 1 1 0 8 0 rtentry 112 313 0 282 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 525 0 521 1 0 1 1 0 8 0 nd6 48 64 0 62 1 0 1 1 0 8 0 ppxss 1128 65 0 65 19 18 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 1452 0 1305 12 0 12 12 0 8 0 art_table 32 1453 0 1305 2 0 2 2 0 8 0 art_node 16 310 0 282 1 0 1 1 0 8 0 sysvmsgpl 40 22 0 9 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 359 0 349 1 0 1 1 0 8 0 shmpl 112 136 0 8 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 6321 0 4764 51 0 51 51 0 8 0 ffsino 240 6321 0 4764 92 0 92 92 0 8 0 nchpl 144 10456 0 8709 65 0 65 65 0 8 0 uvmvnodes 72 7005 0 0 128 0 128 128 0 8 0 vnodes 200 7005 0 0 369 0 369 369 0 8 0 namei 1024 33757 0 33757 3 2 1 1 0 8 1 scsiplug 64 4 0 4 4 4 0 1 0 8 0 scxspl 192 34326 0 34326 19 17 2 6 0 8 2 sigapl 432 2901 0 2891 2 0 2 2 0 8 0 futexpl 56 45008 0 45008 2 1 1 1 0 8 1 knotepl 112 1325 0 1304 1 0 1 1 0 8 0 kqueuepl 104 849 0 847 1 0 1 1 0 8 0 pipepl 112 2168 0 2149 10 8 2 2 0 8 1 fdescpl 424 2902 0 2891 2 0 2 2 0 8 0 filepl 120 19033 0 18955 18 13 5 6 0 8 2 lockfpl 104 914 0 914 12 11 1 1 0 8 1 lockfspl 32 1162 0 1162 11 10 1 1 0 8 1 sessionpl 112 50 0 43 1 0 1 1 0 8 0 pgrppl 48 74 0 67 1 0 1 1 0 8 0 ucredpl 96 4553 0 4547 1 0 1 1 0 8 0 zombiepl 144 2891 0 2891 2 1 1 1 0 8 1 processpl 840 2917 0 2891 4 0 4 4 0 8 0 procpl 600 6695 0 6662 4 0 4 4 0 8 0 sosppl 128 34 0 34 12 11 1 1 0 8 1 sockpl 384 2928 0 2918 17 14 3 4 0 8 1 mcl64k 65536 1603 0 1603 171 170 1 65 0 8 1 mcl16k 16384 13 0 13 9 8 1 1 0 8 1 mcl12k 12288 73 0 73 14 13 1 1 0 8 1 mcl9k 9216 57 0 57 20 19 1 1 0 8 1 mcl8k 8192 37 0 37 17 16 1 1 0 8 1 mcl4k 4096 157 0 157 15 14 1 1 0 8 1 mcl2k2 2112 21 0 21 11 10 1 1 0 8 1 mcl2k 2048 51761 0 51717 21 14 7 13 0 8 1 mtagpl 80 2 0 2 1 1 0 1 0 8 0 mbufpl 256 102084 0 102011 110 103 7 38 0 8 0 bufpl 256 14695 0 7663 440 0 440 440 0 8 0 anonpl 16 353271 0 346332 181 128 53 58 0 62 14 amapchunkpl 152 14525 0 14451 60 47 13 16 0 158 9 amappl16 192 16876 0 16402 180 148 32 37 0 8 6 amappl15 184 923 0 918 1 0 1 1 0 8 0 amappl14 176 465 0 463 2 1 1 1 0 8 0 amappl13 168 812 0 809 1 0 1 1 0 8 0 amappl12 160 399 0 396 1 0 1 1 0 8 0 amappl11 152 1029 0 1024 1 0 1 1 0 8 0 amappl10 144 365 0 363 2 1 1 1 0 8 0 amappl9 136 690 0 686 1 0 1 1 0 8 0 amappl8 128 278 0 258 1 0 1 1 0 8 0 amappl7 120 131 0 125 1 0 1 1 0 8 0 amappl6 112 437 0 429 1 0 1 1 0 8 0 amappl5 104 502 0 494 1 0 1 1 0 8 0 amappl4 96 3137 0 3112 2 1 1 2 0 8 0 amappl3 88 813 0 808 1 0 1 1 0 8 0 amappl2 80 24812 0 24775 2 0 2 2 0 8 0 amappl1 72 63023 0 62665 26 17 9 19 0 8 0 amappl 72 7121 0 7095 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 137 0 8 3 0 3 3 0 8 0 uaddrrnd 24 2902 0 2891 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 2902 0 2891 1 0 1 1 0 8 0 vmmpekpl 168 23755 0 23736 2 0 2 2 0 8 0 vmmpepl 168 314121 0 312892 199 123 76 83 0 357 12 vmsppl 264 2901 0 2891 7 6 1 2 0 8 0 pdppl 4096 5810 0 5782 5 0 5 5 0 8 0 pvpl 32 1080017 0 1070140 502 276 226 226 0 265 126 pmappl 192 2901 0 2891 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 902 0 329 22 4 18 19 0 8 0