Skip to content

Three perry-runtime tests flake under parallel test runs (reproduce on unmodified main) #9197

Description

@proggeramlug

Three perry-runtime lib tests fail intermittently when the suite runs in parallel (the default). They have cost four gate runs across three PRs today, each time looking like the PR's fault:

  • gc::roots::stack_maps::decode_tests::tests::discovers_a_map_from_a_later_loaded_shared_object — the consistent offender; it dlopens a shared object
  • r#box::release_tests::completed_activation_residue_is_bounded_not_linear
  • symbol::get::own_data_ic_tests::composed_symbol_field_cache_reloads_mutated_final_slot

Evidence that it is not the change under test

Why it is worth fixing rather than re-running

The failure is indistinguishable at a glance from a real regression, so every occurrence costs someone a bisect-or-believe decision — and the cheap resolution ("just re-run") is exactly the habit that hides a genuine flaky-looking regression later.

Shapes worth considering: a shared-object load and a symbol-registry/IC cache are both process-global, so parallel tests contend on state that is not per-test. Serializing these three (a mutex, serial_test, or a --test-threads=1 lane for the modules that touch process-global registries) would remove the ambiguity.

https://claude.ai/code/session_012Ys25ni6VwDKE71o1NTYAT

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions