panic: pool_do_get: shmpl free list modified: page 0xfffffd80698e4000; item addr 0xfffffd80698e4bd0; offset 0x40=0x6897ea9c Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 519833 29785 32767 0x10 0 0 syz-executor *193223 29785 32767 0x10 0x4000000 1K syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff83369fe0) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff839238e8,1,ffff80002a327b68) at pool_do_get+0x5df pool_get(ffffffff839238e8,1) at pool_get+0x162 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff80003c459cb0,ffff80002a327dc0,186,ffff80002a327d10) at shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 sys_shmget(ffff80003c459cb0,ffff80002a327dc0,ffff80002a327d10) at sys_shmget+0x195 sys/kern/sysv_shm.c:482 syscall(ffff80002a327dc0) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80002a327dc0) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xa7959e406c0, 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 0xfffffd80698e4000; item addr 0xfffffd80698e4bd0; offset 0x40=0x6897ea9c ddb{1}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff83369fe0) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff839238e8,1,ffff80002a327b68) at pool_do_get+0x5df pool_get(ffffffff839238e8,1) at pool_get+0x162 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff80003c459cb0,ffff80002a327dc0,186,ffff80002a327d10) at shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 sys_shmget(ffff80003c459cb0,ffff80002a327dc0,ffff80002a327d10) at sys_shmget+0x195 sys/kern/sysv_shm.c:482 syscall(ffff80002a327dc0) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80002a327dc0) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xa7959e406c0, count: -8 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff80002a327990 rbx 0xffff8000299eeddf rdx 0xffff800001434cc0 rcx 0xffff80003c459cb0 rax 0xffff8000299edff0 r8 0x101010101010101 r9 0x8080808080808080 r10 0xd7507fa36f642738 r11 0x561ec81b0a9d802 r12 0xffff8000299eebe0 r13 0 r14 0 r15 0x1 rip 0xffffffff8313af95 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80002a327980 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor) tid=193223 pid=29785 tcnt=2 stat=onproc flags process=10 proc=4000000 runpri=32, usrpri=50, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80003c4587f0,0xffff80003c458a98 process=0xffff80002a373aa0 user=0xffff80002a322000, vmspace=0xfffffd806b9c67d0 estcpu=36, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 28189 369494 90538 0 2 0 syz-executor 83990 51010 53823 32767 2 0x10 syz-executor 20888 406570 67284 32767 2 0x10 syz-executor 29785 519833 76741 32767 7 0x10 syz-executor *29785 193223 76741 32767 7 0x4000010 syz-executor 23161 465631 23060 32767 2 0x10 syz-executor 23161 338495 23060 32767 3 0x4000090 ttyin syz-executor 39503 25699 55991 32767 2 0x10 syz-executor 39503 124663 55991 32767 3 0x4000090 piperd syz-executor 95281 328435 76916 32767 2 0x10 syz-executor 95281 364239 76916 32767 3 0x4000090 fsleep syz-executor 90538 369502 66686 0 3 0x82 wait syz-executor 35833 10302 96768 0 3 0x82 sbwait sshd-session 42930 166296 96768 0 3 0x82 sbwait sshd-session 42463 334019 0 0 3 0x14200 bored sosplice 55991 301842 42435 32767 3 0x90 nanoslp syz-executor 67284 229206 79610 32767 3 0x90 nanoslp syz-executor 76741 19794 95802 32767 3 0x90 nanoslp syz-executor 23060 60588 9250 32767 3 0x90 nanoslp syz-executor 76916 178121 69471 32767 3 0x90 nanoslp syz-executor 53823 69502 24951 32767 3 0x90 nanoslp syz-executor 49246 180255 54969 32767 2 0x10 syz-executor 9250 494792 66686 0 3 0x82 wait syz-executor 24951 392270 66686 0 3 0x82 wait syz-executor 42435 474622 66686 0 3 0x82 wait syz-executor 54969 184259 66686 0 3 0x82 wait syz-executor 69471 339994 66686 0 3 0x82 wait syz-executor 95802 403874 66686 0 3 0x82 wait syz-executor 79610 397544 66686 0 3 0x82 wait syz-executor 66686 84305 49587 0 2 0x2 syz-executor 49587 201440 48785 0 3 0x10008a sigsusp ksh 48785 57105 9531 0 3 0x98 kqread sshd-session 9531 418025 96768 0 3 0x92 kqread sshd-session 90552 157027 1 0 3 0x100083 ttyin getty 96768 139084 1 0 3 0x88 kqread sshd 30689 99630 16036 73 3 0x1100090 kqread syslogd 16036 358934 1 0 3 0x100082 sbwait syslogd 27010 430851 1 0 3 0x100080 kqread resolvd 86434 107046 88826 77 3 0x100092 kqread dhcpleased 5241 30777 88826 77 3 0x100092 kqread dhcpleased 88826 176977 1 0 3 0x80 kqread dhcpleased 7368 186268 0 0 3 0x14200 bored smr 41083 303188 0 0 2 0x14200 zerothread 72958 323000 0 0 3 0x14200 aiodoned aiodoned 34777 100445 0 0 3 0x14200 syncer update 3882 254248 0 0 3 0x14200 cleaner cleaner 14242 46110 0 0 3 0x14200 reaper reaper 56813 190972 0 0 3 0x14200 pgdaemon pagedaemon 26497 215552 0 0 3 0x14200 bored viomb 58234 43421 0 0 3 0x40014200 acpi0 acpi0 81839 330635 0 0 3 0x40014200 idle1 93174 157820 0 0 3 0x14200 bored softnet7 94866 510232 0 0 3 0x14200 bored softnet6 11493 316314 0 0 3 0x14200 bored softnet5 99957 363822 0 0 3 0x14200 bored softnet4 2957 266880 0 0 3 0x14200 bored softnet3 4561 141 0 0 3 0x14200 bored softnet2 75413 367751 0 0 3 0x14200 bored softnet1 28381 51945 0 0 3 0x14200 bored softnet0 42976 121341 0 0 3 0x14200 bored systqmp 15538 418302 0 0 3 0x14200 bored systq 93546 482364 0 0 3 0x14200 tmoslp softclockmp 94332 202548 0 0 3 0x40014200 tmoslp softclock 51845 75820 0 0 3 0x40014200 idle0 1 283849 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 (0xffffffff83923900) #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 29785 (syz-executor) thread 0xffff80003c459cb0 (193223) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff8399e068) #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 (0xffffffff83923900) #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 10196 10955K 10968K 166960K 11277 0 pcb 17 12K 12K 166960K 17 0 rtable 193 5K 6K 166960K 282 0 pf 29 16K 16K 166960K 31 0 ifaddr 38 6K 7K 166960K 44 0 ifgroup 46 2K 2K 166960K 50 0 sysctl 4 1K 9K 166960K 12 0 counters 66 36K 36K 166960K 68 0 ioctlops 0 0K 2K 166960K 42 0 iov 0 0K 12K 166960K 82 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1334 84K 84K 166960K 1508 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 9K 166960K 17 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 0K 166960K 26 0 dirhash 12 2K 2K 166960K 24 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 24 89K 129K 166960K 619 0 sigio 1 0K 0K 166960K 19 0 proc 58 99K 131K 166960K 532 0 subproc 72 4K 4K 166960K 198 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 238 0 in_multi 88 6K 7K 166960K 110 0 ether_multi 1 0K 0K 166960K 2 0 mrt 1 0K 0K 166960K 1 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 408 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 236 184K 208K 166960K 7038 0 UVM aobj 33 4K 5K 166960K 36 0 pinsyscall 49 98K 114K 166960K 1646 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 32 0 NDP 10 0K 2K 166960K 27 0 temp 49 8645K 8710K 166960K 6174 0 kqueue 14 22K 32K 166960K 130 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 118 0 115 2 1 1 2 0 8 0 rtentry 176 99 0 11 5 0 5 5 0 8 0 unpcb 144 414 0 395 6 0 6 6 0 8 5 syncache 336 12 0 12 1 0 1 1 0 8 1 tcpqe 32 5 0 5 1 1 0 1 0 8 0 tcpcb 736 371 0 357 8 3 5 8 0 8 3 arp 128 11 0 1 1 0 1 1 0 8 0 ipq 40 1 0 0 1 0 1 1 0 8 0 ipqe 40 2 0 1 1 0 1 1 0 8 0 inpcb 328 1040 0 1023 9 1 8 9 0 8 5 ip6q 72 2 0 0 1 0 1 1 0 8 0 ip6af 40 2 0 0 1 0 1 1 0 8 0 nd6 144 19 0 3 1 0 1 1 0 8 0 kcovpl 48 22 0 14 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 442 0 43 28 2 26 28 0 8 0 art_table 40 443 0 43 5 0 5 5 0 8 0 art_node 32 99 0 20 1 0 1 1 0 8 0 sysvmsgpl 40 5 0 3 1 0 1 1 0 8 0 semapl 112 22 0 12 1 0 1 1 0 8 0 shmpl 112 33 0 3 1 0 1 1 0 8 0 pool(0xffffffff839238e8:shmpl): page inconsistency: page 0xfffffd80698e4000; 4 on list, 30 missing, 35 items per page dirhash 1024 25 0 8 3 0 3 3 0 8 0 dino2pl 256 2213 0 691 96 0 96 96 0 8 0 ffsino 296 2213 0 691 118 0 118 118 0 8 0 nchpl 144 3010 0 1321 63 0 63 63 0 8 0 uvmvnodes 80 2420 0 0 50 0 50 50 0 8 0 vnodes 216 2420 0 0 135 0 135 135 0 8 0 namei 1024 10372 0 10372 2 1 1 2 0 8 1 percpumem 16 49 0 1 1 0 1 1 0 8 0 kstatmem 264 24 0 2 2 0 2 2 0 8 0 scxspl 216 10983 0 10983 9 8 1 8 1 8 1 plimitpl 152 137 0 113 2 0 2 2 0 8 1 sigapl 424 873 0 812 8 0 8 8 0 8 0 knotepl 120 340 0 0 11 0 11 11 0 8 0 kqueuepl 224 285 0 275 5 4 1 5 0 8 0 pipepl 344 183 0 155 3 0 3 3 0 8 0 fdescpl 528 850 0 812 4 0 4 4 0 8 0 filepl 160 5106 0 4886 19 4 15 19 0 8 4 lockfpl 104 120 0 118 1 0 1 1 0 8 0 lockfspl 48 41 0 39 1 0 1 1 0 8 0 sessionpl 144 41 0 24 1 0 1 1 0 8 0 pgrppl 48 74 0 49 1 0 1 1 0 8 0 ucredpl 104 751 0 733 1 0 1 1 0 8 0 zombiepl 144 812 0 812 1 0 1 1 0 8 1 processpl 1248 873 0 812 7 2 5 6 0 8 0 procpl 664 1603 0 1538 7 0 7 7 0 8 0 sosppl 168 8 0 8 1 0 1 1 0 8 1 sockpl 752 1578 0 1539 19 6 13 18 0 8 8 mcl64k 65536 3 0 0 1 0 1 1 0 8 0 mcl16k 16384 1 0 0 1 0 1 1 0 8 0 mcl9k 9216 1 0 0 1 0 1 1 0 8 0 mcl8k 8192 2 0 0 1 0 1 1 0 8 0 mcl4k 4096 122 0 0 16 0 16 16 0 8 0 mcl2k 2048 22 0 0 3 0 3 3 0 8 0 mtagpl 96 2 0 0 1 0 1 1 0 8 0 mbufpl 256 280 0 0 18 0 18 18 0 8 0 bufpl 280 3665 0 116 254 0 254 254 0 8 0 anonpl 32 9653 0 0 78 0 78 78 0 246 0 amapchunkpl 152 22463 0 22002 40 7 33 38 0 158 12 amappl16 200 2719 0 2695 24 13 11 14 0 8 8 amappl15 192 19 0 19 1 1 0 1 0 8 0 amappl14 184 112 0 100 1 0 1 1 0 8 0 amappl13 176 28 0 28 1 1 0 1 0 8 0 amappl12 168 1447 0 1412 2 0 2 2 0 8 0 amappl11 160 46 0 36 1 0 1 1 0 8 0 amappl10 152 5 0 5 1 1 0 1 0 8 0 amappl9 144 255 0 255 1 1 0 1 0 8 0 amappl8 136 20 0 18 1 0 1 1 0 8 0 amappl7 128 96 0 84 1 0 1 1 0 8 0 amappl6 120 191 0 186 1 0 1 1 0 8 0 amappl5 112 115 0 108 1 0 1 1 0 8 0 amappl4 104 282 0 265 1 0 1 1 0 8 0 amappl3 96 4117 0 4010 4 0 4 4 0 8 0 amappl2 88 650 0 580 2 0 2 2 0 8 0 amappl1 80 11177 0 10444 17 0 17 17 0 8 0 amappl 88 6280 0 6121 6 0 6 6 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 35 0 3 1 0 1 1 0 8 0 uaddrrnd 24 850 0 812 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 850 0 812 1 0 1 1 0 8 0 vmmpekpl 168 8901 0 8858 3 0 3 3 0 8 0 vmmpepl 168 60599 0 58309 117 2 115 117 0 357 7 vmsppl 488 849 0 812 7 1 6 6 0 8 0 rwobjpl 80 21096 0 17639 73 0 73 73 0 8 0 pdppl 4096 1708 0 1624 126 40 86 100 0 8 2 pvpl 32 18423 0 0 149 0 149 149 0 265 0 pmappl 256 849 0 812 4 1 3 3 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 312 0 49 8 0 8 8 0 8 0 ddb{1}> machine ddbcpu 0 Stopped at x86_ipi_db+0x27: addq $0x8,%rsp x86_ipi_db(ffffffff837c1ff0) 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(ffffffff8399de60) at __mp_lock+0x192 __mp_lock_spin sys/kern/kern_lock.c:134 [inline] __mp_lock(ffffffff8399de60) 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: 0x7d09872eac10, count: 8 ddb{0}> trace x86_ipi_db(ffffffff837c1ff0) 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(ffffffff8399de60) at __mp_lock+0x192 __mp_lock_spin sys/kern/kern_lock.c:134 [inline] __mp_lock(ffffffff8399de60) 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: 0x7d09872eac10, 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(ffffffff83369fe0) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff839238e8,1,ffff80002a327b68) at pool_do_get+0x5df pool_get(ffffffff839238e8,1) at pool_get+0x162 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff80003c459cb0,ffff80002a327dc0,186,ffff80002a327d10) at shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 sys_shmget(ffff80003c459cb0,ffff80002a327dc0,ffff80002a327d10) at sys_shmget+0x195 sys/kern/sysv_shm.c:482 syscall(ffff80002a327dc0) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80002a327dc0) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xa7959e406c0, count: 7 ddb{1}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff83369fe0) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff839238e8,1,ffff80002a327b68) at pool_do_get+0x5df pool_get(ffffffff839238e8,1) at pool_get+0x162 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff80003c459cb0,ffff80002a327dc0,186,ffff80002a327d10) at shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 sys_shmget(ffff80003c459cb0,ffff80002a327dc0,ffff80002a327d10) at sys_shmget+0x195 sys/kern/sysv_shm.c:482 syscall(ffff80002a327dc0) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80002a327dc0) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xa7959e406c0, count: -8