panic: pool_do_get: shmpl free list modified: page 0xfffffd805f94b000; item addr 0xfffffd805f94bd90; offset 0x40=0x68a6f9b4 Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 73750 84015 32767 0x10 0 0 syz-executor *505506 84015 32767 0x10 0x4000000 1K syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff8336cdbf) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff838ec720,1,ffff80003c4b6d78) at pool_do_get+0x5df pool_get(ffffffff838ec720,1) at pool_get+0x162 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff80003b01efc0,ffff80003c4b6fd0,113,ffff80003c4b6f20) at shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 sys_shmget(ffff80003b01efc0,ffff80003c4b6fd0,ffff80003c4b6f20) at sys_shmget+0x195 sys/kern/sysv_shm.c:482 syscall(ffff80003c4b6fd0) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c4b6fd0) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x65d09823390, 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 0xfffffd805f94b000; item addr 0xfffffd805f94bd90; offset 0x40=0x68a6f9b4 ddb{1}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff8336cdbf) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff838ec720,1,ffff80003c4b6d78) at pool_do_get+0x5df pool_get(ffffffff838ec720,1) at pool_get+0x162 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff80003b01efc0,ffff80003c4b6fd0,113,ffff80003c4b6f20) at shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 sys_shmget(ffff80003b01efc0,ffff80003c4b6fd0,ffff80003c4b6f20) at sys_shmget+0x195 sys/kern/sysv_shm.c:482 syscall(ffff80003c4b6fd0) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c4b6fd0) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x65d09823390, count: -8 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff80003c4b6ba0 rbx 0xffff8000299eeddf rdx 0xffff800001428740 rcx 0xffff80003b01efc0 rax 0xffff8000299edff0 r8 0x101010101010101 r9 0x8080808080808080 r10 0x485cbaee5f18ab82 r11 0x128f297ad55dc9bd r12 0xffff8000299eebe0 r13 0 r14 0 r15 0x1 rip 0xffffffff81d85995 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80003c4b6b90 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor) tid=505506 pid=84015 tcnt=2 stat=onproc flags process=10 proc=4000000 runpri=50, usrpri=86, slppri=17, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80003b01fa20,0xffffffff83875c30 process=0xffff80003c478500 user=0xffff80003c4b2000, vmspace=0xfffffd806b6caba0 estcpu=36, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 84015 73750 47103 32767 7 0x10 syz-executor *84015 505506 47103 32767 7 0x4000010 syz-executor 37949 26328 70399 32767 2 0x10 syz-executor 37949 386890 70399 32767 3 0x4000090 fsleep syz-executor 39059 324308 93190 32767 2 0x10 syz-executor 39059 242931 93190 32767 3 0x4000090 fsleep syz-executor 2161 3817 18892 32767 2 0x10 syz-executor 2161 387548 18892 32767 3 0x4000090 kqread syz-executor 59197 381126 82863 32767 3 0x90 nanoslp syz-executor 59197 159305 82863 32767 3 0x4000090 ttyretype syz-executor 59197 345225 82863 32767 3 0x4000090 fsleep syz-executor 67933 473550 0 0 3 0x14200 bored sosplice 26157 263930 20478 32767 3 0x90 nanoslp syz-executor 26157 119368 20478 32767 3 0x4000090 ttyout syz-executor 26157 184920 20478 32767 3 0x4000090 fsleep syz-executor 26157 228956 20478 32767 3 0x4000090 fsleep syz-executor 5004 55946 97144 32767 3 0x90 nanoslp syz-executor 5004 155695 97144 32767 3 0x4000090 netcon syz-executor 5004 340870 97144 32767 3 0x4000090 fsleep syz-executor 12697 250666 95018 32767 3 0x90 nanoslp syz-executor 12697 79702 95018 32767 3 0x4000090 lockf syz-executor 12697 471200 95018 32767 3 0x4000090 fsleep syz-executor 82863 9819 70636 32767 3 0x90 nanoslp syz-executor 95018 446263 57486 32767 3 0x90 nanoslp syz-executor 20478 434844 63413 32767 3 0x90 nanoslp syz-executor 47103 422217 79346 32767 3 0x90 nanoslp syz-executor 93190 446341 639 32767 3 0x90 nanoslp syz-executor 70399 67698 30328 32767 3 0x90 nanoslp syz-executor 18892 469713 16122 32767 3 0x90 nanoslp syz-executor 97144 208692 48782 32767 3 0x90 nanoslp syz-executor 57486 314383 70663 0 3 0x82 wait syz-executor 639 432297 70663 0 3 0x82 wait syz-executor 30328 153465 70663 0 3 0x82 wait syz-executor 16122 53874 70663 0 3 0x82 wait syz-executor 48782 223633 70663 0 3 0x82 wait syz-executor 63413 516382 70663 0 3 0x82 wait syz-executor 79346 84729 70663 0 3 0x82 wait syz-executor 70636 411188 70663 0 3 0x82 wait syz-executor 70663 24411 70581 0 3 0x82 kqread syz-executor 70581 168361 76399 0 3 0x10008a sigsusp ksh 76399 207957 25691 0 3 0x98 kqread sshd-session 25691 35230 88995 0 3 0x92 kqread sshd-session 24546 400675 1 0 3 0x100083 ttyin getty 88995 507452 1 0 3 0x88 kqread sshd 88815 228694 61651 73 3 0x1100090 kqread syslogd 61651 94586 1 0 3 0x100082 sbwait syslogd 66572 499539 1 0 3 0x100080 kqread resolvd 54016 368121 10051 77 3 0x100092 kqread dhcpleased 70124 336508 10051 77 3 0x100092 kqread dhcpleased 10051 515618 1 0 3 0x80 kqread dhcpleased 51576 157865 0 0 3 0x14200 bored smr 70225 88075 0 0 2 0x14200 zerothread 98978 500808 0 0 3 0x14200 aiodoned aiodoned 6406 463833 0 0 3 0x14200 syncer update 85297 71171 0 0 3 0x14200 cleaner cleaner 79656 300883 0 0 3 0x14200 reaper reaper 82831 407106 0 0 3 0x14200 pgdaemon pagedaemon 78315 190912 0 0 3 0x14200 bored viomb 67908 129801 0 0 3 0x40014200 acpi0 acpi0 26836 209091 0 0 3 0x40014200 idle1 27606 303947 0 0 3 0x14200 bored softnet7 24085 71512 0 0 3 0x14200 bored softnet6 77919 233623 0 0 3 0x14200 bored softnet5 32172 352812 0 0 3 0x14200 bored softnet4 71123 455855 0 0 3 0x14200 bored softnet3 86459 251031 0 0 3 0x14200 bored softnet2 20317 461700 0 0 3 0x14200 bored softnet1 91928 462975 0 0 3 0x14200 bored softnet0 75384 256140 0 0 3 0x14200 bored systqmp 31983 512396 0 0 3 0x14200 bored systq 36694 113536 0 0 3 0x14200 tmoslp softclockmp 85799 179094 0 0 3 0x40014200 tmoslp softclock 24272 483305 0 0 3 0x40014200 idle0 1 425802 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 (0xffffffff838ec738) #0 witness_lock+0x5f1 stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5f1 sys/kern/subr_witness.c:1160 #1 mtx_enter_try+0x1ad sys/kern/kern_lock.c:311 #2 mtx_enter+0x62 sys/kern/kern_lock.c:261 #3 pool_get+0x124 sys/kern/subr_pool.c:581 #4 shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 #5 sys_shmget+0x195 sys/kern/sysv_shm.c:482 #6 syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] #6 syscall+0xb17 sys/arch/amd64/amd64/trap.c:748 #7 Xsyscall+0x128 Process 84015 (syz-executor) thread 0xffff80003b01efc0 (505506) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff839950f0) #0 witness_lock+0x5f1 stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5f1 sys/kern/subr_witness.c:1160 #1 syscall+0xaf4 mi_syscall sys/sys/syscall_mi.h:175 [inline] #1 syscall+0xaf4 sys/arch/amd64/amd64/trap.c:748 #2 Xsyscall+0x128 exclusive mutex shmpl r = 0 (0xffffffff838ec738) #0 witness_lock+0x5f1 stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5f1 sys/kern/subr_witness.c:1160 #1 mtx_enter_try+0x1ad sys/kern/kern_lock.c:311 #2 mtx_enter+0x62 sys/kern/kern_lock.c:261 #3 pool_get+0x124 sys/kern/subr_pool.c:581 #4 shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 #5 sys_shmget+0x195 sys/kern/sysv_shm.c:482 #6 syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] #6 syscall+0xb17 sys/arch/amd64/amd64/trap.c:748 #7 Xsyscall+0x128 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10192 10956K 10968K 166960K 11270 0 pcb 17 12K 12K 166960K 17 0 rtable 209 5K 6K 166960K 261 0 pf 31 16K 16K 166960K 31 0 ifaddr 42 7K 7K 166960K 44 0 ifgroup 50 2K 2K 166960K 50 0 sysctl 1 1K 9K 166960K 5 0 counters 68 36K 36K 166960K 68 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 1334 84K 84K 166960K 1352 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 3 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 26 97K 125K 166960K 183 0 sigio 0 0K 0K 166960K 67 0 proc 58 99K 163K 166960K 474 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 6 0 in_multi 99 7K 7K 166960K 102 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 55 254K 254K 166960K 55 0 exec 0 0K 1K 166960K 340 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 266 168K 176K 166960K 3131 0 UVM aobj 3 2K 3K 166960K 4 0 pinsyscall 47 94K 110K 166960K 1185 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 2 0 NDP 13 0K 2K 166960K 27 0 temp 37 8638K 8702K 166960K 3800 0 kqueue 14 22K 29K 166960K 33 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 26 0 0 1 0 1 1 0 8 0 rtpcb 120 41 0 38 1 0 1 1 0 8 0 rtentry 176 97 0 1 5 0 5 5 0 8 0 unpcb 144 134 0 118 2 0 2 2 0 8 1 syncache 336 3 0 3 1 0 1 1 0 8 1 tcpcb 736 23 0 17 2 0 2 2 0 8 1 arp 128 12 0 0 1 0 1 1 0 8 0 inpcb 328 122 0 110 4 0 4 4 0 8 2 nd6 144 16 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 438 0 0 28 0 28 28 0 8 0 art_table 40 439 0 0 5 0 5 5 0 8 0 art_node 32 97 0 11 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 1 0 1 1 0 1 1 0 8 1 pool(0xffffffff838ec720:shmpl): page inconsistency: page 0xfffffd805f94b000; 34 on list, 0 missing, 35 items per page dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1596 0 92 95 0 95 95 0 8 0 ffsino 296 1596 0 92 116 0 116 116 0 8 0 nchpl 144 1829 0 151 63 0 63 63 0 8 0 uvmvnodes 80 1677 0 0 35 0 35 35 0 8 0 vnodes 216 1677 0 0 94 0 94 94 0 8 0 namei 1024 5302 0 5302 2 0 2 2 0 8 2 percpumem 16 49 0 0 1 0 1 1 0 8 0 kstatmem 264 24 0 0 2 0 2 2 0 8 0 scxspl 216 6504 0 6504 3 1 2 2 1 8 2 plimitpl 152 74 0 47 2 0 2 2 0 8 0 sigapl 424 461 0 400 8 0 8 8 0 8 0 knotepl 120 323 0 0 10 0 10 10 0 8 0 kqueuepl 224 128 0 117 5 0 5 5 0 8 4 pipepl 344 99 0 72 3 0 3 3 0 8 0 fdescpl 528 438 0 400 4 0 4 4 0 8 0 filepl 160 1661 0 1440 14 0 14 14 0 8 4 lockfpl 104 17 0 12 1 0 1 1 0 8 0 lockfspl 48 8 0 4 1 0 1 1 0 8 0 sessionpl 144 21 0 5 1 0 1 1 0 8 0 pgrppl 48 29 0 5 1 0 1 1 0 8 0 ucredpl 104 142 0 123 1 0 1 1 0 8 0 zombiepl 144 400 0 400 1 0 1 1 0 8 1 processpl 1232 461 0 400 7 1 6 6 0 8 0 procpl 664 544 0 470 7 0 7 7 0 8 0 sockpl 752 297 0 266 11 0 11 11 0 8 7 mcl64k 65536 1 0 0 1 0 1 1 0 8 0 mcl8k 8192 2 0 0 1 0 1 1 0 8 0 mcl4k 4096 126 0 0 16 0 16 16 0 8 0 mcl2k 2048 36 0 0 5 0 5 5 0 8 0 mtagpl 96 1 0 0 1 0 1 1 0 8 0 mbufpl 256 217 0 0 14 0 14 14 0 8 0 bufpl 280 2855 0 112 196 0 196 196 0 8 0 anonpl 32 4391 0 0 36 0 36 36 0 246 0 amapchunkpl 152 9092 0 8493 28 3 25 25 0 158 0 amappl16 200 1989 0 1969 5 0 5 5 0 8 2 amappl15 192 3 0 3 1 0 1 1 0 8 1 amappl14 184 103 0 93 1 0 1 1 0 8 0 amappl13 176 5 0 5 1 0 1 1 0 8 1 amappl12 168 1039 0 1001 2 0 2 2 0 8 0 amappl11 160 47 0 37 1 0 1 1 0 8 0 amappl10 152 41 0 41 1 0 1 1 0 8 1 amappl9 144 289 0 288 1 0 1 1 0 8 0 amappl8 136 42 0 41 1 0 1 1 0 8 0 amappl7 128 171 0 161 1 0 1 1 0 8 0 amappl6 120 203 0 199 1 0 1 1 0 8 0 amappl5 112 114 0 108 1 0 1 1 0 8 0 amappl4 104 262 0 246 1 0 1 1 0 8 0 amappl3 96 1472 0 1334 4 0 4 4 0 8 0 amappl2 88 590 0 536 2 0 2 2 0 8 0 amappl1 80 7915 0 7341 13 0 13 13 0 8 0 amappl 88 2514 0 2313 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 3 0 1 1 0 1 1 0 8 0 uaddrrnd 24 438 0 400 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 438 0 400 1 0 1 1 0 8 0 vmmpekpl 168 4982 0 4948 2 0 2 2 0 8 0 vmmpepl 168 34447 0 32302 98 0 98 98 0 357 3 vmsppl 488 437 0 400 7 1 6 6 0 8 0 rwobjpl 80 13954 0 11424 54 0 54 54 0 8 0 pdppl 4096 884 0 800 110 20 90 98 0 8 6 pvpl 32 11147 0 0 90 0 90 90 0 265 0 pmappl 256 437 0 400 4 1 3 3 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 286 0 23 8 0 8 8 0 8 0 ddb{1}> machine ddbcpu 0 Stopped at x86_ipi_db+0x27: addq $0x8,%rsp x86_ipi_db(ffffffff83855ff0) at x86_ipi_db+0x27 sys/arch/amd64/amd64/db_interface.c:394 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(ffffffff83994ee8) at __mp_lock+0x192 __mp_lock_spin sys/kern/kern_lock.c:134 [inline] __mp_lock(ffffffff83994ee8) at __mp_lock+0x192 sys/kern/kern_lock.c:165 softintr_dispatch(0) at softintr_dispatch+0x125 sys/kern/kern_softintr.c:83 dosoftint(0) at dosoftint+0x54 sys/arch/amd64/amd64/intr.c:847 Xsoftclock() at Xsoftclock+0x27 end of kernel end trace frame: 0x7e8bf9213d90, count: 8 ddb{0}> trace x86_ipi_db(ffffffff83855ff0) at x86_ipi_db+0x27 sys/arch/amd64/amd64/db_interface.c:394 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(ffffffff83994ee8) at __mp_lock+0x192 __mp_lock_spin sys/kern/kern_lock.c:134 [inline] __mp_lock(ffffffff83994ee8) at __mp_lock+0x192 sys/kern/kern_lock.c:165 softintr_dispatch(0) at softintr_dispatch+0x125 sys/kern/kern_softintr.c:83 dosoftint(0) at dosoftint+0x54 sys/arch/amd64/amd64/intr.c:847 Xsoftclock() at Xsoftclock+0x27 end of kernel end trace frame: 0x7e8bf9213d90, count: -7 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:438 panic(ffffffff8336cdbf) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff838ec720,1,ffff80003c4b6d78) at pool_do_get+0x5df pool_get(ffffffff838ec720,1) at pool_get+0x162 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff80003b01efc0,ffff80003c4b6fd0,113,ffff80003c4b6f20) at shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 sys_shmget(ffff80003b01efc0,ffff80003c4b6fd0,ffff80003c4b6f20) at sys_shmget+0x195 sys/kern/sysv_shm.c:482 syscall(ffff80003c4b6fd0) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c4b6fd0) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x65d09823390, count: 7 ddb{1}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff8336cdbf) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff838ec720,1,ffff80003c4b6d78) at pool_do_get+0x5df pool_get(ffffffff838ec720,1) at pool_get+0x162 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff80003b01efc0,ffff80003c4b6fd0,113,ffff80003c4b6f20) at shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 sys_shmget(ffff80003b01efc0,ffff80003c4b6fd0,ffff80003c4b6f20) at sys_shmget+0x195 sys/kern/sysv_shm.c:482 syscall(ffff80003c4b6fd0) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c4b6fd0) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x65d09823390, count: -8