8000 Post Run: Cache upload failed because file read failed with EBADF · Issue #332 · actions/setup-node · GitHub
[go: up one dir, main page]

Skip to content

Post Run: Cache upload failed because file read failed with EBADF #332

@davidwinter

Description

@davidwinter

I'm using a self-hosted GitHub Runner, and frequently I receive the following error during the Post Run actions/setup-node@2:

Post job cleanup.
/Users/davidwinter/actions-runner/_work/_tool/node/16.6.2/x64/bin/npm config get cache
/Users/davidwinter/.npm
/usr/bin/tar --posix --use-compress-program zstd -T0 -cf cache.tzst -P -C /Users/davidwinter/actions-runner/_work/nimblenote/nimblenote --files-from manifest.txt
Warning: uploadChunk (start: 33554432, end: 67108863) failed: Cache service responded with 503
/Users/davidwinter/actions-runner/_work/_actions/actions/setup-node/v2/dist/cache-save/index.js:3682
                        throw new Error(`Cache upload failed because file read failed with ${error.message}`);
                        ^

Error: Cache upload failed because file read failed with EBADF: bad file descriptor, read
    at ReadStream.<anonymous> (/Users/davidwinter/actions-runner/_work/_actions/actions/setup-node/v2/dist/cache-save/index.js:3682:31)
    at ReadStream.emit (events.js:210:5)
    at internal/fs/streams.js:167:12
    at FSReqCallback.wrapper [as oncomplete] (fs.js:470:5)

Sometimes, re-running the job will succeed fine and other times it will fail again. It's making my test run success rates completely unreliable and random.

It is occurring on both a macOS and Linux runner.

I've seen some places about changing ulimit -n but would appreciate any insight into that fix if it is known?

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0