ziglang / zig

General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.
https://ziglang.org
MIT License
34.83k stars 2.55k forks source link

`invalid HTTP response: EndOfStream` when fetching normal + lazy dependencies on a `macos-14` GitHub Actions runner #20313

Open alexrp opened 4 months ago

alexrp commented 4 months ago

Zig Version

0.13.0

Steps to Reproduce and Observed Behavior

Create a Zig project with zig init and add a normal dependency (such as zig-clap) and a lazy dependency (such as aro). Add a basic GitHub Actions workflow (e.g. using setup-zig) which runs zig build on a macos-14 runner, which is an M1 machine. The build should fail with something like:

/Users/runner/work/test/test/build.zig.zon:10:20: error: invalid HTTP response: EndOfStream

I don't have a macOS machine myself, so I have no idea if this reproduces on end-user hardware. But it's 100% consistent on GitHub Actions for me. Also, notably, it doesn't happen on macos-12 and macos-13 runners, which are Intel machines. I saw it exactly once on a macos-13 runner; it seems very rare there.

Looks similar to #19091, but that was supposed to have been fixed.

Expected Behavior

No error.

alexrp commented 4 months ago

Correction: I observed the same failure on a macos-13 (Intel) runner as well, but this seems very rare by comparison. I've only seen a single instance of that, while the macos-14 failures are 100% reproducible.

Currently working on creating a reasonably isolated repro.

alexrp commented 4 months ago

Repro here: https://github.com/alexrp/zig-20313-repro (see Actions tab)

The key seems to be to have a normal dependency and a lazy dependency in the same build. Just one or the other does not repro. For example, aro + mecha repros, aro + clap repros. But mecha + clap does not, nor does just mecha, nor just clap.

fearlessfe commented 1 month ago

I met the same problem. I use my mac with m3 chip and macos 14.1

I clone the zabi project and run zig build, the error is EndOfStream

image