panic: pool_do_get: shmpl free list modified: page 0xfffffd806c3d7000; item addr 0xfffffd806c3d7c40; offset 0x40=0x69f21755 Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 133218 45422 32767 0x10 0 0 syz-executor *312081 45422 32767 0x10 0x4000000 1K syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff83449330) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff8397fde8,1,ffff80003c432d18) at pool_do_get+0x5df pool_get(ffffffff8397fde8,1) at pool_get+0x162 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff8000fffe7248,ffff80003c432f70,0,ffff80003c432ec0) at shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 sys_shmget(ffff8000fffe7248,ffff80003c432f70,ffff80003c432ec0) at sys_shmget+0x195 sys/kern/sysv_shm.c:484 syscall(ffff80003c432f70) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c432f70) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x4f35c773ca0, 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 0xfffffd806c3d7000; item addr 0xfffffd806c3d7c40; offset 0x40=0x69f21755 ddb{1}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff83449330) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff8397fde8,1,ffff80003c432d18) at pool_do_get+0x5df pool_get(ffffffff8397fde8,1) at pool_get+0x162 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff8000fffe7248,ffff80003c432f70,0,ffff80003c432ec0) at shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 sys_shmget(ffff8000fffe7248,ffff80003c432f70,ffff80003c432ec0) at sys_shmget+0x195 sys/kern/sysv_shm.c:484 syscall(ffff80003c432f70) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c432f70) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x4f35c773ca0, count: -8 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff80003c432b40 rbx 0xffff8000299aee07 rdx 0xffff8000015d3540 rcx 0xffff8000fffe7248 rax 0xffff8000299adff0 r8 0x101010101010101 r9 0x8080808080808080 r10 0x21c9f46aa5323e41 r11 0x964bcdf65ac00fa2 r12 0xffff8000299aec08 r13 0 r14 0 r15 0x1 rip 0xffffffff828baef5 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80003c432b30 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor) tid=312081 pid=45422 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=0xffff8000fffe6a80,0xffff8000fffe7a20 process=0xffff80003b7deb70 user=0xffff80003c42e000, vmspace=0xfffffd806c938030 estcpu=36, cpticks=2, pctcpu=0.0, user=0, sys=2, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 83551 481421 76201 32767 2 0x10 syz-executor 83551 506283 76201 32767 3 0x4000090 fsleep syz-executor 45422 133218 93759 32767 7 0x10 syz-executor *45422 312081 93759 32767 7 0x4000010 syz-executor 38647 63646 2656 32767 2 0x10 syz-executor 38647 442130 2656 32767 3 0x4000090 fsleep syz-executor 77401 331201 49752 32767 2 0x10 syz-executor 77401 208396 49752 32767 3 0x4000090 ttyin syz-executor 59014 40214 6017 32767 3 0x90 nanoslp syz-executor 59014 360989 6017 32767 3 0x4000090 kqsel syz-executor 59014 414782 6017 32767 3 0x4000090 fsleep syz-executor 4066 494934 9304 32767 3 0x90 nanoslp syz-executor 4066 489589 9304 32767 3 0x4000090 netacc syz-executor 4066 197848 9304 32767 3 0x4000090 fsleep syz-executor 74282 20098 14313 32767 3 0x90 nanoslp syz-executor 74282 340919 14313 32767 3 0x4000090 semwait syz-executor 74282 392541 14313 32767 3 0x4000090 fsleep syz-executor 21447 24392 991 32767 3 0x90 nanoslp syz-executor 21447 363824 991 32767 3 0x4000090 ttyin syz-executor 21447 72720 991 32767 3 0x4000090 fsleep syz-executor 93759 65842 44625 32767 3 0x90 nanoslp syz-executor 76201 28676 76805 32767 3 0x90 nanoslp syz-executor 49752 196096 34002 32767 3 0x90 nanoslp syz-executor 2656 224446 72640 32767 3 0x90 nanoslp syz-executor 9304 280736 21426 32767 3 0x90 nanoslp syz-executor 991 206261 22987 32767 3 0x90 nanoslp syz-executor 6017 143647 39845 32767 3 0x90 nanoslp syz-executor 14313 282652 73057 32767 3 0x90 nanoslp syz-executor 72640 57593 9976 0 3 0x82 wait syz-executor 21426 326900 9976 0 3 0x82 wait syz-executor 22987 425530 9976 0 3 0x82 wait syz-executor 39845 262551 9976 0 3 0x82 wait syz-executor 44625 326920 9976 0 3 0x82 wait syz-executor 34002 355042 9976 0 3 0x82 wait syz-executor 73057 508394 9976 0 3 0x82 wait syz-executor 76805 184935 9976 0 3 0x82 wait syz-executor 9976 249774 35587 0 3 0x82 kqread syz-executor 35587 287595 800 0 3 0x10008a sigsusp ksh 800 455231 94743 0 3 0x98 kqread sshd-session 94743 518144 37709 0 3 0x92 kqread sshd-session 38317 140743 1 0 3 0x100083 ttyin getty 37709 294181 1 0 3 0x88 kqread sshd 76113 480991 75209 73 3 0x1100090 kqread syslogd 75209 427543 1 0 3 0x100082 sbwait syslogd 6288 266782 1 0 3 0x100080 kqread resolvd 46759 501144 35395 77 3 0x100092 kqread dhcpleased 48083 94019 35395 77 3 0x100092 kqread dhcpleased 35395 62178 1 0 3 0x80 kqread dhcpleased 73156 211677 0 0 3 0x14200 bored smr 18617 260394 0 0 2 0x14200 zerothread 59444 14644 0 0 3 0x14200 aiodoned aiodoned 50464 321505 0 0 3 0x14200 syncer update 14175 416298 0 0 3 0x14200 cleaner cleaner 77358 41368 0 0 3 0x14200 reaper reaper 20667 377689 0 0 3 0x14200 pgdaemon pagedaemon 39370 258726 0 0 3 0x14200 bored viomb 617 280084 0 0 3 0x40014200 acpi0 acpi0 88029 402911 0 0 3 0x40014200 idle1 43409 503284 0 0 3 0x14200 bored softnet1 51779 353199 0 0 3 0x14200 bored softnet0 43181 419481 0 0 3 0x14200 bored systqmp 75457 213491 0 0 3 0x14200 bored systq 89086 226837 0 0 3 0x14200 tmoslp softclockmp 14249 489179 0 0 3 0x40014200 tmoslp softclock 1722 36617 0 0 3 0x40014200 idle0 1 281595 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 (0xffffffff8397fe00) #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+0x4b4 sys/kern/kern_lock.c:487 #2 pool_get+0x124 sys/kern/subr_pool.c:585 #3 shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 #4 sys_shmget+0x195 sys/kern/sysv_shm.c:484 #5 syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] #5 syscall+0xb17 sys/arch/amd64/amd64/trap.c:783 #6 Xsyscall+0x128 Process 45422 (syz-executor) thread 0xffff8000fffe7248 (312081) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff83992000) #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:783 #2 Xsyscall+0x128 exclusive mutex shmpl r = 0 (0xffffffff8397fe00) #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+0x4b4 sys/kern/kern_lock.c:487 #2 pool_get+0x124 sys/kern/subr_pool.c:585 #3 shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 #4 sys_shmget+0x195 sys/kern/sysv_shm.c:484 #5 syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] #5 syscall+0xb17 sys/arch/amd64/amd64/trap.c:783 #6 Xsyscall+0x128 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 11053 12018K 12034K 166960K 12144 0 pcb 17 12K 12K 166960K 17 0 rtable 237 6K 7K 166960K 349 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 70 37K 37K 166960K 70 0 ioctlops 0 0K 2K 166960K 30 0 iov 0 0K 1K 166960K 4 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1287 81K 81K 166960K 1353 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 4 0 VM map 2 1K 1K 166960K 2 0 sem 13 0K 1K 166960K 73 0 dirhash 12 2K 2K 166960K 15 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 26 97K 125K 166960K 168 0 proc 61 115K 147K 166960K 505 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 1 0K 0K 166960K 8 0 in_multi 101 7K 7K 166960K 102 0 ether_multi 2 0K 0K 166960K 2 0 mrt 0 0K 0K 166960K 1 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 61 281K 281K 166960K 61 0 exec 0 0K 1K 166960K 357 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 259 152K 169K 166960K 3192 0 UVM aobj 4 2K 2K 166960K 5 0 pinsyscall 47 94K 114K 166960K 1232 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 1 0K 0K 166960K 1 0 NDP 27 2K 2K 166960K 27 0 temp 36 9074K 9138K 166960K 3888 0 kqueue 17 26K 28K 166960K 30 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 38 0 35 1 0 1 1 0 8 0 rtentry 176 111 0 1 5 0 5 5 0 8 0 unpcb 144 50 0 30 2 0 2 2 0 8 1 syncache 336 4 0 4 1 0 1 1 0 8 1 tcpqe 32 1 0 1 1 0 1 1 0 8 1 tcpcb 736 90 0 80 7 0 7 7 0 8 5 arp 136 18 0 0 1 0 1 1 0 8 0 inpcb 328 152 0 135 7 0 7 7 0 8 5 ip6q 72 1 0 0 1 0 1 1 0 8 0 ip6af 40 1 0 0 1 0 1 1 0 8 0 nd6 152 24 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 452 0 0 29 0 29 29 0 8 0 art_table 40 453 0 0 5 0 5 5 0 8 0 art_node 32 111 0 11 1 0 1 1 0 8 0 semupl 112 1 0 0 1 0 1 1 0 8 0 semapl 112 70 0 60 1 0 1 1 0 8 0 shmpl 112 2 0 1 1 0 1 1 0 8 0 pool(0xffffffff8397fde8:shmpl): page inconsistency: page 0xfffffd806c3d7000; 33 on list, 1 missing, 35 items per page dirhash 1024 19 0 2 3 0 3 3 0 8 0 dino2pl 256 1599 0 134 92 0 92 92 0 8 0 ffsino 296 1599 0 134 114 0 114 114 0 8 1 nchpl 144 1830 0 134 63 0 63 63 0 8 0 vnodes 216 1680 0 0 94 0 94 94 0 8 0 namei 1024 5382 0 5382 1 0 1 1 0 8 1 percpumem 16 50 0 0 1 0 1 1 0 8 0 kstatmem 264 25 0 0 2 0 2 2 0 8 0 scxspl 216 6160 0 6160 3 0 3 3 1 8 3 plimitpl 152 101 0 76 2 0 2 2 0 8 1 sigapl 424 455 0 401 7 0 7 7 0 8 0 knotepl 120 80 0 0 3 0 3 3 0 8 0 kqueuepl 224 28 0 15 1 0 1 1 0 8 0 pipepl 344 119 0 92 3 0 3 3 0 8 0 fdescpl 528 439 0 401 4 0 4 4 0 8 1 filepl 160 1617 0 1383 13 0 13 13 0 8 2 lockfpl 104 9 0 6 1 0 1 1 0 8 0 lockfspl 48 6 0 3 1 0 1 1 0 8 0 sessionpl 144 23 0 7 1 0 1 1 0 8 0 pgrppl 48 31 0 7 1 0 1 1 0 8 0 ucredpl 104 123 0 104 1 0 1 1 0 8 0 zombiepl 144 401 0 401 1 0 1 1 0 8 1 processpl 1232 455 0 401 5 0 5 5 0 8 0 procpl 664 508 0 442 6 0 6 6 0 8 0 sockpl 752 240 0 200 11 0 11 11 0 8 6 mcl64k 65536 1 0 0 1 0 1 1 0 8 0 mcl8k 8192 1 0 0 1 0 1 1 0 8 0 mcl4k 4096 126 0 0 16 0 16 16 0 8 0 mcl2k 2048 23 0 0 3 0 3 3 0 8 0 mtagpl 96 3 0 0 1 0 1 1 0 8 0 mbufpl 256 212 0 0 14 0 14 14 0 8 0 bufpl 280 2254 0 102 154 0 154 154 0 8 0 anonpl 32 3677 0 0 30 0 30 30 0 246 0 amapchunkpl 152 8860 0 8272 24 0 24 24 0 158 1 amappl16 200 1613 0 1592 5 0 5 5 0 8 3 amappl15 192 22 0 22 2 1 1 1 0 8 1 amappl14 184 402 0 401 1 0 1 1 0 8 0 amappl13 176 107 0 97 1 0 1 1 0 8 0 amappl12 168 677 0 640 2 0 2 2 0 8 0 amappl11 160 20 0 20 2 1 1 1 0 8 1 amappl10 152 62 0 52 1 0 1 1 0 8 0 amappl9 144 259 0 259 1 0 1 1 0 8 1 amappl8 136 95 0 94 1 0 1 1 0 8 0 amappl7 128 211 0 200 1 0 1 1 0 8 0 amappl6 120 167 0 165 1 0 1 1 0 8 0 amappl5 112 90 0 81 1 0 1 1 0 8 0 amappl4 104 256 0 240 1 0 1 1 0 8 0 amappl3 96 1509 0 1371 5 1 4 4 0 8 0 amappl2 88 496 0 442 2 0 2 2 0 8 0 amappl1 80 9510 0 8920 16 0 16 16 0 8 0 amappl 88 2519 0 2325 5 0 5 5 0 92 0 uvmvnodes 80 97 0 0 2 0 2 2 0 8 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 4 0 1 1 0 1 1 0 8 0 uaddrrnd 24 439 0 401 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 439 0 401 1 0 1 1 0 8 0 vmmpekpl 168 5219 0 5184 2 0 2 2 0 8 0 vmmpepl 168 36406 0 34290 104 0 104 104 0 357 9 vmsppl 488 438 0 401 7 1 6 6 0 8 0 rwobjpl 80 13574 0 12606 24 0 24 24 0 8 1 pdppl 4096 885 0 802 107 10 97 97 0 8 14 pvpl 32 11063 0 0 90 0 90 90 0 265 0 pmappl 256 438 0 401 4 1 3 3 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 283 0 13 8 0 8 8 0 8 0 ddb{1}> machine ddbcpu 0 Stopped at x86_ipi_db+0x27: addq $0x8,%rsp x86_ipi_db(ffffffff83944ff0) 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(ffffffff83991800) at __mp_lock+0x192 __mp_lock_spin sys/kern/kern_lock.c:142 [inline] __mp_lock(ffffffff83991800) at __mp_lock+0x192 sys/kern/kern_lock.c:173 softintr_dispatch(0) at softintr_dispatch+0x125 sys/kern/kern_softintr.c:83 dosoftint(0) at dosoftint+0x54 sys/arch/amd64/amd64/intr.c:862 Xsoftclock() at Xsoftclock+0x27 end of kernel end trace frame: 0x74aa0a740a90, count: 8 ddb{0}> trace x86_ipi_db(ffffffff83944ff0) 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(ffffffff83991800) at __mp_lock+0x192 __mp_lock_spin sys/kern/kern_lock.c:142 [inline] __mp_lock(ffffffff83991800) at __mp_lock+0x192 sys/kern/kern_lock.c:173 softintr_dispatch(0) at softintr_dispatch+0x125 sys/kern/kern_softintr.c:83 dosoftint(0) at dosoftint+0x54 sys/arch/amd64/amd64/intr.c:862 Xsoftclock() at Xsoftclock+0x27 end of kernel end trace frame: 0x74aa0a740a90, 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(ffffffff83449330) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff8397fde8,1,ffff80003c432d18) at pool_do_get+0x5df pool_get(ffffffff8397fde8,1) at pool_get+0x162 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff8000fffe7248,ffff80003c432f70,0,ffff80003c432ec0) at shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 sys_shmget(ffff8000fffe7248,ffff80003c432f70,ffff80003c432ec0) at sys_shmget+0x195 sys/kern/sysv_shm.c:484 syscall(ffff80003c432f70) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c432f70) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x4f35c773ca0, count: 7 ddb{1}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff83449330) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff8397fde8,1,ffff80003c432d18) at pool_do_get+0x5df pool_get(ffffffff8397fde8,1) at pool_get+0x162 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff8000fffe7248,ffff80003c432f70,0,ffff80003c432ec0) at shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 sys_shmget(ffff8000fffe7248,ffff80003c432f70,ffff80003c432ec0) at sys_shmget+0x195 sys/kern/sysv_shm.c:484 syscall(ffff80003c432f70) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c432f70) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x4f35c773ca0, count: -8