panic: pool_do_get: shmpl free list modified: page 0xfffffd806c7b6000; item addr 0xfffffd806c7b6e70; offset 0x40=0x6a10f4da Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 405909 95733 32767 0x10 0 0 syz-executor *194606 95733 32767 0x10 0x4000000 1K syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff834abe55) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff83ac4fc8,2,ffff80002a33a748) at pool_do_get+0x5df pool_get(ffffffff83ac4fc8,2) at pool_get+0x162 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff8000fffe4fb8,ffff80002a33a9a0,a0,ffff80002a33a8f0) at shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 sys_shmget(ffff8000fffe4fb8,ffff80002a33a9a0,ffff80002a33a8f0) at sys_shmget+0x195 sys/kern/sysv_shm.c:501 syscall(ffff80002a33a9a0) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80002a33a9a0) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x2cb71be5760, 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 0xfffffd806c7b6000; item addr 0xfffffd806c7b6e70; offset 0x40=0x6a10f4da ddb{1}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff834abe55) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff83ac4fc8,2,ffff80002a33a748) at pool_do_get+0x5df pool_get(ffffffff83ac4fc8,2) at pool_get+0x162 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff8000fffe4fb8,ffff80002a33a9a0,a0,ffff80002a33a8f0) at shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 sys_shmget(ffff8000fffe4fb8,ffff80002a33a9a0,ffff80002a33a8f0) at sys_shmget+0x195 sys/kern/sysv_shm.c:501 syscall(ffff80002a33a9a0) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80002a33a9a0) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x2cb71be5760, count: -8 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff80002a33a570 rbx 0xffff80002999ee07 rdx 0 rcx 0xffff8000fffe4fb8 rax 0xffff80002999dff0 r8 0x101010101010101 r9 0x8080808080808080 r10 0x1c84ec141750937f r11 0x75955f079feeb624 r12 0xffff80002999ec08 r13 0 r14 0 r15 0x1 rip 0xffffffff827713b5 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80002a33a560 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor) tid=194606 pid=95733 tcnt=3 stat=onproc flags process=10 proc=4000000 runpri=32, usrpri=71, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff8000fffe5cb0,0xffff8000fffe4a98 process=0xffff8000fffe21d0 user=0xffff80002a335000, vmspace=0xfffffd806c6335e8 estcpu=21, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 87789 463370 15141 32767 2 0x10 syz-executor 87789 148133 15141 32767 2 0x4000010 syz-executor 95733 405909 66264 32767 7 0x10 syz-executor *95733 194606 66264 32767 7 0x4000010 syz-executor 95733 72197 66264 32767 3 0x4000090 fsleep syz-executor 39632 242947 53241 32767 2 0x10 syz-executor 39632 416529 53241 32767 3 0x4000090 fsleep syz-executor 33005 371199 91290 32767 2 0x10 syz-executor 33005 54851 91290 32767 2 0x4000010 syz-executor 44218 401054 52046 32767 2 0x10 syz-executor 44218 17348 52046 32767 2 0x4000010 syz-executor 855 507126 44240 32767 2 0x10 syz-executor 855 131554 44240 32767 2 0x4000010 syz-executor 18656 248650 21228 32767 3 0x90 nanoslp syz-executor 18656 171194 21228 32767 3 0x4000090 kqsel syz-executor 18656 64990 21228 32767 3 0x4000090 fsleep syz-executor 53241 307054 99051 32767 3 0x90 nanoslp syz-executor 99051 129901 73280 0 3 0x82 wait syz-executor 15141 453035 43945 32767 3 0x90 nanoslp syz-executor 66264 414206 41767 32767 3 0x90 nanoslp syz-executor 44240 339958 43966 32767 3 0x90 nanoslp syz-executor 91290 302801 62064 32767 3 0x90 nanoslp syz-executor 21228 39812 9766 32767 3 0x90 nanoslp syz-executor 52046 170776 24467 32767 3 0x90 nanoslp syz-executor 43945 71432 73280 0 3 0x82 wait syz-executor 41767 148046 73280 0 3 0x82 wait syz-executor 62064 58968 73280 0 3 0x82 wait syz-executor 24467 390981 73280 0 3 0x82 wait syz-executor 9766 407956 73280 0 3 0x82 wait syz-executor 43966 227100 73280 0 3 0x82 wait syz-executor 73280 12075 29443 0 3 0x82 nanoslp syz-executor 29443 412391 71838 0 3 0x10008a sigsusp ksh 71838 289772 38855 0 3 0x98 kqread sshd-session 38855 95451 64112 0 3 0x92 kqread sshd-session 20036 113898 1 0 3 0x100083 ttyin getty 64112 42772 1 0 3 0x88 kqread sshd 15343 447669 97673 73 3 0x1100090 kqread syslogd 97673 195642 1 0 3 0x100082 sbwait syslogd 18511 40238 1 0 3 0x100080 kqread resolvd 66711 392687 79711 77 3 0x100092 kqread dhcpleased 93127 10001 79711 77 3 0x100092 kqread dhcpleased 79711 158215 1 0 3 0x80 kqread dhcpleased 29243 313046 0 0 3 0x14200 bored smr 91839 240785 0 0 2 0x14200 zerothread 32482 507876 0 0 3 0x14200 aiodoned aiodoned 32426 246509 0 0 3 0x14200 syncer update 63447 145678 0 0 3 0x14200 cleaner cleaner 6361 141682 0 0 3 0x14200 reaper reaper 69150 27294 0 0 3 0x14200 pgdaemon pagedaemon 6647 233122 0 0 3 0x14200 bored viomb 28246 251233 0 0 3 0x40014200 acpi0 acpi0 39075 307311 0 0 3 0x40014200 idle1 40512 206192 0 0 3 0x14200 bored softnet1 39855 7862 0 0 3 0x14200 bored softnet0 40533 197377 0 0 3 0x14200 bored systqmp 356 251522 0 0 3 0x14200 bored systq 79239 78731 0 0 3 0x14200 tmoslp softclockmp 5174 90909 0 0 3 0x40014200 tmoslp softclock 4790 462457 0 0 3 0x40014200 idle0 1 248744 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 (0xffffffff83ac4fe0) #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:501 #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 95733 (syz-executor) thread 0xffff8000fffe4fb8 (194606) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff83a95640) #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 (0xffffffff83ac4fe0) #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:501 #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 11056 12017K 12034K 166960K 12153 0 pcb 17 12K 12K 166960K 17 0 rtable 219 6K 7K 166960K 387 0 pf 29 16K 16K 166960K 33 0 ifaddr 38 6K 7K 166960K 48 0 ifgroup 46 2K 2K 166960K 54 0 sysctl 1 1K 9K 166960K 5 0 counters 68 36K 37K 166960K 72 0 ioctlops 0 0K 2K 166960K 34 0 iov 0 0K 2K 166960K 3 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1288 81K 81K 166960K 1574 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 3 5K 5K 166960K 4 0 VM map 2 1K 1K 166960K 2 0 sem 9 1K 2K 166960K 11 0 dirhash 12 2K 2K 166960K 12 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 23 85K 121K 166960K 297 0 sigio 0 0K 0K 166960K 3 0 proc 59 115K 147K 166960K 542 0 subproc 63 3K 4K 166960K 126 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 30 0 in_multi 88 6K 7K 166960K 112 0 ether_multi 1 0K 0K 166960K 1 0 mrt 0 0K 0K 166960K 2 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 97 440K 440K 166960K 97 0 exec 0 0K 1K 166960K 386 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 227 151K 191K 166960K 4137 0 UVM aobj 3 2K 2K 166960K 4 0 pinsyscall 44 88K 109K 166960K 1403 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 3 0 NDP 12 0K 2K 166960K 30 0 temp 36 9111K 9176K 166960K 4617 0 kqueue 14 22K 25K 166960K 52 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 44 0 40 1 0 1 1 0 8 0 rtentry 176 125 0 24 6 0 6 6 0 8 0 unpcb 144 98 0 83 2 0 2 2 0 8 1 syncache 336 5 0 5 1 0 1 1 0 8 1 tcpcb 736 78 0 74 4 0 4 4 0 8 3 arp 136 20 0 4 1 0 1 1 0 8 0 inpcb 328 197 0 188 4 0 4 4 0 8 3 nd6 152 30 0 7 2 0 2 2 0 8 0 kcovpl 48 14 0 7 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 501 0 90 29 0 29 29 0 8 0 art_table 40 502 0 90 5 0 5 5 0 8 0 art_node 32 125 0 33 1 0 1 1 0 8 0 sysvmsgpl 40 4 0 0 1 0 1 1 0 8 0 semapl 64 8 0 1 1 0 1 1 0 8 0 shmpl 112 1 0 1 1 0 1 1 0 8 1 pool(0xffffffff83ac4fc8:shmpl): page inconsistency: page 0xfffffd806c7b6000; 34 on list, 0 missing, 35 items per page dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1881 0 410 93 0 93 93 0 8 0 ffsino 296 1881 0 410 114 0 114 114 0 8 0 nchpl 144 2235 0 536 64 0 64 64 0 8 0 vnodes 216 2016 0 0 112 0 112 112 0 8 0 namei 1024 7056 0 7056 1 0 1 1 0 8 1 percpumem 16 51 0 2 1 0 1 1 0 8 0 kstatmem 264 27 0 4 2 0 2 2 0 8 0 scxspl 216 6986 0 6986 4 3 1 3 1 8 1 plimitpl 152 63 0 40 2 0 2 2 0 8 0 sigapl 424 576 0 525 7 0 7 7 0 8 0 knotepl 120 505 0 0 16 0 16 16 0 8 0 kqueuepl 224 53 0 42 1 0 1 1 0 8 0 pipepl 344 151 0 123 3 0 3 3 0 8 0 fdescpl 528 560 0 525 3 0 3 3 0 8 0 filepl 160 2695 0 2497 14 0 14 14 0 8 4 lockfpl 104 34 0 32 1 0 1 1 0 8 0 lockfspl 48 14 0 12 1 0 1 1 0 8 0 sessionpl 144 109 0 94 1 0 1 1 0 8 0 pgrppl 48 124 0 102 1 0 1 1 0 8 0 ucredpl 104 740 0 722 1 0 1 1 0 8 0 zombiepl 144 525 0 525 1 0 1 1 0 8 1 processpl 1232 576 0 525 5 0 5 5 0 8 0 procpl 664 781 0 721 7 0 7 7 0 8 0 sosppl 176 1 0 1 1 0 1 1 0 8 1 sockpl 752 340 0 312 7 0 7 7 0 8 4 mcl64k 65536 3 0 0 1 0 1 1 0 8 0 mcl8k 8192 2 0 0 1 0 1 1 0 8 0 mcl4k 4096 121 0 0 16 0 16 16 0 8 0 mcl2k2 2112 1 0 0 1 0 1 1 0 8 0 mcl2k 2048 32 0 0 4 0 4 4 0 8 0 mtagpl 96 3 0 0 1 0 1 1 0 8 0 mbufpl 256 246 0 0 16 0 16 16 0 8 0 bufpl 280 2497 0 102 172 0 172 172 0 8 0 anonpl 32 5506 0 0 45 0 45 45 0 246 0 amapchunkpl 152 12056 0 11565 32 0 32 32 0 158 10 amappl16 200 1674 0 1655 5 2 3 5 0 8 1 amappl14 184 458 0 457 1 0 1 1 0 8 0 amappl13 176 113 0 103 1 0 1 1 0 8 0 amappl12 168 794 0 760 2 0 2 2 0 8 0 amappl11 160 34 0 34 1 1 0 1 0 8 0 amappl10 152 100 0 90 1 0 1 1 0 8 0 amappl9 144 367 0 367 1 1 0 1 0 8 0 amappl8 136 109 0 107 1 0 1 1 0 8 0 amappl7 128 141 0 129 1 0 1 1 0 8 0 amappl6 120 162 0 160 1 0 1 1 0 8 0 amappl5 112 99 0 92 1 0 1 1 0 8 0 amappl4 104 267 0 250 1 0 1 1 0 8 0 amappl3 96 2247 0 2130 5 1 4 4 0 8 0 amappl2 88 524 0 472 2 0 2 2 0 8 0 amappl1 80 11137 0 10566 16 0 16 16 0 8 2 amappl 88 3414 0 3249 5 0 5 5 0 92 0 uvmvnodes 80 105 0 0 3 0 3 3 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 3 0 1 1 0 1 1 0 8 0 uaddrrnd 24 560 0 525 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 560 0 525 1 0 1 1 0 8 0 vmmpekpl 168 6574 0 6535 2 0 2 2 0 8 0 vmmpepl 168 44962 0 43000 105 0 105 105 0 357 16 vmsppl 488 559 0 525 7 1 6 6 0 8 0 rwobjpl 80 15780 0 14870 25 0 25 25 0 8 2 pdppl 4096 1127 0 1050 105 22 83 95 0 8 6 pvpl 32 11946 0 0 97 0 97 97 0 265 0 pmappl 256 559 0 525 4 1 3 3 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 282 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(ffffffff839a5ff0) 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 __sanitizer_cov_trace_pc() at __sanitizer_cov_trace_pc 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: 0x79bdb71670a0, count: 8 ddb{0}> trace x86_ipi_db(ffffffff839a5ff0) 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 __sanitizer_cov_trace_pc() at __sanitizer_cov_trace_pc 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: 0x79bdb71670a0, 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(ffffffff834abe55) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff83ac4fc8,2,ffff80002a33a748) at pool_do_get+0x5df pool_get(ffffffff83ac4fc8,2) at pool_get+0x162 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff8000fffe4fb8,ffff80002a33a9a0,a0,ffff80002a33a8f0) at shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 sys_shmget(ffff8000fffe4fb8,ffff80002a33a9a0,ffff80002a33a8f0) at sys_shmget+0x195 sys/kern/sysv_shm.c:501 syscall(ffff80002a33a9a0) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80002a33a9a0) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x2cb71be5760, count: 7 ddb{1}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff834abe55) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff83ac4fc8,2,ffff80002a33a748) at pool_do_get+0x5df pool_get(ffffffff83ac4fc8,2) at pool_get+0x162 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff8000fffe4fb8,ffff80002a33a9a0,a0,ffff80002a33a8f0) at shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 sys_shmget(ffff8000fffe4fb8,ffff80002a33a9a0,ffff80002a33a8f0) at sys_shmget+0x195 sys/kern/sysv_shm.c:501 syscall(ffff80002a33a9a0) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80002a33a9a0) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x2cb71be5760, count: -8