panic: pool_do_get: shmpl free list modified: page 0xfffffd8068aeb000; item addr 0xfffffd8068aebaf0; offset 0x40=0x695a8b1e Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 425473 38873 32767 0x10 0 0 syz-executor *416058 38873 32767 0x10 0x4000000 1K syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff833ac2fb) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff83987718,1,ffff80003c4812b8) at pool_do_get+0x5df pool_get(ffffffff83987718,1) at pool_get+0x162 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff8000fffe6550,ffff80003c481510,0,ffff80003c481460) at shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 sys_shmget(ffff8000fffe6550,ffff80003c481510,ffff80003c481460) at sys_shmget+0x195 sys/kern/sysv_shm.c:482 syscall(ffff80003c481510) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c481510) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:775 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x4e5c6d79c60, 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 0xfffffd8068aeb000; item addr 0xfffffd8068aebaf0; offset 0x40=0x695a8b1e ddb{1}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff833ac2fb) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff83987718,1,ffff80003c4812b8) at pool_do_get+0x5df pool_get(ffffffff83987718,1) at pool_get+0x162 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff8000fffe6550,ffff80003c481510,0,ffff80003c481460) at shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 sys_shmget(ffff8000fffe6550,ffff80003c481510,ffff80003c481460) at sys_shmget+0x195 sys/kern/sysv_shm.c:482 syscall(ffff80003c481510) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c481510) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:775 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x4e5c6d79c60, count: -8 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff80003c4810e0 rbx 0xffff8000299dee07 rdx 0xffff800001546f80 rcx 0xffff8000fffe6550 rax 0xffff8000299ddff0 r8 0x101010101010101 r9 0x8080808080808080 r10 0x3f2ec43dc47195a5 r11 0xefd5053b1d677ef r12 0xffff8000299dec08 r13 0 r14 0 r15 0x1 rip 0xffffffff832828d5 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80003c4810d0 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor) tid=416058 pid=38873 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=0xffff80003b812560,0xffff8000fffe7a20 process=0xffff80003b80eb70 user=0xffff80003c47c000, vmspace=0xfffffd8069893030 estcpu=36, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 28658 342812 28359 32767 2 0x10 syz-executor 28658 71544 28359 32767 2 0x4000010 syz-executor 38873 425473 16634 32767 7 0x10 syz-executor *38873 416058 16634 32767 7 0x4000010 syz-executor 49434 282842 18470 32767 2 0x10 syz-executor 49434 463370 18470 32767 3 0x4000090 fsleep syz-executor 92764 270169 84301 0 2 0 syz-executor 11772 266828 97227 32767 2 0x10 syz-executor 11772 269895 97227 32767 3 0x4000090 ttyin syz-executor 25680 375617 43476 32767 2 0x10 syz-executor 25680 246864 43476 32767 3 0x4000090 kqpoll syz-executor 25680 334 43476 32767 2 0x4000010 syz-executor 84301 337813 70341 0 3 0x82 wait syz-executor 15349 192340 5382 0 3 0x82 sbwait sshd-session 76477 383760 69970 32767 3 0x90 nanoslp syz-executor 76477 106155 69970 32767 3 0x4000090 piperd syz-executor 76477 428692 69970 32767 3 0x4000090 fsleep syz-executor 76477 459580 69970 32767 3 0x4000090 fsleep syz-executor 64139 62388 12684 32767 3 0x90 nanoslp syz-executor 64139 449969 12684 32767 3 0x4000090 pipewr syz-executor 64139 490872 12684 32767 3 0x4000090 fsleep syz-executor 28359 333799 4625 32767 3 0x90 nanoslp syz-executor 69970 334974 3688 32767 3 0x90 nanoslp syz-executor 18470 426094 5872 32767 3 0x90 nanoslp syz-executor 97227 188385 147 32767 3 0x90 nanoslp syz-executor 12684 412309 98823 32767 3 0x90 nanoslp syz-executor 43476 449457 40797 32767 3 0x90 nanoslp syz-executor 16634 159043 51039 32767 3 0x90 nanoslp syz-executor 5872 16450 70341 0 3 0x82 wait syz-executor 3688 55227 70341 0 3 0x82 wait syz-executor 147 267510 70341 0 3 0x82 wait syz-executor 98823 340715 70341 0 3 0x82 wait syz-executor 4625 23867 70341 0 3 0x82 wait syz-executor 40797 36948 70341 0 3 0x82 wait syz-executor 51039 122519 70341 0 3 0x82 wait syz-executor 70341 224731 26774 0 3 0x82 kqread syz-executor 26774 244847 42411 0 3 0x10008a sigsusp ksh 42411 48714 56796 0 3 0x98 kqread sshd-session 56796 430152 5382 0 3 0x92 kqread sshd-session 15230 482339 1 0 3 0x100083 ttyin getty 5382 27346 1 0 3 0x88 kqread sshd 97930 92346 86242 73 3 0x1100090 kqread syslogd 86242 165817 1 0 3 0x100082 sbwait syslogd 19633 303444 1 0 3 0x100080 kqread resolvd 29101 223387 47724 77 3 0x100092 kqread dhcpleased 73605 423637 47724 77 3 0x100092 kqread dhcpleased 47724 80599 1 0 3 0x80 kqread dhcpleased 56421 90734 0 0 3 0x14200 bored smr 76670 77118 0 0 2 0x14200 zerothread 73856 321315 0 0 3 0x14200 aiodoned aiodoned 92336 227047 0 0 3 0x14200 syncer update 51832 171164 0 0 3 0x14200 cleaner cleaner 38331 157532 0 0 3 0x14200 reaper reaper 3706 238213 0 0 3 0x14200 pgdaemon pagedaemon 1433 294650 0 0 3 0x14200 bored viomb 32640 153542 0 0 3 0x40014200 acpi0 acpi0 75299 265128 0 0 3 0x40014200 idle1 21213 20277 0 0 3 0x14200 bored softnet1 68818 93823 0 0 3 0x14200 bored softnet0 90329 450424 0 0 3 0x14200 smrbar systqmp 67739 93307 0 0 3 0x14200 bored systq 6760 73877 0 0 3 0x14200 tmoslp softclockmp 82780 329361 0 0 3 0x40014200 tmoslp softclock 6385 250066 0 0 3 0x40014200 idle0 1 64221 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 (0xffffffff83987730) #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:581 #3 shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 #4 sys_shmget+0x195 sys/kern/sysv_shm.c:482 #5 syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] #5 syscall+0xb17 sys/arch/amd64/amd64/trap.c:775 #6 Xsyscall+0x128 Process 38873 (syz-executor) thread 0xffff8000fffe6550 (416058) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff839284c8) #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:775 #2 Xsyscall+0x128 exclusive mutex shmpl r = 0 (0xffffffff83987730) #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:581 #3 shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 #4 sys_shmget+0x195 sys/kern/sysv_shm.c:482 #5 syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] #5 syscall+0xb17 sys/arch/amd64/amd64/trap.c:775 #6 Xsyscall+0x128 Process 90329 (systqmp) thread 0xffff8000ffffe000 (450424) shared rwlock systqmp r = 0 (0xffffffff837f4908) #0 witness_lock+0x5f1 stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5f1 sys/kern/subr_witness.c:1160 #1 taskq_thread+0x12a sys/kern/kern_task.c:442 #2 proc_trampoline+0x10 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 11050 12016K 12034K 166960K 12144 0 pcb 17 12K 12K 166960K 17 0 rtable 217 6K 7K 166960K 355 0 pf 29 16K 16K 166960K 31 0 ifaddr 38 6K 7K 166960K 44 0 ifgroup 46 2K 2K 166960K 50 0 sysctl 3 1K 9K 166960K 8 0 counters 68 36K 37K 166960K 70 0 ioctlops 0 0K 2K 166960K 34 0 iov 0 0K 36K 166960K 7 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1335 84K 84K 166960K 1440 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 9K 166960K 8 0 VM map 2 1K 1K 166960K 2 0 sem 3 1K 1K 166960K 3 0 dirhash 12 2K 2K 166960K 15 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 25 93K 125K 166960K 230 0 sigio 0 0K 0K 166960K 4 0 proc 61 115K 163K 166960K 483 0 subproc 72 4K 4K 166960K 90 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 12 0 in_multi 88 6K 7K 166960K 101 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 79 360K 360K 166960K 79 0 exec 0 0K 1K 166960K 373 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 268 201K 210K 166960K 3797 0 UVM aobj 7 2K 2K 166960K 8 0 pinsyscall 48 96K 112K 166960K 1278 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 5 0 NDP 10 0K 2K 166960K 27 0 temp 36 8666K 8730K 166960K 4123 0 kqueue 14 22K 29K 166960K 43 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 108 0 105 3 0 3 3 0 8 2 rtentry 176 112 0 12 6 0 6 6 0 8 0 unpcb 144 75 0 57 2 0 2 2 0 8 1 syncache 336 9 0 9 1 0 1 1 0 8 1 tcpcb 736 52 0 44 2 0 2 2 0 8 1 arp 136 18 0 2 1 0 1 1 0 8 0 inpcb 328 367 0 356 9 0 9 9 0 8 6 nd6 152 25 0 3 1 0 1 1 0 8 0 kcovpl 48 10 0 2 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 455 0 0 29 0 29 29 0 8 0 art_table 40 456 0 0 5 0 5 5 0 8 0 art_node 32 112 0 21 1 0 1 1 0 8 0 sysvmsgpl 40 4 0 4 1 0 1 1 0 8 1 semapl 112 1 0 0 1 0 1 1 0 8 0 shmpl 112 5 0 1 1 0 1 1 0 8 0 pool(0xffffffff83987718:shmpl): page inconsistency: page 0xfffffd8068aeb000; 30 on list, 4 missing, 35 items per page dirhash 1024 19 0 2 3 0 3 3 0 8 0 dino2pl 256 1740 0 226 95 0 95 95 0 8 0 ffsino 296 1740 0 226 117 0 117 117 0 8 0 nchpl 144 2041 0 348 63 0 63 63 0 8 0 vnodes 216 1839 0 0 103 0 103 103 0 8 0 namei 1024 6065 0 6065 1 0 1 1 0 8 1 percpumem 16 50 0 1 1 0 1 1 0 8 0 kstatmem 264 24 0 2 2 0 2 2 0 8 0 scxspl 216 6409 0 6409 3 1 2 2 1 8 2 plimitpl 152 51 0 27 2 0 2 2 0 8 0 sigapl 424 508 0 454 7 0 7 7 0 8 0 knotepl 120 108 0 0 4 0 4 4 0 8 0 kqueuepl 224 47 0 36 1 0 1 1 0 8 0 pipepl 344 131 0 101 4 0 4 4 0 8 0 fdescpl 528 492 0 454 4 0 4 4 0 8 0 filepl 160 2293 0 2073 16 0 16 16 0 8 5 lockfpl 104 28 0 26 1 0 1 1 0 8 0 lockfspl 48 12 0 10 1 0 1 1 0 8 0 sessionpl 144 24 0 8 1 0 1 1 0 8 0 pgrppl 48 35 0 11 1 0 1 1 0 8 0 ucredpl 104 366 0 348 1 0 1 1 0 8 0 zombiepl 144 454 0 454 1 0 1 1 0 8 1 processpl 1232 508 0 454 5 0 5 5 0 8 0 procpl 664 661 0 596 7 0 7 7 0 8 0 sosppl 176 1 0 1 1 0 1 1 0 8 1 sockpl 752 550 0 518 20 8 12 20 0 8 7 mcl64k 65536 3 0 0 1 0 1 1 0 8 0 mcl16k 16384 2 0 0 1 0 1 1 0 8 0 mcl12k 12288 1 0 0 1 0 1 1 0 8 0 mcl9k 9216 1 0 0 1 0 1 1 0 8 0 mcl8k 8192 3 0 0 1 0 1 1 0 8 0 mcl4k 4096 111 0 0 14 0 14 14 0 8 0 mcl2k 2048 25 0 0 4 0 4 4 0 8 0 mtagpl 96 1 0 0 1 0 1 1 0 8 0 mbufpl 256 206 0 0 13 0 13 13 0 8 0 bufpl 280 2424 0 114 165 0 165 165 0 8 0 anonpl 32 7342 0 0 60 0 60 60 0 246 0 amapchunkpl 152 11312 0 10777 34 0 34 34 0 158 10 amappl16 200 2167 0 2148 5 1 4 5 0 8 2 amappl15 192 4 0 4 1 1 0 1 0 8 0 amappl14 184 14 0 14 1 1 0 1 0 8 0 amappl13 176 414 0 413 1 0 1 1 0 8 0 amappl12 168 824 0 777 3 0 3 3 0 8 0 amappl11 160 6 0 6 1 1 0 1 0 8 0 amappl10 152 47 0 37 1 0 1 1 0 8 0 amappl9 144 250 0 249 1 0 1 1 0 8 0 amappl8 136 24 0 23 1 0 1 1 0 8 0 amappl7 128 73 0 72 1 0 1 1 0 8 0 amappl6 120 267 0 255 1 0 1 1 0 8 0 amappl5 112 136 0 128 1 0 1 1 0 8 0 amappl4 104 371 0 348 1 0 1 1 0 8 0 amappl3 96 1707 0 1609 3 0 3 3 0 8 0 amappl2 88 625 0 540 3 0 3 3 0 8 0 amappl1 80 9619 0 8987 15 0 15 15 0 8 0 amappl 88 3092 0 2905 5 0 5 5 0 92 0 uvmvnodes 80 101 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 7 0 1 1 0 1 1 0 8 0 uaddrrnd 24 492 0 454 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 492 0 454 1 0 1 1 0 8 0 vmmpekpl 168 5821 0 5775 3 0 3 3 0 8 0 vmmpepl 168 40081 0 37911 101 0 101 101 0 357 1 vmsppl 488 491 0 454 7 1 6 6 0 8 0 rwobjpl 80 14518 0 13498 24 0 24 24 0 8 0 pdppl 4096 992 0 908 110 24 86 98 0 8 2 pvpl 32 14697 0 0 120 1 119 119 0 265 0 pmappl 256 491 0 454 4 1 3 3 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 283 0 27 8 0 8 8 0 8 0 ddb{1}> machine ddbcpu 0 Stopped at x86_ipi_db+0x27: addq $0x8,%rsp x86_ipi_db(ffffffff837ffff0) 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+0x33 kd_curproc sys/dev/kcov.c:585 [inline] __sanitizer_cov_trace_pc() at __sanitizer_cov_trace_pc+0x33 sys/dev/kcov.c:153 __mp_lock(ffffffff839282c0) at __mp_lock+0x1a3 __mp_lock_spin sys/kern/kern_lock.c:142 [inline] __mp_lock(ffffffff839282c0) at __mp_lock+0x1a3 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: 0x7ce9877250f0, count: 7 ddb{0}> trace x86_ipi_db(ffffffff837ffff0) 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+0x33 kd_curproc sys/dev/kcov.c:585 [inline] __sanitizer_cov_trace_pc() at __sanitizer_cov_trace_pc+0x33 sys/dev/kcov.c:153 __mp_lock(ffffffff839282c0) at __mp_lock+0x1a3 __mp_lock_spin sys/kern/kern_lock.c:142 [inline] __mp_lock(ffffffff839282c0) at __mp_lock+0x1a3 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: 0x7ce9877250f0, count: -8 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(ffffffff833ac2fb) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff83987718,1,ffff80003c4812b8) at pool_do_get+0x5df pool_get(ffffffff83987718,1) at pool_get+0x162 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff8000fffe6550,ffff80003c481510,0,ffff80003c481460) at shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 sys_shmget(ffff8000fffe6550,ffff80003c481510,ffff80003c481460) at sys_shmget+0x195 sys/kern/sysv_shm.c:482 syscall(ffff80003c481510) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c481510) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:775 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x4e5c6d79c60, count: 7 ddb{1}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff833ac2fb) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff83987718,1,ffff80003c4812b8) at pool_do_get+0x5df pool_get(ffffffff83987718,1) at pool_get+0x162 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff8000fffe6550,ffff80003c481510,0,ffff80003c481460) at shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 sys_shmget(ffff8000fffe6550,ffff80003c481510,ffff80003c481460) at sys_shmget+0x195 sys/kern/sysv_shm.c:482 syscall(ffff80003c481510) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c481510) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:775 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x4e5c6d79c60, count: -8