[BUG] Real AP scheduler witness stops before independently timed AP progress #41

Open
opened 2026-09-24 14:41:20 +02:00 by erikinkinen · 0 comments
Owner

Summary

The four-CPU long-mode global scheduler witness used a fixed 32-iteration bootstrap-CPU observation loop. It could finish before independently ticking application processors performed their first scheduler switch, producing GLOBAL_RUNQ failure despite all three APs being online.

Reproduction

Run the maintained subsystem-kernel-smp-long-mode-global-positive scenario against Kernel 88e4ff4c65 and Integration 6e91da8147f02f8bbd0d5c0dd87fda8dd98e94a1. One original execution starts three APs and fails GLOBAL_RUNQ. A separate observation-only diagnostic reads the already computed report without changing original operations, loop bounds or verdicts: four CPUs, 32 switches, all tasks seen, incomplete CPU participation, three attached APs and zero AP switches. Neither failure was retried for acceptance.

Expected and actual behavior

Expected: retain actual CPU/task participation evidence while real AP workers advance within a bounded clock interval. Actual: the BSP loop ended before AP progress. The correction observes independent AP counters under short guards within a retained one-second processor-clock deadline, preserves immediate errors and incomplete expiration, and releases guards before waiting. Original outer 60-second hard and 45-second silence limits remain unchanged. Simulated/trampoline deterministic workloads retain their original loops. Runtime, VM witnesses and tests are separated into documented modules below 1,000 lines.

Environment and identity

Original observed Kernel 88e4ff4c65; corrected executable Kernel 6908d2ec82 and Integration dcaa6df2e5ad30b7cf6313c880c6c8d51b47096f, with Bootloader ec00005c324ae05dc6f2faf57c496185d297726b. Four native x86-64 CPUs and long-mode AP startup.

Evidence and prior checks

Three added host regressions cover actual scheduler counters delayed beyond 32 observations, incomplete clock expiry and immediate observation failure. The corrected long-mode native run observes all three APs online and passes actual AP attachment, switches and join checks. The unrelated original startup-silence failure remains open. The corrected graph passes four SMP profiles plus seven maintained mapping, lifetime, invocation, allocator and ordinary exec-successor contracts across ten actual native executions. Mapping/isolation and sparse use their identical runtime capture with both original marker contracts. All original limits remain required. Source signatures and original normally stripped packaged Kernels verify; image warnings and QEMU stderr are absent. Four strict Kernel configurations pass 914/938 tests with three existing ignored cases, and eighteen native build/binary Clippy profiles and private rustdoc pass without warnings. Bootloader passes all four host/UEFI configurations with 34 unit and seven standalone tests, signing controls and four Python fixture suites. Integration retains all 172 helper and 100 Rust crate/fixture inputs from their complete validation. The complete manual passes 45 tests and 2,445 pages without final warnings or overflow.

Tracking

The validated coordinated changes are published in Kernel, Bootloader, Integration and the manual. Owning Kernel PR 3, Bootloader PR 3, Integration PR 12, owned address-space work and Phase 6 completion retain the broader acceptance work. Publication CI at 2026-09-24T12:49:44.573423+00:00: bootloader: 144 success, 143 success; kernel: 697 success, 696 success; docs: 1058 success, 1057 success; integration: 1778 waiting, 1777 waiting. Complete successful bootloader/kernel/docs logs retained and reviewed: 12 logs, 1,848,864 bytes, zero final warnings. Initial TeX reference warnings precede clean final passes. Original failed inputs have not been rerun; the open startup-silence report is unaffected. Full Integration regression review remains pending; keep this report open until that evidence is complete. No merge, release, performance improvement or full guest-build acceptance is claimed.

