panic: pool_do_get: shmpl free list modified: page 0xfffffd80604f7000; item addr 0xfffffd80604f7a28; offset 0x40=0x6882272b Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 237044 67344 32767 0x10 0 0 syz-executor * 91043 67344 32767 0x10 0x4000000 1K syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff833dab32) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff839327d8,1,ffff80002b005448) at pool_do_get+0x5ea sys/kern/subr_pool.c:-1 pool_get(ffffffff839327d8,1) at pool_get+0x149 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff80003c4499c8,ffff80002b0056a0,92,ffff80002b0055f0) at shmget_allocate_segment+0x1a7 sys/kern/sysv_shm.c:-1 sys_shmget(ffff80003c4499c8,ffff80002b0056a0,ffff80002b0055f0) at sys_shmget+0x1b2 sys/kern/sysv_shm.c:482 syscall(ffff80002b0056a0) at syscall+0xb08 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80002b0056a0) at syscall+0xb08 sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xa7b6a8431f0, 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 0xfffffd80604f7000; item addr 0xfffffd80604f7a28; offset 0x40=0x6882272b ddb{1}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff833dab32) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff839327d8,1,ffff80002b005448) at pool_do_get+0x5ea sys/kern/subr_pool.c:-1 pool_get(ffffffff839327d8,1) at pool_get+0x149 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff80003c4499c8,ffff80002b0056a0,92,ffff80002b0055f0) at shmget_allocate_segment+0x1a7 sys/kern/sysv_shm.c:-1 sys_shmget(ffff80003c4499c8,ffff80002b0056a0,ffff80002b0055f0) at sys_shmget+0x1b2 sys/kern/sysv_shm.c:482 syscall(ffff80002b0056a0) at syscall+0xb08 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80002b0056a0) at syscall+0xb08 sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xa7b6a8431f0, count: -8 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff80002b005270 rbx 0xffff8000299deddf rdx 0xffff80000143c480 rcx 0xffff80003c4499c8 rax 0xffff8000299ddff0 r8 0x101010101010101 r9 0x8080808080808080 r10 0xce89b51390895a01 r11 0xd337befca67cfae7 r12 0xffff8000299debe0 r13 0 r14 0 r15 0x1 rip 0xffffffff8142dce5 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80002b005260 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor) tid=91043 pid=67344 tcnt=3 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=0xffff80003c4487d8,0xffff80002a2a8028 process=0xffff80003c4275d0 user=0xffff80002b000000, vmspace=0xfffffd80737d3d70 estcpu=36, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 67344 237044 45474 32767 7 0x10 syz-executor *67344 91043 45474 32767 7 0x4000010 syz-executor 67344 184078 45474 32767 3 0x4000090 fsleep syz-executor 43655 256831 69160 0 2 0 syz-executor 25076 4402 27204 32767 2 0x10 syz-executor 25076 171334 27204 32767 2 0x4000010 syz-executor 85317 102909 65047 32767 3 0x90 nanoslp syz-executor 85317 361256 65047 32767 3 0x4000090 ttyout syz-executor 85317 93577 65047 32767 3 0x4000090 fsleep syz-executor 85317 321834 65047 32767 3 0x4000090 fsleep syz-executor 15328 390070 34494 32767 3 0x90 nanoslp syz-executor 15328 204740 34494 32767 3 0x4000090 netacc syz-executor 15328 1260 34494 32767 3 0x4000090 fsleep syz-executor 83651 204561 59582 0 3 0x82 sbwait sshd-session 9755 331950 0 0 3 0x14200 bored sosplice 34494 498706 67057 32767 3 0x90 nanoslp syz-executor 82960 397237 14792 32767 3 0x90 piperd syz-executor 65047 177721 91084 32767 3 0x90 nanoslp syz-executor 27204 344032 90084 32767 3 0x90 nanoslp syz-executor 45474 334328 67479 32767 3 0x90 nanoslp syz-executor 88790 457524 5651 32767 3 0x90 wait syz-executor 67057 170857 69160 0 3 0x82 wait syz-executor 91084 309588 69160 0 3 0x82 wait syz-executor 90084 49384 69160 0 3 0x82 wait syz-executor 14792 509710 69160 0 3 0x82 wait syz-executor 67479 353049 69160 0 3 0x82 wait syz-executor 5651 308735 69160 0 3 0x82 wait syz-executor 69160 304222 30949 0 3 0x82 nanoslp syz-executor 30949 121725 85848 0 3 0x10008a sigsusp ksh 85848 255172 29889 0 3 0x98 kqread sshd-session 29889 495756 59582 0 3 0x92 kqread sshd-session 59973 438496 1 0 3 0x100083 ttyin getty 59582 54703 1 0 3 0x88 kqread sshd 7453 141039 62810 73 3 0x1100090 kqread syslogd 62810 181417 1 0 3 0x100082 sbwait syslogd 9666 485280 1 0 3 0x100080 kqread resolvd 72926 10291 45705 77 3 0x100092 kqread dhcpleased 69043 373240 45705 77 3 0x100092 kqread dhcpleased 45705 71292 1 0 3 0x80 kqread dhcpleased 33586 132443 0 0 3 0x14200 bored smr 25035 80085 0 0 2 0x14200 zerothread 83449 333886 0 0 3 0x14200 aiodoned aiodoned 68560 81584 0 0 3 0x14200 syncer update 28950 179501 0 0 3 0x14200 cleaner cleaner 70419 288358 0 0 3 0x14200 reaper reaper 36157 505606 0 0 3 0x14200 pgdaemon pagedaemon 57152 86236 0 0 3 0x14200 bored viomb 1170 262467 0 0 3 0x40014200 acpi0 acpi0 91995 481597 0 0 3 0x40014200 idle1 97943 64712 0 0 3 0x14200 bored softnet7 79650 74081 0 0 3 0x14200 bored softnet6 37648 129275 0 0 3 0x14200 bored softnet5 62056 85371 0 0 3 0x14200 bored softnet4 3522 308338 0 0 3 0x14200 bored softnet3 21537 246145 0 0 3 0x14200 bored softnet2 25936 84356 0 0 3 0x14200 bored softnet1 81162 205283 0 0 3 0x14200 bored softnet0 73482 40865 0 0 3 0x14200 bored systqmp 84102 255796 0 0 3 0x14200 bored systq 94017 253056 0 0 3 0x14200 tmoslp softclockmp 9168 12025 0 0 3 0x40014200 tmoslp softclock 98233 485988 0 0 3 0x40014200 idle0 1 73183 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 (0xffffffff839327f0) #0 witness_lock+0x5bb stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5bb 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+0x10b sys/kern/subr_pool.c:578 #4 shmget_allocate_segment+0x1a7 sys/kern/sysv_shm.c:-1 #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:748 #7 Xsyscall+0x128 Process 67344 (syz-executor) thread 0xffff80003c4499c8 (91043) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff83950b88) #0 witness_lock+0x5bb stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5bb sys/kern/subr_witness.c:1160 #1 syscall+0xae6 mi_syscall sys/sys/syscall_mi.h:176 [inline] #1 syscall+0xae6 sys/arch/amd64/amd64/trap.c:748 #2 Xsyscall+0x128 exclusive mutex shmpl r = 0 (0xffffffff839327f0) #0 witness_lock+0x5bb stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5bb 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+0x10b sys/kern/subr_pool.c:578 #4 shmget_allocate_segment+0x1a7 sys/kern/sysv_shm.c:-1 #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:748 #7 Xsyscall+0x128 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10188 10952K 10968K 166960K 11272 0 pcb 17 12K 12K 166960K 17 0 rtable 173 5K 6K 166960K 271 0 pf 27 16K 16K 166960K 31 0 ifaddr 34 6K 7K 166960K 44 0 ifgroup 42 1K 2K 166960K 50 0 sysctl 4 1K 9K 166960K 8 0 counters 64 36K 36K 166960K 68 0 ioctlops 0 0K 2K 166960K 33 0 iov 0 0K 16K 166960K 13 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1335 84K 84K 166960K 1541 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 13K 166960K 15 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 0K 166960K 18 0 dirhash 12 2K 2K 166960K 21 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 20 70K 117K 166960K 416 0 proc 58 99K 163K 166960K 498 0 subproc 54 3K 4K 166960K 252 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 2 0K 0K 166960K 35 0 in_multi 78 5K 7K 166960K 112 0 ether_multi 1 0K 0K 166960K 3 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 67 307K 307K 166960K 67 0 exec 0 0K 1K 166960K 377 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 243 160K 185K 166960K 4840 0 UVM aobj 116 5K 6K 166960K 119 0 pinsyscall 43 86K 106K 166960K 1428 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 20 0 NDP 9 0K 2K 166960K 27 0 temp 37 8676K 8740K 166960K 5015 0 kqueue 13 20K 30K 166960K 73 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 63 0 60 1 0 1 1 0 8 0 rtentry 176 98 0 20 5 0 5 5 0 8 0 unpcb 144 253 0 229 2 0 2 2 0 8 1 syncache 336 9 0 9 1 0 1 1 0 8 1 tcpcb 736 155 0 148 7 5 2 7 0 8 1 arp 128 10 0 2 1 0 1 1 0 8 0 ipq 40 1 0 0 1 0 1 1 0 8 0 ipqe 40 33 0 32 1 0 1 1 0 8 0 inpcb 328 306 0 293 7 5 2 7 0 8 0 ip6q 72 2 0 2 1 1 0 1 0 8 0 ip6af 40 4 0 4 1 1 0 1 0 8 0 nd6 144 19 0 5 1 0 1 1 0 8 0 kcovpl 48 28 0 22 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 440 0 85 28 1 27 28 0 8 2 art_table 40 441 0 85 5 0 5 5 0 8 0 art_node 32 98 0 28 1 0 1 1 0 8 0 sysvmsgpl 40 7 0 5 1 0 1 1 0 8 0 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 14 0 4 1 0 1 1 0 8 0 shmpl 112 116 0 3 4 0 4 4 0 8 0 pool(0xffffffff839327d8:shmpl): page inconsistency: page 0xfffffd80604f7000; 26 on list, 8 missing, 35 items per page dirhash 1024 23 0 6 3 0 3 3 0 8 0 dino2pl 256 1856 0 322 96 0 96 96 0 8 0 ffsino 296 1856 0 322 119 0 119 119 0 8 0 nchpl 144 2313 0 613 63 0 63 63 0 8 0 uvmvnodes 80 2117 0 0 44 0 44 44 0 8 0 vnodes 216 2117 0 0 118 0 118 118 0 8 0 namei 1024 7295 0 7295 1 0 1 1 0 8 1 percpumem 16 49 0 2 1 0 1 1 0 8 0 kstatmem 264 24 0 4 2 0 2 2 0 8 0 scxspl 216 8942 0 8942 9 1 8 8 1 8 8 plimitpl 152 130 0 109 3 1 2 2 0 8 1 sigapl 424 655 0 599 8 1 7 8 0 8 0 knotepl 120 324 0 0 10 0 10 10 0 8 0 kqueuepl 224 84 0 75 1 0 1 1 0 8 0 pipepl 344 243 0 215 6 0 6 6 0 8 3 fdescpl 528 632 0 599 3 0 3 3 0 8 0 filepl 160 3092 0 2883 15 2 13 13 0 8 3 lockfpl 104 49 0 46 1 0 1 1 0 8 0 lockfspl 48 19 0 16 1 0 1 1 0 8 0 sessionpl 144 45 0 30 1 0 1 1 0 8 0 pgrppl 48 75 0 53 1 0 1 1 0 8 0 ucredpl 104 295 0 278 1 0 1 1 0 8 0 zombiepl 144 600 0 599 1 0 1 1 0 8 0 processpl 1248 655 0 599 7 1 6 6 0 8 0 procpl 656 983 0 919 7 0 7 7 0 8 1 sosppl 168 2 0 1 1 0 1 1 0 8 0 sockpl 752 626 0 585 12 5 7 10 0 8 2 mcl64k 65536 4 0 0 1 0 1 1 0 8 0 mcl16k 16384 1 0 0 1 0 1 1 0 8 0 mcl12k 12288 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 35 0 0 5 0 5 5 0 8 0 mtagpl 96 3 0 0 1 0 1 1 0 8 0 mbufpl 256 332 0 0 21 0 21 21 0 8 0 bufpl 280 3529 0 116 244 0 244 244 0 8 0 anonpl 32 7124 0 0 58 0 58 58 0 246 0 amapchunkpl 152 14944 0 14432 30 7 23 27 0 158 2 amappl16 200 2776 0 2756 18 11 7 14 0 8 5 amappl15 192 6 0 6 1 1 0 1 0 8 0 amappl14 184 106 0 95 1 0 1 1 0 8 0 amappl13 176 7 0 7 1 1 0 1 0 8 0 amappl12 168 1230 0 1197 2 0 2 2 0 8 0 amappl11 160 47 0 37 1 0 1 1 0 8 0 amappl10 152 4 0 4 1 1 0 1 0 8 0 amappl9 144 245 0 245 1 1 0 1 0 8 0 amappl8 136 26 0 24 1 0 1 1 0 8 0 amappl7 128 94 0 83 1 0 1 1 0 8 0 amappl6 120 171 0 167 1 0 1 1 0 8 0 amappl5 112 115 0 109 1 0 1 1 0 8 0 amappl4 104 275 0 259 1 0 1 1 0 8 0 amappl3 96 2606 0 2490 4 0 4 4 0 8 0 amappl2 88 629 0 568 2 0 2 2 0 8 0 amappl1 80 9668 0 9044 15 0 15 15 0 8 0 amappl 88 4148 0 3974 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 118 0 3 3 0 3 3 0 8 0 uaddrrnd 24 632 0 599 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 632 0 599 1 0 1 1 0 8 0 vmmpekpl 168 7479 0 7422 3 0 3 3 0 8 0 vmmpepl 168 46988 0 44946 101 2 99 99 0 357 2 vmsppl 488 631 0 599 7 2 5 6 0 8 0 rwobjpl 80 18096 0 14967 66 0 66 66 0 8 0 pdppl 4096 1272 0 1198 110 28 82 94 0 8 8 pvpl 32 13161 0 0 108 1 107 108 0 265 0 pmappl 256 631 0 599 4 1 3 3 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 299 0 37 8 0 8 8 0 8 0 ddb{1}> machine ddbcpu 0 Stopped at x86_ipi_db+0x27: addq $0x8,%rsp x86_ipi_db(ffffffff837eaff0) 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(ffffffff83950980) at __mp_lock+0x199 __mp_lock_spin sys/kern/kern_lock.c:134 [inline] __mp_lock(ffffffff83950980) at __mp_lock+0x199 sys/kern/kern_lock.c:165 softintr_dispatch(0) at softintr_dispatch+0x12a 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: 0x7368f8cb0f40, count: 8 ddb{0}> trace x86_ipi_db(ffffffff837eaff0) 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(ffffffff83950980) at __mp_lock+0x199 __mp_lock_spin sys/kern/kern_lock.c:134 [inline] __mp_lock(ffffffff83950980) at __mp_lock+0x199 sys/kern/kern_lock.c:165 softintr_dispatch(0) at softintr_dispatch+0x12a 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: 0x7368f8cb0f40, 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(ffffffff833dab32) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff839327d8,1,ffff80002b005448) at pool_do_get+0x5ea sys/kern/subr_pool.c:-1 pool_get(ffffffff839327d8,1) at pool_get+0x149 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff80003c4499c8,ffff80002b0056a0,92,ffff80002b0055f0) at shmget_allocate_segment+0x1a7 sys/kern/sysv_shm.c:-1 sys_shmget(ffff80003c4499c8,ffff80002b0056a0,ffff80002b0055f0) at sys_shmget+0x1b2 sys/kern/sysv_shm.c:482 syscall(ffff80002b0056a0) at syscall+0xb08 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80002b0056a0) at syscall+0xb08 sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xa7b6a8431f0, count: 7 ddb{1}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff833dab32) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff839327d8,1,ffff80002b005448) at pool_do_get+0x5ea sys/kern/subr_pool.c:-1 pool_get(ffffffff839327d8,1) at pool_get+0x149 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff80003c4499c8,ffff80002b0056a0,92,ffff80002b0055f0) at shmget_allocate_segment+0x1a7 sys/kern/sysv_shm.c:-1 sys_shmget(ffff80003c4499c8,ffff80002b0056a0,ffff80002b0055f0) at sys_shmget+0x1b2 sys/kern/sysv_shm.c:482 syscall(ffff80002b0056a0) at syscall+0xb08 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80002b0056a0) at syscall+0xb08 sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xa7b6a8431f0, count: -8