Skip to content

Error: EBADF: bad file descriptor, read #154

Closed

Description

@myyra

When trying to cache the Xcode DerivedData directory on macOS (~/Library/Developer/Xcode/DerivedData), I get the this error:

[warning]write EPIPE
events.js:187
      throw er; // Unhandled 'error' event
      ^

Error: EBADF: bad file descriptor, read
Emitted 'error' event on ReadStream instance at:
    at internal/fs/streams.js:167:12
    at FSReqCallback.wrapper [as oncomplete] (fs.js:470:5) {
  errno: -9,
  code: 'EBADF',
  syscall: 'read'
}
##[error]Node run failed with exit code 1

Only additional info I can add is that the directory contains a lot of files (ls ** won't run almost anywhere inside)

Activity

  1. josharian commented on Jan 21, 2020

    @josharian

    I have also experienced this using the standard Go modules cache example. The error was transient (it did not occur next run), but something else seems to have been broken by it, since all attempts to cache afterwards have failed.

  2. Pintouch commented on Jan 22, 2020

    @Pintouch

    Also experiencing the same thing, we got the same thing using it to cache yarn cache folder on a recent Action build, we didn't change anything in our workflow, here is the output:

    Post job cleanup.
    /bin/tar -cz -f /home/runner/work/_temp/06b9cad5-a82c-4ae4-aae8-89bdb7b69f24/cache.tgz -C /home/runner/.cache/yarn/v6 .
    [warning]Cache service responded with 404 during chunk upload.
    events.js:187
          throw er; // Unhandled 'error' event
          ^
    
    Error: EBADF: bad file descriptor, read
    Emitted 'error' event on ReadStream instance at:
        at internal/fs/streams.js:167:12
        at FSReqCallback.wrapper [as oncomplete] (fs.js:470:5) {
      errno: -9,
      code: 'EBADF',
      syscall: 'read'
    }
    ##[error]Node run failed with exit code 1
    
  3. added
    bug
    on Jan 27, 2020
  4. dhadka commented on May 27, 2021

    @dhadka
    Contributor

    Merged #596 to fix this issue by catching and logging warnings. The save step should no longer fail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions