Skip to content

aarch64: --features testing kernel panics at boot 5/5 in a ksoftirqd self-test (pre-existing, unexercised profile) #562

Description

@ryanbreen

Summary

Building the aarch64 kernel with --features testing produces a kernel that panics deterministically at boot, 5 attempts out of 5, in a softirq self-test:

panicked at kernel/src/task/softirq_tests.rs:228:5:
ksoftirqd should have processed deferred softirqs (tid=Some(2))

Pre-existing, not a regression

Reproduced on both sides of a differential built from the same tree:

Build Boots Result
main @ d10bfb40 (base of fix/x86-test-gate-honesty), --features testing 5 5/5 KERNEL PANIC, same assertion
fix/x86-test-gate-honesty @ 79066883, --features testing 5 5/5 KERNEL PANIC, same assertion

The default (featureless) aarch64 build boots clean on attempt 1 in both cases, which is why no gate has ever caught this.

Why it is invisible today

Every aarch64 boot script builds the default profile — docker/qemu/run-aarch64-boot-test-native.sh, -strict.sh, run-aarch64-stability-test.sh, run-aarch64-kthread-parallel.sh and friends all use the plain cargo build ... -p kernel --bin kernel-aarch64 line. --features testing on aarch64 is used only as a compile-only zero-warning check in review loops, so the resulting kernel is never booted.

That makes the aarch64 testing profile an unexercised configuration: it compiles cleanly and panics on contact.

Relationship to #555

Same subsystem, different assertion. #555 is a ~1% flake of test_softirq_aarch64 ("raise_softirq did not set pending bit on ARM64") under host starvation in the default profile. This one is the softirq_tests.rs:228 ksoftirqd-drain assertion and is 100% deterministic in the testing profile — which likely makes it a much cheaper repro for whoever works on the softirq family.

Repro

cargo build --release --target aarch64-breenix-kernel.json -Z build-std=core,alloc \
  -Z build-std-features=compiler-builtins-mem -p kernel --bin kernel-aarch64 --features testing
./docker/qemu/run-aarch64-boot-test-native.sh   # 5/5 FAIL: Kernel panic

Found while running the round-2 local loops for #545 PR-A.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions