GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — fix: reopen snapshot ref for no-op withChanges by vito · Pull Request #13820 · dagger/dagger Conversation
Contributor
ProblemOnce an empty changeset is applied anywhere on an engine, the engine can enter a state where every use of the parent directory — from any session — fails with Root cause
Instrumented runs showed the signature clearly: one real release of the shared handle from FixThe empty-changeset path now reopens its own handle via TestingNew regression test 🤖 Generated with Claude Code
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsApplying an empty changeset with Directory.withChanges stores the parent's snapshot ref instance on the derived directory. When the derived cache entry is later collected (session close plus cache prune), its OnRelease releases the shared handle, and the parent's still-cached snapshot becomes unusable: every later mount, from any session, fails with "invalid immutable ref" until the engine restarts. Reproduce with two sessions against a nested engine: one keeps the parent entry alive while the other applies an empty changeset and disconnects, then a prune loop re-mounts the parent. Signed-off-by: Alex Suraci <[email protected]> Directory.withChanges with an empty changeset returned the parent's snapshot ref instance as the derived directory's snapshot. Every cached Directory owns its handle and releases it when its cache entry is collected, so the shared instance let a collected withChanges result invalidate the parent's still-cached snapshot engine-wide (introduced in dagger#13342). Reopen the snapshot by ID instead, matching how subdirectory and diff derive their handles. Signed-off-by: Alex Suraci <[email protected]>
vito
added a commit
to vito/dagger
that referenced
this pull request
Record the withChanges empty-changeset snapshot fix in the unreleased changelog so the next release notes mention the invalid-immutable-ref failure mode it removes. Signed-off-by: Alex Suraci <[email protected]>
vito
force-pushed
the
fix-withchanges-empty-changeset
branch
from
66b12e8 to
934a440
Compare
sipsma
approved these changes
Uh oh!
There was an error while loading. Please reload this page.
vito
added a commit
that referenced
this pull request
* test: reproduce withChanges snapshot poisoning Applying an empty changeset with Directory.withChanges stores the parent's snapshot ref instance on the derived directory. When the derived cache entry is later collected (session close plus cache prune), its OnRelease releases the shared handle, and the parent's still-cached snapshot becomes unusable: every later mount, from any session, fails with "invalid immutable ref" until the engine restarts. Reproduce with two sessions against a nested engine: one keeps the parent entry alive while the other applies an empty changeset and disconnects, then a prune loop re-mounts the parent. Signed-off-by: Alex Suraci <[email protected]> * fix: reopen snapshot ref for no-op withChanges Directory.withChanges with an empty changeset returned the parent's snapshot ref instance as the derived directory's snapshot. Every cached Directory owns its handle and releases it when its cache entry is collected, so the shared instance let a collected withChanges result invalidate the parent's still-cached snapshot engine-wide (introduced in #13342). Reopen the snapshot by ID instead, matching how subdirectory and diff derive their handles. Signed-off-by: Alex Suraci <[email protected]> --------- Signed-off-by: Alex Suraci <[email protected]>
marcosnils
pushed a commit
to marcosnils/dagger
that referenced
this pull request
* test: reproduce withChanges snapshot poisoning Applying an empty changeset with Directory.withChanges stores the parent's snapshot ref instance on the derived directory. When the derived cache entry is later collected (session close plus cache prune), its OnRelease releases the shared handle, and the parent's still-cached snapshot becomes unusable: every later mount, from any session, fails with "invalid immutable ref" until the engine restarts. Reproduce with two sessions against a nested engine: one keeps the parent entry alive while the other applies an empty changeset and disconnects, then a prune loop re-mounts the parent. Signed-off-by: Alex Suraci <[email protected]> * fix: reopen snapshot ref for no-op withChanges Directory.withChanges with an empty changeset returned the parent's snapshot ref instance as the derived directory's snapshot. Every cached Directory owns its handle and releases it when its cache entry is collected, so the shared instance let a collected withChanges result invalidate the parent's still-cached snapshot engine-wide (introduced in dagger#13342). Reopen the snapshot by ID instead, matching how subdirectory and diff derive their handles. Signed-off-by: Alex Suraci <[email protected]> --------- Signed-off-by: Alex Suraci <[email protected]> (cherry picked from commit b1c2c81)
marcosnils
pushed a commit
to marcosnils/dagger
that referenced
this pull request
* test: reproduce withChanges snapshot poisoning Applying an empty changeset with Directory.withChanges stores the parent's snapshot ref instance on the derived directory. When the derived cache entry is later collected (session close plus cache prune), its OnRelease releases the shared handle, and the parent's still-cached snapshot becomes unusable: every later mount, from any session, fails with "invalid immutable ref" until the engine restarts. Reproduce with two sessions against a nested engine: one keeps the parent entry alive while the other applies an empty changeset and disconnects, then a prune loop re-mounts the parent. Signed-off-by: Alex Suraci <[email protected]> * fix: reopen snapshot ref for no-op withChanges Directory.withChanges with an empty changeset returned the parent's snapshot ref instance as the derived directory's snapshot. Every cached Directory owns its handle and releases it when its cache entry is collected, so the shared instance let a collected withChanges result invalidate the parent's still-cached snapshot engine-wide (introduced in dagger#13342). Reopen the snapshot by ID instead, matching how subdirectory and diff derive their handles. Signed-off-by: Alex Suraci <[email protected]> --------- Signed-off-by: Alex Suraci <[email protected]> (cherry picked from commit b1c2c81)
marcosnils
pushed a commit
to marcosnils/dagger
that referenced
this pull request
* test: reproduce withChanges snapshot poisoning Applying an empty changeset with Directory.withChanges stores the parent's snapshot ref instance on the derived directory. When the derived cache entry is later collected (session close plus cache prune), its OnRelease releases the shared handle, and the parent's still-cached snapshot becomes unusable: every later mount, from any session, fails with "invalid immutable ref" until the engine restarts. Reproduce with two sessions against a nested engine: one keeps the parent entry alive while the other applies an empty changeset and disconnects, then a prune loop re-mounts the parent. Signed-off-by: Alex Suraci <[email protected]> * fix: reopen snapshot ref for no-op withChanges Directory.withChanges with an empty changeset returned the parent's snapshot ref instance as the derived directory's snapshot. Every cached Directory owns its handle and releases it when its cache entry is collected, so the shared instance let a collected withChanges result invalidate the parent's still-cached snapshot engine-wide (introduced in dagger#13342). Reopen the snapshot by ID instead, matching how subdirectory and diff derive their handles. Signed-off-by: Alex Suraci <[email protected]> --------- Signed-off-by: Alex Suraci <[email protected]> (cherry picked from commit b1c2c81)
marcosnils
pushed a commit
that referenced
this pull request
* test: reproduce withChanges snapshot poisoning Applying an empty changeset with Directory.withChanges stores the parent's snapshot ref instance on the derived directory. When the derived cache entry is later collected (session close plus cache prune), its OnRelease releases the shared handle, and the parent's still-cached snapshot becomes unusable: every later mount, from any session, fails with "invalid immutable ref" until the engine restarts. Reproduce with two sessions against a nested engine: one keeps the parent entry alive while the other applies an empty changeset and disconnects, then a prune loop re-mounts the parent. Signed-off-by: Alex Suraci <[email protected]> * fix: reopen snapshot ref for no-op withChanges Directory.withChanges with an empty changeset returned the parent's snapshot ref instance as the derived directory's snapshot. Every cached Directory owns its handle and releases it when its cache entry is collected, so the shared instance let a collected withChanges result invalidate the parent's still-cached snapshot engine-wide (introduced in #13342). Reopen the snapshot by ID instead, matching how subdirectory and diff derive their handles. Signed-off-by: Alex Suraci <[email protected]> --------- Signed-off-by: Alex Suraci <[email protected]> (cherry picked from commit b1c2c81)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ReviewersUh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabels
None yet
ProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. Uh oh!
There was an error while loading. Please reload this page. 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. |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |