DF-4780 / run.log
############################################################################
# DF-4780 run.log โ decisive run (fresh boot of with-src snapshot)
############################################################################
# command: timeout 75 vm.sh run_root 'kldload /tmp/pc/patchcpu.ko && echo PATCH_LOADED
# && kldload /tmp/ccsi/corecstat.ko'
# (corecstat.ko = pristine source + "#define INVARIANTS 1" on line 1; with the define
# the module measures 11840 bytes vs 11536 stock and contains the KKASSERT panic
# string "assertion ... failed in" โ verified before loading: grep -c assertion == 1)
############################################################################
PATCH_LOADED
RUN_RC=124 <- ssh never returns: kernel stopped in DDB (see panic.txt)
# serial console capture (vm.sh log 120) โ full text also in panic.txt:
login: patchcpu: cpu_id 0x00060fb1 -> 0x00030661 (family 06h model 36h Atom)
corecstat0: <CPU Package C-State residency counters> on cpu0
device_probe_and_attach: corecstat0 attach returned 6
corecstat1: <CPU Package C-State residency counters> on cpu1
device_probe_and_attach: corecstat1 attach returned 6
corecstat2: <CPU Package C-State residency counters> on cpu2
device_probe_and_attach: corecstat2 attach returned 6
corecstat3: <CPU Package C-State residency counters> on cpu3
device_probe_and_attach: corecstat3 attach returned 6
corecstat4: <CPU Package C-State residency counters> on cpu4
device_probe_and_attach: corecstat4 attach returned 6
corecstat5: <CPU Package C-State residency counters> on cpu5
msr node0 PC2 residency (0x000003f8) not available
msr node0 PC4 residency (0x000003f9) not available
msr node0 PC6 residency (0x000003fa) not available
panic: assertion "sc->sc_version != 0" failed in corecstat_init_atom_cpu at corecstat.c:425
cpuid = 4
Trace beginning at frame 0xfffff801166fb708
corecstat_attach() at corecstat_attach+0x561 0xffffffff82601c41
corecstat_attach() at corecstat_attach+0x561 0xffffffff82601c41
device_doattach() at device_doattach+0x3af 0xffffffff8068dbef
bus_generic_driver_added() at bus_generic_driver_added+0x68 0xffffffff8068f9d8
devclass_add_driver() at devclass_add_driver+0xf3 0xffffffff8068cc73
module_register_init() at module_register_init+0x49 0xffffffff806232e9
Debugger("panic")
CPU4 stopping CPUs: 0x0000002f
stopped
Stopped at Debugger+0x7c: movb $0,0xbdaf09(%rip)
db>
# vm.sh status => down
############################################################################
# First reproduction (earlier boot, identical construction) โ same result:
############################################################################
PATCH_LOADED
CORECSTAT_LOADED <- load itself returned; panic fired during attach of cpu5
(module_register_init path) and the follow-up ssh died
patchcpu: cpu_id 0x00060fb1 -> 0x00030661 (family 06h model 36h Atom)
corecstat0..4: device_probe_and_attach: corecstatN attach returned 6
corecstat5: <CPU Package C-State residency counters> on cpu5
msr node0 PC2 residency (0x000003f8) not available
msr node0 PC4 residency (0x000003f9) not available
msr node0 PC6 residency (0x000003fa) not available
msr node0 core5 C1 res. (0x00000660) not available <- only on PRODUCTION builds
msr node0 core5 C6 res. (0x000003fd) not available <- (KKASSERT compiled out):
see production-fallthrough
log below
panic: assertion "sc->sc_version != 0" failed in corecstat_init_atom_cpu at corecstat.c:425
cpuid = 1
Trace beginning at frame 0xfffff801184f5708
corecstat_attach() at corecstat_attach+0x561 0xffffffff82601c41
corecstat_attach() at corecstat_attach+0x561 0xffffffff82601c41
device_doattach() at device_doattach+0x3af 0xffffffff8068dbef
bus_generic_driver_added() at bus_generic_driver_added+0x68 0xffffffff8068f9d8
devclass_add_driver() at devclass_add_driver+0xf3 0xffffffff8068cc73
module_register_init() at module_register_init+0x49 0xffffffff806232e9
Debugger("panic")
CPU1 stopping CPUs: 0x0000003d
stopped
Stopped at Debugger+0x7c: movb $0,0xbdaf09(%rip)
db>
############################################################################
# PRODUCTION-build fall-through (stock module, NO INVARIANTS; same cpu_id patch):
# the "impossible" version-0 core-sensor init runs instead of panicking:
############################################################################
patchcpu: cpu_id 0x00060fb1 -> 0x00030661 (family 06h model 36h Atom)
corecstat0: <CPU Package C-State residency counters> on cpu0
device_probe_and_attach: corecstat0 attach returned 6
corecstat1: <CPU Package C-State residency counters> on cpu1
device_probe_and_attach: corecstat1 attach returned 6
corecstat2: <CPU Package C-State residency counters> on cpu2
device_probe_and_attach: corecstat2 attach returned 6
corecstat3: <CPU Package C-State residency counters> on cpu3
device_probe_and_attach: corecstat3 attach returned 6
corecstat4: <CPU Package C-State residency counters> on cpu4
device_probe_and_attach: corecstat4 attach returned 6
corecstat5: <CPU Package C-State residency counters> on cpu5
msr node0 PC2 residency (0x000003f8) not available
msr node0 PC4 residency (0x000003f9) not available
msr node0 PC6 residency (0x000003fa) not available
msr node0 core5 C1 res. (0x00000660) not available
msr node0 core5 C6 res. (0x000003fd) not available
# guest stayed up; load completed; kldunload clean. No panic (KKASSERT is
# INVARIANTS-only, sys/sys/systm.h:94-119).