Conversation
…s path tdd_worker_subpass_fn saves four session flags and restores them through TDD_WORKER_RETURN() at its early exits after the save, but its fall-through exit restored only tdd_subpass_active, tdd_outbound_only_active and diff_operators_active. A worker that took the seeding branch (force_diff, outbound_only and eff_iter > 0) and completed normally left delta_seeded set on its clone, which survives into the next sub-pass. The setter's condition does not change between sub-passes today, so the stale value was immediately set again, but letting force_diff or outbound_only vary per sub-pass would make the stale flag select a delta where the full relation was meant, which can under-derive. End the function with TDD_WORKER_RETURN() so the fall-through takes the same restore as those early exits. The test wraps every TDD sub-pass submitted through the test submission hook and fails if a seeding sub-pass that returned successfully changed delta_seeded on its worker, or if no seeding sub-pass ran. Its program, a transitive closure that joins reach on both columns, puts the stratum in global-read mode, the mode that sets both force_diff and outbound_only. Before the fix it observed 800 seeding sub-passes and 8 leaks, one per worker. Fixes #1977
This branch has not been deployed
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.
Summary
tdd_worker_subpass_fn's success fall-through restored three of the four saved session flags and skippeddelta_seeded. A worker that took the seeding branch (force_diff && outbound_only && eff_iter > 0) and completed normally kept the flag set on its clone into the next sub-pass. The function now ends withTDD_WORKER_RETURN(), the same restore its early exits after the save use.This is latent today. Worker clones are rebuilt at every stratum init, and the setter's condition does not change between sub-passes, so the stale value was always set again. The fix keeps it from becoming under-derivation if
force_difforoutbound_onlyever vary per sub-pass.Tests
run_delta_seeded_restore_probeintests/test_tdd_inline_workers.cwraps every TDD sub-pass submitted through the test submission hook. It fails if a successful seeding sub-pass changeddelta_seeded, or if no seeding sub-pass ran, so it cannot pass vacuously. Its program joinsreachon both columns, which puts the stratum in global-read mode, the only mode that sets bothforce_diffandoutbound_only. Before the fix it observed 800 seeding sub-passes and 8 leaks (one per worker); after the fix, none.Validation
meson test: 416 OK, 0 failed, 14 skipped.--suite tidy: 4/4 OK. uncrustify is clean on both touched files.Fixes #1977