S131 · SOURCE-BOUND GATE EVIDENCE
K1/MEM1–MEM2: current-task deferred OOM ve later-stack reaper
Operations --test hedefi → focused test içindeki include_str!/#[path] bağı → kaynak kesiti Bu sayfa yalnız S131 kapısına aittir; komşu kapıların kaynakları bu kabulün içine katılmaz.
S131Focused kod testiOperations id exactsource SHA exacttest target exact
operation: k1-mem1-mem2-current-task-deferred-oom-partial
uygulama/model · focused test · Operations · 3 exact excerpt
sequence-bound=true · implementation-bound=true
01 · Testin bağlı olduğu uygulama/model kodu
Kapının yürüttüğü gerçek kaynak
tam Rust öğesiL5421–L5497
kernel/src/task/scheduler.rs::service_deferred_current_runtime_oom
/// Run on a non-victim stack. It first lets the ordinary deferred slot hand
/// the exact retired task to the S130 reaper, then completes the live ticket
/// from the authoritative RuntimeMemory audit. Event delivery remains a
/// separate supervisor action on the returned coordinator.
pub unsafe fn service_deferred_current_runtime_oom(
) -> Result<Option<DeferredRuntimeOomCompletion>, RuntimeOomTaskExecutionError> {
let _irq_guard = crate::arch::aarch64::IrqGuard::new();
#[cfg(all(target_arch = "aarch64", target_os = "none", feature = "board-rpi5"))]
let s344_writer_access = crate::g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s344_deferred_current_runtime_oom_writer_guard_integration::acquire_s344_production_scheduler_writer_access()
.unwrap_or_else(|error| {
panic!(
"S344 deferred current-runtime-OOM scheduler writer guard failed closed: {:?}",
error
)
});
let sched = &mut *core::ptr::addr_of_mut!(SCHEDULER);
sched.reap_retired_task();
let Some(mut carrier) = sched.deferred_current_runtime_oom.take() else {
#[cfg(all(target_arch = "aarch64", target_os = "none", feature = "board-rpi5"))]
drop(s344_writer_access);
return Ok(None);
};
let Some(witness) = carrier.witness else {
sched.deferred_current_runtime_oom = Some(carrier);
#[cfg(all(target_arch = "aarch64", target_os = "none", feature = "board-rpi5"))]
drop(s344_writer_access);
return Ok(None);
};
if sched.current_task.as_ref().map(|task| task.id) == Some(witness.task_id) {
sched.deferred_current_runtime_oom = Some(carrier);
#[cfg(all(target_arch = "aarch64", target_os = "none", feature = "board-rpi5"))]
drop(s344_writer_access);
return Err(RuntimeOomTaskExecutionError::DeferredWrongLocation);
}
let event_id = match crate::mm::with_boot_runtime_memory(|memory| {
carrier
.coordinator
.complete_teardown(&mut carrier.ticket, memory, witness)
}) {
Ok(Ok(event_id)) => event_id,
Ok(Err(error)) => {
sched.deferred_current_runtime_oom = Some(carrier);
#[cfg(all(target_arch = "aarch64", target_os = "none", feature = "board-rpi5"))]
drop(s344_writer_access);
return Err(RuntimeOomTaskExecutionError::CoordinatorCompletion(error));
}
Err(_) => {
sched.deferred_current_runtime_oom = Some(carrier);
#[cfg(all(target_arch = "aarch64", target_os = "none", feature = "board-rpi5"))]
drop(s344_writer_access);
return Err(RuntimeOomTaskExecutionError::BootMemoryAuthority);
}
};
#[cfg(all(target_arch = "aarch64", target_os = "none", feature = "board-rpi5"))]
drop(s344_writer_access);
let lifecycle_complete = witness.ipc_lifecycle_closed
&& witness.address_space_quiesced
&& witness.page_tables_released
&& witness.asid_released;
let ipc_teardown = carrier
.ipc_teardown
.ok_or(RuntimeOomTaskExecutionError::IpcLifecycle)?;
let execution = RuntimeOomTaskExecution {
event_id,
task_id: witness.task_id,
domain: witness.domain,
lifecycle_complete,
ipc_teardown,
};
Ok(Some(DeferredRuntimeOomCompletion {
monitor: carrier.monitor,
coordinator: carrier.coordinator,
execution,
}))
}snippet sha256: 39bbb8aecf89…file sha256: 838dd474448c…
02 · Doğrulayan test kodu
Operations komutuna bağlı focused test
tam Rust öğesiL110–L122
simulation/tests/runtime_oom_current_deferred.rs::qemu_executes_current_victim_and_requires_later_stack_completion_marker
#[test]
fn qemu_executes_current_victim_and_requires_later_stack_completion_marker() {
assert!(EXCEPTIONS.contains("execute_armed_current_runtime_oom_if_target"));
assert!(MAIN.contains("run_qemu_current_runtime_oom_smoke"));
assert!(MAIN.contains("qemu_current_runtime_oom_supervisor"));
assert!(MAIN.contains("[K1-MEM2-S131]"));
assert!(MAIN.contains("CURRENT=YES"));
assert!(MAIN.contains("LATER_STACK=YES"));
assert!(QEMU_SMOKE.contains("K1-MEM2-S131"));
assert!(QEMU_SMOKE.contains("CURRENT=YES"));
assert!(QEMU_SMOKE.contains("LATER_STACK=YES"));
}snippet sha256: 5c79d8387207…file sha256: ca1621a48cb8…
03 · Kapı kimlik kaydı
Operations sıra, kimlik ve başlık bağı
tam Operations kaydıL26309–L26409
website/src/lib/operations.ts::k1-mem1-mem2-current-task-deferred-oom-partial
{
id: "k1-mem1-mem2-current-task-deferred-oom-partial",
date: "2026-08-23",
sequence: 131,
status: "passed",
umbrella_status: "partial",
title: "K1/MEM1–MEM2: current-task deferred OOM ve later-stack reaper",
summary:
"S131, S130'da açık kalan current-task OOM sınırını tek-slotlu sabit scheduler carrier ile kapatır. S128 monitor, S129 coordinator ve lineer ticket hedef stack'inden çıkarılır; hedef Current olduğunda ticket/task/domain/frame bağı yeniden audit edilir, IPC kapanışından sonra Dead commit ve kernel-root/ASID quiescence gelir. Kurban başka task'a switch etmeden page-table/frame/ASID sahibi düşürülmez. QEMU supervisor task'ı reaper ve authoritative completion'ı yalnız later stack'te yürüttü; current victim frame'leri 5→0, PMM free 6134→6139, event delivery/ACK/rearm exact PASS oldu. Live IPC graph, production pressure trigger ve Generic SMP açık; K1/MEM0–MEM2 PARTIAL.",
evidence: [
"RED kapısı production carrier/seam'leri yokken 0/5, exit101; fixed authority carrier, current re-audit, deferred switch, later-stack completion ve QEMU marker eksikti.",
"GREEN `runtime_oom_current_deferred` 5/5; S128–S131 scheduler/IPC/ASID/kmap/lifecycle birleşik focused matrisi 104/104 (20 grup) PASS.",
"Carrier RuntimePressureMonitor + RuntimeOomCoordinator + non-Copy RuntimeOomTeardownTicket + optional witness taşır; Vec/Box içermez ve kurban stack'inde authority bırakmaz.",
"QEMU marker: task=3, supervisor=4, domain=1330597170, event=1, expected/observed 5/0, free 6134→6139, CURRENT=YES, CARRIER=STATIC, LATER_STACK=YES, IPC/QUIESCED/TABLES/ASID/ACK=YES, REARM=2, LEVEL=NORMAL, EXECUTOR=PASS.",
"QEMU strict ELF W^X 4/4, S130 Ready-task OOM, RuntimePmm baseline 6144→6144, EL0 return x4096, IPC reply 3/3 ve scheduler SEC5 regresyonlarını birlikte geçti.",
"AArch64 board-qemu, board-rpi4, board-rpi5 ve board-rpi5+smp compile applicability 4/4 PASS.",
"Tam workspace yalnız bağımsız frozen S96 exceptions.S SHA-256 uyuşmazlığında durdu: observed f7b47672…04fd, expected c0eed3e2…cb89; full GREEN iddia edilmedi.",
"Kalıcı kapsam ve açık S132 sınırı: `docs/K1-S131-Current-Task-Deferred-OOM-Proof.md`.",
],
commands: [
"cargo test -p aselsan_microkernel_simulation --test runtime_oom_current_deferred -- --test-threads=1",
"cargo test -p aselsan_microkernel_simulation --test aarch64_asid_encoding --test ipc_queue_source --test kernel_kmap_source --test memory_accounting --test memory_pressure --test runtime_allocation_token --test runtime_boot_authority --test runtime_boot_authority_fail_closed --test runtime_boot_authority_no_alloc --test runtime_domain_quota --test runtime_elf_reclaim_source --test runtime_memory_reconciliation --test runtime_oom_effect --test runtime_oom_scheduler_executor --test runtime_oom_current_deferred --test runtime_pressure_authority --test task_id_allocator --test task_lifecycle_source --test task_publication_source --test task_spawn_asid_source -- --test-threads=1",
"cargo check -p aselsan_kernel --target aarch64-unknown-none --no-default-features --features board-qemu",
"cargo check -p aselsan_kernel --target aarch64-unknown-none --no-default-features --features board-rpi4",
"cargo check -p aselsan_kernel --target aarch64-unknown-none --no-default-features --features board-rpi5",
"cargo check -p aselsan_kernel --target aarch64-unknown-none --no-default-features --features board-rpi5,smp",
"make verify-qemu",
"cargo test --workspace -- --test-threads=1",
],
terminalSessions: [
{
id: "s131-red-missing-current-carrier",
title: "S131 RED: current-task authority carrier yok",
commandLines: [
"cargo test -p aselsan_microkernel_simulation --test runtime_oom_current_deferred -- --test-threads=1",
],
outputLines: [
"runtime_oom_current_deferred: 0/5 PASS",
"missing fixed carrier/current re-audit/deferred switch/later-stack completion/QEMU marker",
],
exitCode: 101,
outputMode: "selected",
},
{
id: "s131-green-focused-current-deferred",
title: "Current-task carrier ve birleşik lifecycle kapıları",
commandLines: [
"cargo test -p aselsan_microkernel_simulation --test runtime_oom_current_deferred -- --test-threads=1",
"cargo test -p aselsan_microkernel_simulation --test aarch64_asid_encoding --test ipc_queue_source --test kernel_kmap_source --test memory_accounting --test memory_pressure --test runtime_allocation_token --test runtime_boot_authority --test runtime_boot_authority_fail_closed --test runtime_boot_authority_no_alloc --test runtime_domain_quota --test runtime_elf_reclaim_source --test runtime_memory_reconciliation --test runtime_oom_effect --test runtime_oom_scheduler_executor --test runtime_oom_current_deferred --test runtime_pressure_authority --test task_id_allocator --test task_lifecycle_source --test task_publication_source --test task_spawn_asid_source -- --test-threads=1",
],
outputLines: [
"runtime_oom_current_deferred: 5/5 PASS",
"combined focused matrix: 104/104 PASS · 20 groups",
"carrier: fixed scheduler slot · no Vec/Box · ticket remains linear",
],
exitCode: 0,
outputMode: "selected",
},
{
id: "s131-aarch64-qemu-current-runtime",
title: "Dört AArch64 profil ve real current-victim QEMU teardown",
commandLines: [
"cargo check -p aselsan_kernel --target aarch64-unknown-none --no-default-features --features board-qemu",
"cargo check -p aselsan_kernel --target aarch64-unknown-none --no-default-features --features board-rpi4",
"cargo check -p aselsan_kernel --target aarch64-unknown-none --no-default-features --features board-rpi5",
"cargo check -p aselsan_kernel --target aarch64-unknown-none --no-default-features --features board-rpi5,smp",
"make verify-qemu",
],
outputLines: [
"AArch64 compile profiles: 4/4 PASS",
"[K1-MEM2-S131] current-victim strict spawn PASS id=3 supervisor=4 pages=2 domain=1330597170 W^X=YES ARMED=YES",
"[K1-MEM2-S131] task=3 domain=1330597170 event=1 expected=5 observed=0 free=6134->6139 CURRENT=YES CARRIER=STATIC LATER_STACK=YES IPC=YES QUIESCED=YES TABLES=YES ASID=YES ACK=YES REARM=2 LEVEL=NORMAL EXECUTOR=PASS",
"QEMU smoke PASS: strict ELF W^X 4/4 + S130 Ready-task + S131 current-task later-stack OOM + regressions",
],
exitCode: 0,
outputMode: "selected",
},
{
id: "s131-workspace-independent-history-red",
title: "Tam workspace: S131 dışı frozen S96 identity kırmızısı",
commandLines: ["cargo test --workspace -- --test-threads=1"],
outputLines: [
"rpi5_g8h_integration_source::wiring_does_not_mutate_timer_gic_boot_or_expand_runtime_scope: FAILED",
"S96 exceptions.S SHA-256: observed f7b47672...04fd, frozen expected c0eed3e2...cb89",
"full-workspace GREEN is not claimed",
],
exitCode: 101,
outputMode: "selected",
},
],
terminalSessionsNote:
"S131 real QEMU Current-task/later-stack runtime kanıtıdır. Current victim'in IPC grafiği boştur; trigger QEMU armed successful-SVC hook'udur. Fiziksel veya device işlemi yapılmadı.",
limitations: [
"QEMU current victim empty-IPC'dir; live endpoint/reply/caller teardown runtime enjeksiyonu S132 kabulidir.",
"Successful-SVC trigger production pressure daemon/timer yolu değildir; gerçek supervisor endpoint transportu bağlı değildir.",
"Carrier tek in-flight slotudur; queue/backpressure ve supervisor crash recovery yoktur.",
"CPU0-only scheduler kanıtıdır; cross-CPU stop, migration-safe runqueue, TLB shootdown ve SMP reaper açıktır.",
"Yalnız strict RuntimePmm task'ları authoritative domain/frame bağı taşır; legacy producers açık kalır.",
"K1, MEM0, MEM1 ve MEM2 COMPLETE değildir; S124 fiziksel archive/promotion STOP kalır.",
],
},snippet sha256: f0092ea61226…file sha256: 9726dbf00f84…
Focused test komutu
cargo test -p aselsan_microkernel_simulation --test runtime_oom_current_deferred -- --test-threads=1proof: docs/K1-S131-Current-Task-Deferred-OOM-Proof.md
Registry schema v5 · generator
website/scripts/generate-code-gates.mjs · Tam SHA-256: 3050638b71a684d8f8f947a8a6faa237a17fa8db5dc0db04fb207b668b462af9