https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=285415
Bug ID: 285415
Summary: [Hyper-V] i386 panic during vm_phys_early_startup()
Product: Base System
Version: 15.0-CURRENT
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: kern
Assignee: [email protected]
Reporter: [email protected]
Summary: [Hyper-V] i386 panic during vm_phys_early_startup()
In base 8a14ddcc1d8e4 ("vm_phys: Check for overlap when adding a segment"),
olce@ added sanity checks for overlapping segments added via
_vm_phys_create_seg().
When I boot a recent i386 snapshot on Hyper-V, using a "Generation 1" VM for
BIOS support, the installer kernel immediately panics with:
GDB: no debug ports present
KDB: debugger backends: ddb
KDB: current backend: ddb
---<<BOOT>>---
Copyright (c) 1992-2025 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 15.0-CURRENT #0 main-n275921-cabf76fde836: Thu Mar 13 03:47:27 UTC
2025
[email protected]:/usr/obj/usr/src/i386.i386/sys/GENERIC i386
FreeBSD clang version 19.1.7 (https://github.com/llvm/llvm-project.git
llvmorg-19.1.7-0-gcd708029e0b2)
WARNING: WITNESS option enabled, expect reduced performance.
WARNING: 32-bit kernels are deprecated and may be removed in FreeBSD 15.0.
panic: Overlapping physical segments: Current [0x2000000,0x20f0000) at index
2, previous [0x1000000,0x2100000)
cpuid = 0
time = 1
KDB: stack backtrace:
db_trace_self_wrapper(0,1a543e0,0,186a804,0,...) at
db_trace_self_wrapper+0x28/frame 0x20f9490
vpanic(14836b9,20f94cc,20f94cc,20f950c,128637b,...) at vpanic+0xf4/frame
0x20f94ac
panic(14836b9,2000000,0,20f0000,0,...) at panic+0x14/frame 0x20f94c0
vm_phys_create_seg(20f0000,0) at vm_phys_create_seg+0x11b/frame 0x20f950c
vm_phys_add_seg(2000000,0,20f0000,0) at vm_phys_add_seg+0xa9/frame 0x20f9528
vm_phys_early_startup(46,181fad4,20f957c,2930000,1a54cac,...) at
vm_phys_early_startup+0x70/frame 0x20f9548
vm_page_startup(2930000) at vm_page_startup+0x1e/frame 0x20f958c
vm_mem_init(0) at vm_mem_init+0x18/frame 0x20f9598
mi_startup() at mi_startup+0x1a4/frame 0x20f95b8
btext() at btext+0x5f
KDB: enter: panic
[ thread pid 0 tid 0 ]
Stopped at kdb_enter+0x34: movl $0,kdb_why
The only older i386 ISO snapshot I had lying around was 20241003, and that does
boot to the user-space installer. On IRC, several people asked me to provide
SMAP and boot -v output from such a successful boot:
machdep.smap:
SMAP type=01, xattr=00, base=0000000000000000, len=000000000009fc00
SMAP type=02, xattr=00, base=000000000009fc00, len=0000000000000400
SMAP type=02, xattr=00, base=00000000000e0000, len=0000000000020000
SMAP type=01, xattr=00, base=0000000000100000, len=00000000bfef0000
SMAP type=03, xattr=00, base=00000000bfff0000, len=000000000000f000
SMAP type=04, xattr=00, base=00000000bffff000, len=0000000000001000
vm.phys_segs:
SEGMENT 0:
start: 0x1000
end: 0x9f000
domain: 0
free list: 0x1adddc8
SEGMENT 1:
start: 0x100000
end: 0x1000000
domain: 0
free list: 0x1adddc8
SEGMENT 2:
start: 0x1000000
end: 0x2100000
domain: 0
free list: 0x1addd44
SEGMENT 3:
start: 0x2000000
end: 0x20f0000
domain: 0
free list: 0x1addd44
SEGMENT 4:
start: 0x2100000
end: 0xbcaef000
domain: 0
free list: 0x1addd44
>From the panic backtrace it looks like segment 3 is being inserted at that
time. You can see that the older snapshot appears to boot fine, even though
segments 2 and 3 overlap from 0x2000000 to 0x2100000.
@jhb said I should create this PR and bug @markj about it, since he appears to
be the author of the early phys_seg stuff :)
--
You are receiving this mail because:
You are the assignee for the bug.