Skip to content

fix: remove the finished job from the pack queue in JOBDONE - #468

Open
00200200 wants to merge 1 commit into
isaacs:mainfrom
00200200:fix/pack-jobdone-unsupported-queue
Open

00200200 wants to merge 1 commit into
isaacs:mainfrom
00200200:fix/pack-jobdone-unsupported-queue

Conversation

@00200200

Copy link
Copy Markdown

Summary

  • JOBDONE always shift()ed the pack queue head. Unsupported entry types (sockets, FIFOs, devices) finish WriteEntry with no header as soon as they are constructed, which can happen while they are still read-ahead jobs.
  • When two such entries follow a regular file, their completions drop the file that is still being packed, JOBS never drains, and create() never settles (#295).
  • Remove the completed job from the queue specifically (head or middle) so unsupported read-ahead entries cannot displace the current file.

Test plan

  • New regression in test/pack.js mocks delayed lstat for the file and synchronous socket-like stats for two later entries so the hang is deterministic
  • Confirmed the new test fails on current main (Pack hung on unsupported read-ahead entries) and passes with this change
  • Full test/pack.js run: only pre-existing zstd unsupported failures remain

Fixes #295

Unsupported entries (sockets, FIFOs, devices) end WriteEntry with no
header as soon as they are constructed. When that happens for a
read-ahead job, shifting the queue head drops the file being packed and
stalls create(). Remove the completed job specifically instead.

Fixes isaacs#295

This branch has not been deployed

No deployments
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.

[BUG] "Create" hangs on linux socket files

1 participant