Skip to content

Make the Linux physical-page alias test deterministic - #5

Open
gmankab wants to merge 1 commit into
spidercraft:linux-native-runtimefrom
gmankab:test/linux-physical-pages-fixture
Open

gmankab wants to merge 1 commit into
spidercraft:linux-native-runtimefrom
gmankab:test/linux-physical-pages-fixture

Conversation

@gmankab

@gmankab gmankab commented Nov 25, 2026

Copy link
Copy Markdown

The alias test expects three ascending physical page IDs. The shared pool can recycle IDs in stack order, so the test sometimes maps three separate runs. I reproduced the one-page result reported in spidercraft #4.

Temporarily hold recycled IDs before allocating the three pages under test. This keeps the contiguous-region assertion and the alias, decommit, and recycle checks. The test returns the held IDs at the end.

The alias assertion failed in 16 of 80 parallel VM suite invocations before the change and zero of 300 afterward. The full loader unit suite completed serially with 34 passes and three ignored tests. Parallel stress also exposed separate intermittent assertions in other VM tests.

Tested-on: Fedora Linux 45, x86_64 native loader
Assisted-by: gpt-6.2 sol xhigh

The pool returns recycled IDs in stack order. A prior test can
leave those IDs in descending order, making this fixture observe a
one-page region where it intended to test a three-page mapping.

Hold the recycled IDs while allocating the fixture. This exercises
the same contiguous region and the same aliased page regardless
of earlier tests, and returns the held IDs after the checks.

Tested-on: Fedora Linux 45, x86_64 native loader
Assisted-by: gpt-6.2 sol xhigh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant