Repository navigation
Conversation
The worker loop's exception frame, jump0 in the worker context, is pushed with a setjmp by the first continuation after each poll, and it is dropped and zeroed right before the next poll. The setjmp saves the registers that the loop keeps across calls. In an optimized build these hold the continuation that the worker runs and its argument, so a frame that stays pushed keeps them, and the actors they reach, alive. A debug build keeps these values on the stack instead. make test-stdlib ran test_cleanup.act only in a debug build, where the tests pass whether the frame is dropped or not. It now also runs that module with --fast and 16 workers. A frame that stays pushed keeps what the first continuation of its worker reached. So the tests fail only if some worker ran a continuation of a test's actors first, and more workers make that more likely. On cbb0194, before actor construction became synchronous, the tests passed with 4 workers, the default on a machine with 4 cores, also when the frame stayed pushed. Runs of the timer and raise cleanup tests on an M4 Pro, with a frame that is pushed once per worker and never dropped. "4 cores" means the four efficiency cores only (taskpolicy -b), like a runner with 4 vCPUs: build workers cores timer test raise test debug 16 all 10/10 pass 10/10 pass debug 16 4 10/10 pass 10/10 pass --fast 4 all 0/10 pass 0/10 pass --fast 4 4 1/10 pass 0/10 pass --fast 16 all 0/10 pass 0/10 pass --fast 16 4 0/10 pass 0/10 pass On main, all four cleanup tests passed 20 of 20 runs in each of the --fast rows. The new step takes 25 s on the M4 Pro with an empty compile cache, most of it to build base and std with --fast, and 1.4 s with a warm one.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
make test-stdlib now also runs test_cleanup.act with --fast and 16 workers. In a debug build the cleanup tests pass also when the worker loop's exception frame, jump0, is never dropped, so no test covered the part of #3435 that drops it before each poll.