head -r331499 amd64/threadripper panic in vm_page_free_prep during "poudriere bulk -a", after 14h 22m or so.

Mark Millard marklmi26-fbsd at yahoo.com
Sun Mar 25 18:01:56 UTC 2018

FreeBSD panic'd while attempting to see if a "poudriere bulk -w -a"
would get the "unnecessary swapping" problem in my UFS-only context,
-r331499 (non-debug but with symbols), under Hyper-V. This is a
Ryzen Threadripper context, but I've no clue if that is important
to the problem. This was after 14 hours or so of building:

. . .
[14:22:05] [18] [00:01:16] Finished devel/p5-Test-HTML-Tidy | p5-Test-HTML-Tidy-1.00_1: Success
[14:22:08] [18] [00:00:00] Building devel/ocaml-camlp5 | ocaml-camlp5-6.16

So I've no clue if or how to repeat this.

Unfortunately dump was unsuccessful. So all I have is the
backtrace. Hand typed from a screen shot of the console

cpuid = 18
time = 1521986594
KDB: stack backtrace:
db_trace_self_srapper() at db_trace_self_srapper+0x2b/frame 0xfffffe00f2e132a0
vpanic() at vpanic+0x18d/frame 0xfffffe00f2e13300
panic() at panic+0c43/frame 0xfffffe00f2e13360
vm_page_free_prep() at vm_page_free_prep+0x174/frame 0xfffffe00f2e13390
vm_page_free_toq() at vm_page_free_toq+0x11/frame 0xfffffe00f2e133b0
unlock_and_deallocate() at unlock_and_deallocate+0xbb/frame 0xfffffe00f2e133d0
vm_fault_hold() at vm_fault_hold+0x1d04/frame 0xfffffe00f2e13500
proc_rwmem() at proc_rwmem+0x8d/frame 0xfffffe00f2e13570
proc_readmem() at proc_readmem+0x46/frame 0xfffffe00f2e135d0
get_proc_vector() at get_proc_vector+0x16e/frame 0xfffffe00f2e13660
proc_getauxv() at proc_getauxv+0x26/frame 0xfffffe00f2e136a0
elf64_note_procstat_auxv() at elf64_note_procstat_auxv+0x1ee/frame 0xfffffe00f2e136f0
elf64_coredump() at elf64coredump+0x57c7/frame 0xfffffe00f2e137c0
sigexit() at sigexit+0x76f/frame 0xfffffe00f2e139b0
postsig() at postsig+0x289/frame 0xfffffe00f2e13a70
ast() at ast+0x357/frame 0xfffffe00f2e13ab0
doreti_ast() at doreti_ast+0x1f/frame 0x706d6f6320432041
KBD: enter: panic
[ thread pid 61836 tid 101063 ]
Stopped at kdb_enter+0x3b: movq $0,kdb_why

The Hyper-V/Ryzen-Threadripper context was/is:

FreeBSD 12.0-CURRENT  r331499M amd64
FreeBSD clang version 6.0.0 (tags/RELEASE_600/final 326565) (based on LLVM 6.0.0)
SRAT: Ignoring memory at addr 0x1b28200000
VT(vga): text 80x25
Hyper-V Version: 10.0.16299 [SP0]
  PM Features=0x0 [C2]
Timecounter "Hyper-V" frequency 10000000 Hz quality 2000
CPU: AMD Ryzen Threadripper 1950X 16-Core Processor  (3393.73-MHz K8-class CPU)
  Origin="AuthenticAMD"  Id=0x800f11  Family=0x17  Model=0x1  Stepping=1
  AMD Features=0x2e500800<SYSCALL,NX,MMX+,FFXSR,Page1GB,RDTSCP,LM>
  AMD Features2=0x3f3<LAHF,CMP,CR8,ABM,SSE4A,MAS,Prefetch,OSVW>
  Structured Extended Features=0x201c01a9<FSGSBASE,BMI1,AVX2,SMEP,BMI2,RDSEED,ADX,SMAP,SHA>
  AMD Extended Feature Extensions ID EBX=0x4<XSaveErPtr>
Hypervisor: Origin = "Microsoft Hv"
real memory  = 115964116992 (110592 MB)
avail memory = 112847249408 (107619 MB)
Event timer "LAPIC" quality 600
FreeBSD/SMP: Multiprocessor System Detected: 29 CPUs
FreeBSD/SMP: 1 package(s) x 29 core(s)

(I leave 3 hardware threads and some of the 128 GiBytes
of memory for Windows 10 Pro x64.)

FreeBSD and its swap are directly on NVMe SSDs, not in
NTFS file(s).

The M in -r331499M is for powerpc64/powerpc/arm64/armv7
related experiments, not amd64:

# svnlite status /usr/src/ | sort
?       /usr/src/nohup.out
?       /usr/src/sys/amd64/conf/GENERIC-DBG
?       /usr/src/sys/amd64/conf/GENERIC-NODBG
?       /usr/src/sys/arm/conf/GENERIC-DBG
?       /usr/src/sys/arm/conf/GENERIC-NODBG
?       /usr/src/sys/arm64/conf/GENERIC-DBG
?       /usr/src/sys/arm64/conf/GENERIC-NODBG
?       /usr/src/sys/dts/arm/a83t.dtsi
?       /usr/src/sys/dts/arm/sinovoip-bpi-m3.dts
?       /usr/src/sys/dts/arm/sun8i-a83t-sinovoip-bpi-m3.dts
?       /usr/src/sys/dts/arm/sun8i-a83t.dtsi
?       /usr/src/sys/powerpc/conf/GENERIC64vtsc-DBG
?       /usr/src/sys/powerpc/conf/GENERIC64vtsc-NODBG
?       /usr/src/sys/powerpc/conf/GENERICvtsc-DBG
?       /usr/src/sys/powerpc/conf/GENERICvtsc-NODBG
M       /usr/src/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp
M       /usr/src/contrib/llvm/tools/lld/ELF/Arch/PPC64.cpp
M       /usr/src/crypto/openssl/crypto/armcap.c
M       /usr/src/lib/libkvm/kvm_powerpc.c
M       /usr/src/lib/libkvm/kvm_private.c
M       /usr/src/stand/defs.mk
M       /usr/src/stand/powerpc/boot1.chrp/Makefile
M       /usr/src/stand/powerpc/kboot/Makefile
M       /usr/src/sys/arm64/arm64/identcpu.c
M       /usr/src/sys/conf/kmod.mk
M       /usr/src/sys/conf/ldscript.powerpc
M       /usr/src/sys/kern/subr_pcpu.c
M       /usr/src/sys/modules/dtb/allwinner/Makefile
M       /usr/src/sys/powerpc/aim/mmu_oea64.c
M       /usr/src/sys/powerpc/ofw/ofw_machdep.c
M       /usr/src/sys/powerpc/powerpc/interrupt.c
M       /usr/src/sys/powerpc/powerpc/mp_machdep.c
M       /usr/src/sys/powerpc/powerpc/trap.c
M       /usr/src/usr.bin/top/machine.c

That last is because I've modified top to also report
for swap:

Maximum Observed Used

(abbreviated: MaxObsUsed) when it is positive. For

Swap: 256G Total, 483M Used, 483M MaxObsUsed, 256G Free

Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)

More information about the freebsd-hackers mailing list