## Summary The four-CPU long-mode global scheduler witness used a fixed 32-iteration bootstrap-CPU observation loop. It could finish before independently ticking application processors performed their first scheduler switch, producing GLOBAL_RUNQ failure despite all three APs being online. ## Reproduction Run the maintained subsystem-kernel-smp-long-mode-global-positive scenario against Kernel 88e4ff4c65bbc12c89d054e52e045bd6c952346f and Integration 6e91da8147f02f8bbd0d5c0dd87fda8dd98e94a1. One original execution starts three APs and fails GLOBAL_RUNQ. A separate observation-only diagnostic reads the already computed report without changing original operations, loop bounds or verdicts: four CPUs, 32 switches, all tasks seen, incomplete CPU participation, three attached APs and zero AP switches. Neither failure was retried for acceptance. ## Expected and actual behavior Expected: retain actual CPU/task participation evidence while real AP workers advance within a bounded clock interval. Actual: the BSP loop ended before AP progress. The correction observes independent AP counters under short guards within a retained one-second processor-clock deadline, preserves immediate errors and incomplete expiration, and releases guards before waiting. Original outer 60-second hard and 45-second silence limits remain unchanged. Simulated/trampoline deterministic workloads retain their original loops. Runtime, VM witnesses and tests are separated into documented modules below 1,000 lines. ## Environment and identity Original observed Kernel 88e4ff4c65bbc12c89d054e52e045bd6c952346f; corrected executable Kernel 6908d2ec82c2e646a74a5253a21fb27fbd517c9c and Integration dcaa6df2e5ad30b7cf6313c880c6c8d51b47096f, with Bootloader ec00005c324ae05dc6f2faf57c496185d297726b. Four native x86-64 CPUs and long-mode AP startup. ## Evidence and prior checks Three added host regressions cover actual scheduler counters delayed beyond 32 observations, incomplete clock expiry and immediate observation failure. The corrected long-mode native run observes all three APs online and passes actual AP attachment, switches and join checks. The unrelated original startup-silence failure remains open. The corrected graph passes four SMP profiles plus seven maintained mapping, lifetime, invocation, allocator and ordinary exec-successor contracts across ten actual native executions. Mapping/isolation and sparse use their identical runtime capture with both original marker contracts. All original limits remain required. Source signatures and original normally stripped packaged Kernels verify; image warnings and QEMU stderr are absent. Four strict Kernel configurations pass 914/938 tests with three existing ignored cases, and eighteen native build/binary Clippy profiles and private rustdoc pass without warnings. Bootloader passes all four host/UEFI configurations with 34 unit and seven standalone tests, signing controls and four Python fixture suites. Integration retains all 172 helper and 100 Rust crate/fixture inputs from their complete validation. The complete manual passes 45 tests and 2,445 pages without final warnings or overflow. ## Tracking The validated coordinated changes are published in [Kernel](https://git.erikinkinen.fi/erix/kernel/commit/650cd1d62ae2847cf5a6d092bd276048a8f8b25c), [Bootloader](https://git.erikinkinen.fi/erix/bootloader/commit/ed8ba424bf49ad09c154ca9116d653b63973ca51), [Integration](https://git.erikinkinen.fi/erix/integration/commit/4149f332dce6567f8f2db0f503154d8980a52e48) and [the manual](https://git.erikinkinen.fi/erix/docs/commit/8af70ddcf42cb60dbf5ed0952184f2bbac14fe77). Owning [Kernel PR 3](https://git.erikinkinen.fi/erix/kernel/pulls/3), [Bootloader PR 3](https://git.erikinkinen.fi/erix/bootloader/pulls/3), [Integration PR 12](https://git.erikinkinen.fi/erix/integration/pulls/12), [owned address-space work](https://git.erikinkinen.fi/erix/kernel/issues/22) and [Phase 6 completion](https://git.erikinkinen.fi/erix/integration/issues/65) retain the broader acceptance work. Publication CI at 2026-09-24T12:49:44.573423+00:00: bootloader: [144](https://git.erikinkinen.fi/erix/bootloader/actions/runs/144) success, [143](https://git.erikinkinen.fi/erix/bootloader/actions/runs/143) success; kernel: [697](https://git.erikinkinen.fi/erix/kernel/actions/runs/697) success, [696](https://git.erikinkinen.fi/erix/kernel/actions/runs/696) success; docs: [1058](https://git.erikinkinen.fi/erix/docs/actions/runs/1058) success, [1057](https://git.erikinkinen.fi/erix/docs/actions/runs/1057) success; integration: [1778](https://git.erikinkinen.fi/erix/integration/actions/runs/1778) waiting, [1777](https://git.erikinkinen.fi/erix/integration/actions/runs/1777) waiting. Complete successful bootloader/kernel/docs logs retained and reviewed: 12 logs, 1,848,864 bytes, zero final warnings. Initial TeX reference warnings precede clean final passes. Original failed inputs have not been rerun; the open startup-silence report is unaffected. Full Integration regression review remains pending; keep this report open until that evidence is complete. No merge, release, performance improvement or full guest-build acceptance is claimed.
erikinkinen added this to the Alpha 1 milestone 2026-10-30 09:34:29 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
erix/kernel#41
No description provided.