Skip to content

fix: keep packing the queue head when the job table is full - #461

Open
official-burak wants to merge 1 commit into
isaacs:mainfrom
official-burak:fix/pack-hardlink-job-deadlock
Open

fix: keep packing the queue head when the job table is full#461
official-burak wants to merge 1 commit into
isaacs:mainfrom
official-burak:fix/pack-hardlink-job-deadlock

Conversation

@official-burak

@official-burak official-burak commented Aug 30, 2026

Copy link
Copy Markdown

Summary

Hardlinks in later subdirs can fill the async pack job table while the queue head is still pending. PROCESS then skipped the head because JOBS was already at the limit, so nothing was piped, JOBS never dropped, and the pack never ended.

create({ file }) hit the same stall: the promise never settled, the event loop drained, and Node exited 0 with a truncated archive.

Always run PROCESSJOB on the head even when the read-ahead table is full. Later jobs stay gated by jobs.

Fixes #460

Test plan

Hardlinks in later subdirs can fill the read-ahead table while the
head is still pending. PROCESS then skipped the head, so nothing was
piped, JOBS never dropped, and async pack/create hung until the
event loop drained (exit 0 with a truncated archive).

Fixes isaacs#460
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.

Async Pack still deadlocks on hardlinked files in v7.5.22 (#458 not fixed); create({file}) turns it into a silent exit-0 no-op

1 participant