Skip to content

test(code-index): pin retired pack inode in descriptor census - #4910

Merged
ScriptedAlchemy merged 1 commit into
masterfrom
fix/retention-fd-census-inode-reuse
Nov 17, 2026
Merged

ScriptedAlchemy merged 1 commit into
masterfrom
fix/retention-fd-census-inode-reuse

Conversation

@ScriptedAlchemy

@ScriptedAlchemy ScriptedAlchemy commented Nov 16, 2026 •

Copy link
Copy Markdown
Owner

Problem

ordinary_retention_waits_for_active_pack_reads_and_leaves_no_idle_payload_handles intermittently fails on Linux (left: 1, right: 0 at the final holder census), e.g. on #4903's required Test Linux check.

The census matches /proc/self/fd entries by (dev, ino) of the retired pack. After retention unlinks the pack, the kernel may reuse that inode number for a file opened by a concurrently running test in the same process, so an unrelated descriptor is counted.

Fix

Test-only: hold a descriptor on the pack for the whole test so its inode stays allocated and its number cannot be reused, and exclude only that pin from the census. All four holder assertions keep their meaning.

Verification

Ran the test on Linux (rust:1.100.0-bookworm, --cfg tokio_unstable): passes.

🤖 Generated with Claude Code


Devin Review

Retention unlinks the retired pack while sibling tests open files on the
same filesystem, so a reused inode number made the post-unlink holder
census count an unrelated descriptor. Hold a pin on the pack for the whole
test and exclude only that descriptor from the census.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Nov 16, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 4ac6977

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@ScriptedAlchemy
ScriptedAlchemy merged commit ee1b0f5 into master Nov 17, 2026
16 checks passed
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