panic: pool_do_get: shmpl free list modified: page 0xfffffd805f644000; item addr 0xfffffd805f644cb0; offset 0x40=0x67acbb56 Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 303119 60997 32767 0x10 0 0 syz-executor *493661 60997 32767 0x10 0x4000000 1K syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff833a6a27) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff83989de0,1,ffff80003c522b08) at pool_do_get+0x5da pool_get(ffffffff83989de0,1) at pool_get+0x149 shmget_allocate_segment(ffff8000ffff4548,ffff80003c522d60,143,ffff80003c522cb0) at shmget_allocate_segment+0x1a7 sys_shmget(ffff8000ffff4548,ffff80003c522d60,ffff80003c522cb0) at sys_shmget+0x1b2 sys/kern/sysv_shm.c:482 syscall(ffff80003c522d60) at syscall+0xb08 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c522d60) at syscall+0xb08 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x217db410b90, count: 7 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 *cpu1: pool_do_get: shmpl free list modified: page 0xfffffd805f644000; item addr 0xfffffd805f644cb0; offset 0x40=0x67acbb56 ddb{1}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff833a6a27) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff83989de0,1,ffff80003c522b08) at pool_do_get+0x5da pool_get(ffffffff83989de0,1) at pool_get+0x149 shmget_allocate_segment(ffff8000ffff4548,ffff80003c522d60,143,ffff80003c522cb0) at shmget_allocate_segment+0x1a7 sys_shmget(ffff8000ffff4548,ffff80003c522d60,ffff80003c522cb0) at sys_shmget+0x1b2 sys/kern/sysv_shm.c:482 syscall(ffff80003c522d60) at syscall+0xb08 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c522d60) at syscall+0xb08 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x217db410b90, count: -8 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff80003c522940 rbx 0xffff800029aacdc7 rdx 0xffff800001437cc0 rcx 0xffff8000ffff4548 rax 0xffff800029aabff0 r8 0x101010101010101 r9 0x8080808080808080 r10 0xf7f55af13859de94 r11 0xbbaf7ba7ec499a44 r12 0xffff800029aacbc8 r13 0 r14 0 r15 0x1 rip 0xffffffff81809c75 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80003c522930 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor) tid=493661 pid=60997 tcnt=2 stat=onproc flags process=10 proc=4000000 runpri=32, usrpri=86, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff8000ffff5c58,0xffff8000ffff7220 process=0xffff80003c4fb020 user=0xffff80003c51d000, vmspace=0xfffffd806c142578 estcpu=36, cpticks=2, pctcpu=0.0, user=1, sys=1, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 77344 417221 62756 32767 2 0x10 syz-executor 77344 263313 62756 32767 2 0x4000010 syz-executor 77344 47276 62756 32767 2 0x4000010 syz-executor 60997 303119 2377 32767 7 0x10 syz-executor *60997 493661 2377 32767 7 0x4000010 syz-executor 22315 35110 20400 32767 2 0x10 syz-executor 22315 444588 20400 32767 3 0x4000090 fsleep syz-executor 77395 381260 37208 32767 2 0x10 syz-executor 77395 410769 37208 32767 3 0x4000090 fsleep syz-executor 77395 326977 37208 32767 3 0x4000090 fsleep syz-executor 77395 82875 37208 32767 3 0x4000090 fsleep syz-executor 7660 134154 36329 32767 3 0x90 nanoslp syz-executor 7660 479504 36329 32767 3 0x4000090 sbwait syz-executor 7660 448780 36329 32767 3 0x4000090 fsleep syz-executor 7660 344811 36329 32767 3 0x4000090 fsleep syz-executor 36176 402324 37544 32767 3 0x90 nanoslp syz-executor 36176 429810 37544 32767 3 0x4000090 lockf syz-executor 36176 264531 37544 32767 3 0x4000090 fsleep syz-executor 33216 404298 0 0 3 0x14200 bored sosplice 82060 468352 3212 0 3 0x100082 sbwait arp 3212 204203 86602 0 3 0x10008a sigsusp sh 82375 173549 74823 32767 3 0x90 nanoslp syz-executor 37208 416888 62015 32767 3 0x90 nanoslp syz-executor 36329 498399 61106 32767 3 0x90 nanoslp syz-executor 37544 510704 22522 32767 3 0x90 nanoslp syz-executor 2377 260556 48831 32767 3 0x90 nanoslp syz-executor 86602 201141 93879 0 3 0x80 wait syz-executor 20400 431380 62540 32767 3 0x90 nanoslp syz-executor 62756 455815 26084 32767 3 0x90 nanoslp syz-executor 22522 438943 38382 0 3 0x82 wait syz-executor 93879 417377 38382 0 3 0x82 wait syz-executor 62015 513301 38382 0 3 0x82 wait syz-executor 62540 504570 38382 0 3 0x82 wait syz-executor 26084 452195 38382 0 3 0x82 wait syz-executor 48831 271098 38382 0 3 0x82 wait syz-executor 61106 467289 38382 0 3 0x82 wait syz-executor 74823 240150 38382 0 3 0x82 wait syz-executor 38382 269006 69754 0 3 0x82 kqread syz-executor 69754 206317 75776 0 3 0x10008a sigsusp ksh 75776 176634 31438 0 3 0x98 kqread sshd-session 31438 43920 67201 0 3 0x92 kqread sshd-session 1848 3529 1 0 3 0x100083 ttyin getty 67201 482427 1 0 3 0x88 kqread sshd 35142 474531 78703 73 3 0x1100090 kqread syslogd 78703 27445 1 0 3 0x100082 sbwait syslogd 9162 300398 1 0 3 0x100080 kqread resolvd 13794 61684 98946 77 3 0x100092 kqread dhcpleased 61760 462532 98946 77 3 0x100092 kqread dhcpleased 98946 197356 1 0 3 0x80 kqread dhcpleased 43725 436143 0 0 3 0x14200 bored smr 25361 251631 0 0 2 0x14200 zerothread 62555 95176 0 0 3 0x14200 aiodoned aiodoned 16741 497087 0 0 3 0x14200 syncer update 42504 167602 0 0 3 0x14200 cleaner cleaner 68765 71928 0 0 3 0x14200 reaper reaper 69116 508561 0 0 3 0x14200 pgdaemon pagedaemon 55334 346219 0 0 3 0x14200 bored viomb 84978 97435 0 0 3 0x40014200 acpi0 acpi0 75918 511562 0 0 3 0x40014200 idle1 38151 473036 0 0 3 0x14200 bored softnet3 65459 117018 0 0 3 0x14200 bored softnet2 18084 92088 0 0 3 0x14200 bored softnet1 81551 351647 0 0 3 0x14200 bored softnet0 68186 486295 0 0 3 0x14200 bored systqmp 15567 224871 0 0 3 0x14200 bored systq 41167 238900 0 0 3 0x14200 tmoslp softclockmp 14318 349863 0 0 3 0x40014200 tmoslp softclock 8396 262415 0 0 3 0x40014200 idle0 1 43777 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks CPU 1: exclusive mutex shmpl r = 0 (0xffffffff83989df8) #0 witness_lock+0x5bb stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5bb sys/kern/subr_witness.c:1155 #1 mtx_enter_try+0x178 #2 mtx_enter+0x60 sys/kern/kern_lock.c:239 #3 pool_get+0x10b sys/kern/subr_pool.c:583 #4 shmget_allocate_segment+0x1a7 #5 sys_shmget+0x1b2 sys/kern/sysv_shm.c:482 #6 syscall+0xb08 mi_syscall sys/sys/syscall_mi.h:176 [inline] #6 syscall+0xb08 sys/arch/amd64/amd64/trap.c:577 #7 Xsyscall+0x128 Process 60997 (syz-executor) thread 0xffff8000ffff4548 (493661) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff83983558) #0 witness_lock+0x5bb stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5bb sys/kern/subr_witness.c:1155 #1 syscall+0xae6 mi_syscall sys/sys/syscall_mi.h:176 [inline] #1 syscall+0xae6 sys/arch/amd64/amd64/trap.c:577 #2 Xsyscall+0x128 exclusive mutex shmpl r = 0 (0xffffffff83989df8) #0 witness_lock+0x5bb stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5bb sys/kern/subr_witness.c:1155 #1 mtx_enter_try+0x178 #2 mtx_enter+0x60 sys/kern/kern_lock.c:239 #3 pool_get+0x10b sys/kern/subr_pool.c:583 #4 shmget_allocate_segment+0x1a7 #5 sys_shmget+0x1b2 sys/kern/sysv_shm.c:482 #6 syscall+0xb08 mi_syscall sys/sys/syscall_mi.h:176 [inline] #6 syscall+0xb08 sys/arch/amd64/amd64/trap.c:577 #7 Xsyscall+0x128 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10189 10954K 10966K 166960K 11268 0 pcb 17 12K 12K 166960K 17 0 rtable 220 6K 6K 166960K 325 0 pf 31 16K 16K 166960K 31 0 ifaddr 40 7K 7K 166960K 42 0 ifgroup 50 2K 2K 166960K 50 0 sysctl 1 1K 1K 166960K 1 0 counters 64 36K 36K 166960K 64 0 ioctlops 0 0K 2K 166960K 31 0 iov 0 0K 8K 166960K 3 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1332 84K 84K 166960K 1350 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 5 0 VM map 2 1K 1K 166960K 2 0 sem 3 0K 0K 166960K 5 0 dirhash 12 2K 2K 166960K 12 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 27 101K 125K 166960K 203 0 proc 58 79K 115K 166960K 470 0 subproc 72 4K 4K 166960K 72 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 9 0 in_multi 89 6K 6K 166960K 89 0 ether_multi 1 0K 0K 166960K 1 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 79 360K 360K 166960K 79 0 exec 0 0K 1K 166960K 404 0 fusefs mount 1 32K 32K 166960K 1 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 258 74K 74K 166960K 3145 0 UVM aobj 5 2K 2K 166960K 7 0 pinsyscall 49 98K 115K 166960K 1186 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 7 0 NDP 11 0K 1K 166960K 25 0 temp 36 8634K 8698K 166960K 4059 0 kqueue 14 22K 32K 166960K 41 0 SYN cache 2 16K 16K 166960K 2 0 ddb{1}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle plcache 128 24 0 0 1 0 1 1 0 8 0 rtpcb 120 36 0 32 1 0 1 1 0 8 0 rtentry 112 104 0 1 3 0 3 3 0 8 0 unpcb 144 85 0 63 1 0 1 1 0 8 0 syncache 336 4 0 4 1 0 1 1 0 8 1 tcpcb 808 31 0 26 1 0 1 1 0 8 0 arp 120 17 0 0 1 0 1 1 0 8 0 inpcb 376 113 0 104 2 0 2 2 0 8 0 nd6 136 22 0 0 1 0 1 1 0 8 0 kcovpl 48 8 0 0 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 416 0 0 26 0 26 26 0 8 0 art_table 32 417 0 0 4 0 4 4 0 8 0 art_node 16 103 0 9 1 0 1 1 0 8 0 sysvmsgpl 40 1 0 1 1 0 1 1 0 8 1 semapl 112 2 0 1 1 0 1 1 0 8 0 shmpl 112 4 0 2 1 0 1 1 0 8 0 pool(0xffffffff83989de0:shmpl): page inconsistency: page 0xfffffd805f644000; 32 on list, 2 missing, 35 items per page dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1625 0 122 95 0 95 95 0 8 0 ffsino 280 1625 0 122 108 0 108 108 0 8 0 nchpl 144 1899 0 229 63 0 63 63 0 8 0 uvmvnodes 80 1706 0 0 35 0 35 35 0 8 0 vnodes 216 1706 0 0 95 0 95 95 0 8 0 namei 1024 5710 0 5710 2 0 2 2 0 8 2 percpumem 16 46 0 0 1 0 1 1 0 8 0 kstatmem 264 22 0 0 2 0 2 2 0 8 0 scxspl 216 6176 0 6176 3 1 2 2 1 8 2 plimitpl 152 53 0 28 2 0 2 2 0 8 0 sigapl 424 474 0 416 8 0 8 8 0 8 0 futexpl 64 890 0 883 1 0 1 1 0 8 0 knotepl 120 565 0 0 18 0 18 18 0 8 0 kqueuepl 216 47 0 35 1 0 1 1 0 8 0 pipepl 328 102 0 75 3 0 3 3 0 8 0 fdescpl 504 455 0 416 7 1 6 6 0 8 0 filepl 152 1702 0 1472 10 0 10 10 0 8 0 lockfpl 104 24 0 19 1 0 1 1 0 8 0 lockfspl 48 10 0 7 1 0 1 1 0 8 0 sessionpl 144 21 0 5 1 0 1 1 0 8 0 pgrppl 48 31 0 7 1 0 1 1 0 8 0 ucredpl 104 183 0 165 1 0 1 1 0 8 0 zombiepl 144 417 0 416 1 0 1 1 0 8 0 processpl 1168 474 0 416 5 0 5 5 0 8 0 procpl 656 588 0 518 7 0 7 7 0 8 1 sosppl 168 1 0 1 1 0 1 1 0 8 1 sockpl 688 234 0 199 4 0 4 4 0 8 0 mcl64k 65536 4 0 0 1 0 1 1 0 8 0 mcl16k 16384 4 0 0 1 0 1 1 0 8 0 mcl12k 12288 1 0 0 1 0 1 1 0 8 0 mcl8k 8192 4 0 0 1 0 1 1 0 8 0 mcl4k 4096 112 0 0 14 0 14 14 0 8 0 mcl2k 2048 37 0 0 5 0 5 5 0 8 0 mtagpl 96 3 0 0 1 0 1 1 0 8 0 mbufpl 256 312 0 0 20 0 20 20 0 8 0 bufpl 280 2383 0 124 162 0 162 162 0 8 0 anonpl 24 103862 0 100317 48 0 48 48 0 184 15 amapchunkpl 152 9679 0 9076 26 1 25 26 0 158 1 amappl16 200 2181 0 2159 14 0 14 14 0 8 10 amappl15 192 4 0 4 1 1 0 1 0 8 0 amappl14 184 126 0 115 1 0 1 1 0 8 0 amappl13 176 5 0 5 1 1 0 1 0 8 0 amappl12 168 1040 0 1001 3 0 3 3 0 8 1 amappl11 160 54 0 44 1 0 1 1 0 8 0 amappl10 152 6 0 5 1 0 1 1 0 8 0 amappl9 144 260 0 260 1 1 0 1 0 8 0 amappl8 136 23 0 21 1 0 1 1 0 8 0 amappl7 128 92 0 81 1 0 1 1 0 8 0 amappl6 120 165 0 161 1 0 1 1 0 8 0 amappl5 112 116 0 110 1 0 1 1 0 8 0 amappl4 104 273 0 256 1 0 1 1 0 8 0 amappl3 96 1583 0 1442 4 0 4 4 0 8 0 amappl2 88 589 0 531 2 0 2 2 0 8 0 amappl1 80 7501 0 6926 14 0 14 14 0 8 0 amappl 88 2815 0 2608 5 0 5 5 0 92 0 dma4096 4096 1 0 1 1 1 0 1 0 8 0 dma1024 1024 1 0 0 1 0 1 1 0 8 0 dma256 256 6 0 6 1 1 0 1 0 8 0 dma128 128 253 0 253 1 1 0 1 0 8 0 dma64 64 6 0 6 1 1 0 1 0 8 0 dma32 32 7 0 7 1 1 0 1 0 8 0 dma16 16 18 0 17 1 0 1 1 0 8 0 aobjpl 72 6 0 2 1 0 1 1 0 8 0 uaddrrnd 24 455 0 416 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 455 0 416 1 0 1 1 0 8 0 vmmpekpl 168 5205 0 5177 2 0 2 2 0 8 0 vmmpepl 168 34247 0 32162 101 0 101 101 0 357 5 vmsppl 456 454 0 416 7 1 6 6 0 8 0 rwobjpl 64 14408 0 11792 46 0 46 46 0 8 1 pdppl 4096 918 0 832 108 22 86 98 0 8 0 pvpl 32 17446 0 0 142 1 141 141 0 265 0 pmappl 248 454 0 416 4 1 3 3 0 8 0 extentpl 40 55 0 38 1 0 1 1 0 8 0 phpool 112 294 0 25 8 0 8 8 0 8 0 ddb{1}> machine ddbcpu 0 Stopped at x86_ipi_db+0x27: addq $0x8,%rsp x86_ipi_db(ffffffff837c2ff0) at x86_ipi_db+0x27 sys/arch/amd64/amd64/db_interface.c:393 x86_ipi_handler() at x86_ipi_handler+0xd9 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x27 __mp_lock(ffffffff83983350) at __mp_lock+0x192 __mp_lock_spin sys/kern/kern_lock.c:113 [inline] __mp_lock(ffffffff83983350) at __mp_lock+0x192 sys/kern/kern_lock.c:144 softintr_dispatch(0) at softintr_dispatch+0x5b sys/arch/amd64/amd64/softintr.c:88 Xsoftclock() at Xsoftclock+0x27 end of kernel end trace frame: 0x764f77cf2a70, count: 9 ddb{0}> trace x86_ipi_db(ffffffff837c2ff0) at x86_ipi_db+0x27 sys/arch/amd64/amd64/db_interface.c:393 x86_ipi_handler() at x86_ipi_handler+0xd9 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x27 __mp_lock(ffffffff83983350) at __mp_lock+0x192 __mp_lock_spin sys/kern/kern_lock.c:113 [inline] __mp_lock(ffffffff83983350) at __mp_lock+0x192 sys/kern/kern_lock.c:144 softintr_dispatch(0) at softintr_dispatch+0x5b sys/arch/amd64/amd64/softintr.c:88 Xsoftclock() at Xsoftclock+0x27 end of kernel end trace frame: 0x764f77cf2a70, count: -6 ddb{0}> machine ddbcpu 1 Stopped at db_enter+0x25: addq $0x8,%rsp db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff833a6a27) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff83989de0,1,ffff80003c522b08) at pool_do_get+0x5da pool_get(ffffffff83989de0,1) at pool_get+0x149 shmget_allocate_segment(ffff8000ffff4548,ffff80003c522d60,143,ffff80003c522cb0) at shmget_allocate_segment+0x1a7 sys_shmget(ffff8000ffff4548,ffff80003c522d60,ffff80003c522cb0) at sys_shmget+0x1b2 sys/kern/sysv_shm.c:482 syscall(ffff80003c522d60) at syscall+0xb08 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c522d60) at syscall+0xb08 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x217db410b90, count: 7 ddb{1}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff833a6a27) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff83989de0,1,ffff80003c522b08) at pool_do_get+0x5da pool_get(ffffffff83989de0,1) at pool_get+0x149 shmget_allocate_segment(ffff8000ffff4548,ffff80003c522d60,143,ffff80003c522cb0) at shmget_allocate_segment+0x1a7 sys_shmget(ffff8000ffff4548,ffff80003c522d60,ffff80003c522cb0) at sys_shmget+0x1b2 sys/kern/sysv_shm.c:482 syscall(ffff80003c522d60) at syscall+0xb08 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c522d60) at syscall+0xb08 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x217db410b90, count: -8