Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Causing severe error: unexpected end-of-file flakiness #32

Closed
dpc opened this issue Oct 12, 2023 · 7 comments
Closed

Causing severe error: unexpected end-of-file flakiness #32

dpc opened this issue Oct 12, 2023 · 7 comments

Comments

@dpc
Copy link

dpc commented Oct 12, 2023

The CI in a project I started using magic-nix-cache is plagued
by a error: unexpected end-of-fileNix error flakiness. I need to restart a build good 2-3 times to get it to work.

https://github.com/rustshop/flakebox/actions/runs/6488634562/job/17621433941

I've never seen anything like that, and I've been using mostly cachix before, just running out of space for all my projects. There's nothing really pointing at magic-nix-cache's fault in this, but eventually occurred to me to try with disabled magic-nix-cache and voila, the problem is immediately gone (but so is the sweet caching benefits :D). I kicked off another build on a seprate PR, also seems to be passing the downloading cached artifacts stage just fine.

The unexpected end-of-file seems to be a de-serialization error in Nix. Possibly something got corrupted/truncated somewhere in the cache?

@dpc
Copy link
Author

dpc commented Oct 12, 2023

I have wiped the cache with

> cat wipecache.sh 
#!/usr/bin/env bash

GH_REPO=rustshop/flakebox

gh api --paginate -H "Accept: application/vnd.github+json" \
  "/repos/${GH_REPO}/actions/caches" \
  | for ID in `jq '.actions_caches[].id'`; \
    do echo "Deleting $ID"; \
       gh api --method DELETE "/repos/${GH_REPO}/actions/caches/$ID" | echo; done

and jobs passed, so I'm quite convinced that something bad was sitting in that cache. I will report back if it ever shows up again.

@dpc
Copy link
Author

dpc commented Oct 18, 2023

The problem is back. I guess I'll wipe it again. If anyone feels like it would help debugging, please let me know. Next time I can maybe hold off wiping the caches.

@dpc
Copy link
Author

dpc commented Oct 21, 2023

For the record: happened again.

@solidsnakedev
Copy link

any feedback? , we've also experience the same issues multiple times
https://github.com/Anastasia-Labs/smart-handles/actions/runs/7194163348/job/19594100339

@henrytill
Copy link

Also got hit with a surge of these errors last night in a private repo, ultra-minimal workflow:

name: Build

on:
  push:
    branches: ["master"]
  pull_request:
    branches: ["master"]
  workflow_dispatch:

jobs:
  flake:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: DeterminateSystems/nix-installer-action@main
      - uses: DeterminateSystems/magic-nix-cache-action@main
      - run: nix build

Ran nix flake update after several re-runs didn't work, which allowed it to pass once, but subsequent commits resumed failing with error: unexpected end-of-file. Ultimately had to disable magic-nix-cache to make progress.

@aaronmondal
Copy link

Hitting the same issue for some workflows TraceMachina/nativelink#619

@edolstra
Copy link
Contributor

This should be fixed by NixOS/nix#9804. (The "unexpected end-of-file" comes from the daemon crashing; the real error is in the systemd journal.)

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

No branches or pull requests

6 participants