-
-
Notifications
You must be signed in to change notification settings - Fork 511
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
age: error: failed to wrap key for recipient #0: test plugin: write |1: broken pipe #517
Comments
This happens repeatably (without any load issue) for me on Darwin. NixOS is on unstable.
Here's the full build output.
I'm currently trying to figure out when this broke. |
@someplaceguy This /could/ also be a NixOS issue. Did you happen to already open a bug there? |
I just double-checked with the NixOS repo and our package definition hasn't changed in 8 months and has been on 1.1.1 since then: https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/security/age/default.nix |
It does look a bit like /something/ changed on our side: |
@ctheune No, I run into these kind of non-deterministic test failures quite frequently (a few per week) due to the aforementioned CPU load issue. Apparently high CPU loads tend to be very good at finding bugs in software or even tests themselves. All of these issues that I've ran into have been in the upstream software, never in NixOS. But almost all of them are either test failures due to timeouts or race conditions in build systems (especially Makefiles), which I don't even bother open bugs for due to these being so common (I just disable tests or disable parallel building). I've chosen to file this bug because it didn't seem to be either of these issues, but from superficially looking at the error, I would be surprised if the problem was in NixOS. You don't seem to have a high CPU load and you also seem to be using NixOS, so perhaps this issue is different, I don't know. |
Yeah, could be. The issue seems to trigger upstream as well and it has been happening for me since yesterday and it happens repeatedly. Here's the build that broke upstream. https://hydra.nixos.org/build/229581170 The changes that triggered the build are here: I checked the changes but none of the commit message seem suspicuous. I'm going to disable the tests and see whether it actually works. BTW: the aarch-build didn't break and the pure linux builds and I'm not quite sure whether I'm running my nix environment on MacOS with x86_64 and thus emulation ... o_O |
I forgot to mention that once I rebuilt But you seem to be running into this issue all the time, which added to this issue having 3 NixOS occurrences and no other occurrences in other OSes is quite puzzling indeed. Perhaps an upgraded dependency is causing the problem? I really know almost nothing about |
Hi! First of all, thank you for your work packaging age, and for reporting things upstream. What that test does (under a layer of abstraction in testscript) is make a copy of the test binary into a temporary directory that's added to $PATH, execute the binary with different flags that make it behave as a plugin, and communicate with it over stdin/stdout. Does any of that sound like something that would clash with the NixOS env? |
Theoretically it could, as NixOS runs package builds and tests under a sandbox, but according to the information you provided it seems unlikely to me (although it's hard to tell).
Again, I know almost nothing about age, but looking at this error message:
... at first sight, if I'm interpreting the error correctly, it kinda appears that the test plugin exited prematurely because it was trying to write to its It'd be interesting to figure out for what reasons |
Depending on the code, another possibility is that the |
I cannot reproduce this on {x86_64, aarch64}-linux or aarch64-darwin. Neither from the trunk, nor from nixpkgs-23.05(-darwin) branches. Looking at Hydra, this seems to fail more frequently on x86_64-darwin, rarely for aarch64-darwin, and seemingly never for Linux (x86_64, aarch64). Sounds like @ctheune can repro on their aarch64-darwin box. Can you please try:
...and paste the output of the failure? If it doesn't fail in the first case, you can try rebuilding by adding @someplaceguy Can you try the same? I'm even more interested in seeing how this fails under Linux (as you said you're running NixOS 23.05). |
@bdd I tried both with and without your commit but I can't reproduce this issue. |
@bdd Thanks for investigating! See my output below. @FiloSottile yeah, the mysterious part is that it used to work and age didn't change. I was wondering whether a dependency change in Go-land might be triggering this.
|
One extra data point here. It works fine for me on aarch64-darwin. It does not work for me inside GitHub actions on x86_64-darwin.
@ctheune would you mind sharing your solution for disabling the tests? I've tried: ageWithoutTests = pkgs.age.overrideAttrs (_: {
doCheck = false;
}); But this doesn't seem to work around the issue for me. |
Sure. I'm using
|
See issue in upstream FiloSottile/age#517. age sometimes fails this test, but sometimes it doesn't. Disable this test until the upstream issue is resolved.
See issue in upstream FiloSottile/age#517. age sometimes fails this test, but sometimes it doesn't. Disable this test until the upstream issue is resolved.
Environment
What were you trying to do
Trying to run tests as part of the package's build process.
What happened
A test failed.
The build machine's CPU may have been overloaded at the time the tests were running (e.g. load average up to ~150 on a 16-core CPU), but it should not have caused an error AFAIK.
The text was updated successfully, but these errors were encountered: