NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.03k stars 14.03k forks source link

Build failure: libuv #338114

Open j0hax opened 2 months ago

j0hax commented 2 months ago

Steps To Reproduce

Steps to reproduce the behavior:

  1. Enable compiler flags for Ivy Bridge in configuration.nix:
    {
    nix.settings.system-features = ["gccarch-ivybridge"];
    nixpkgs.hostPlatform = {
    gcc.arch = "ivybridge";
    gcc.tune = "ivybridge";
    system = "x86_64-linux";
    };
    }
  2. Run nixos-rebuild switch -L
  3. Most important utilities (Bash, GCC, et. al.) build just fine, but compilation fails due to a failing test with libuv 1.48

Build log

Additional context

I am building my system configuration from a flake. Not using architecture optimizations results in my system building just fine from binary caches. I have also tried:

Notify maintainers

No maintainers listed!

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[root@kirby:/etc/nixos]# nix-shell -p nix-info --run "nix-info -m"
this path will be fetched (0.01 MiB download, 0.06 MiB unpacked):
  /nix/store/hix7sl0wxajb5aq14afjdvzc3w0i8b14-stdenv-linux
copying path '/nix/store/hix7sl0wxajb5aq14afjdvzc3w0i8b14-stdenv-linux' from 'https://cache.nixos.org'...
 - system: `"x86_64-linux"`
 - host os: `Linux 6.10.6, NixOS, 24.11 (Vicuna), 24.11.20240827.a6292e3`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.5`
 - channels(root): `"nixos-24.05"`
 - nixpkgs: `/nix/store/h1v7aq3k9wy0i5l53cirm7kka7fsipji-source`

Add a :+1: reaction to issues you find important.

j0hax commented 2 months ago

Looking at log outputs from tests:

not ok 115 - fs_utime_round
# exit code 134
# Output from process `fs_utime_round`:
# Assertion failed in test/test-fs.c on line 864: `st_atim == atime` (-14245435.955033 == -14245440.250000)

I have my / mounted as a Bcachefs with the relatime parameter, will try removing that.

bolives-hax commented 2 months ago

sometimes filesystems cause issues, in some derivations tests relying on any fs related things are disabled for that reason. disabling a test should be pretty simple. This package fails on s390x for me as of signal_multiple_loops just adding the test that fails for you in a likewise fashion to toDisable = [ ... ] should work, your issuess seems to be highly fs dependent though.

it may make sense to disable that test for everyone as to not make assumptions on fs syscalls/operations

alyssais commented 2 months ago

Would be good to report this upstream.

alyssais commented 1 month ago

Upstream bug report: https://github.com/libuv/libuv/issues/4526

bnoordhuis commented 1 month ago

@j0hax is it possible for you to post the output of strace path/to/uv_run_tests_a fs_utime_round fs_utime_round over at the libuv issue? no longer necessary, tracked it down to a kernel bug

colexbruhn commented 1 month ago

For anyone looking for a workaround until the pr is merged:

final: prev: {
  libuv = prev.libuv.overrideAttrs (old: {
    postPatch = (old.postPatch or "") + ''
      sed '/fs_utime_round/d' -i test/test-list.h
    '';
  });
}

You might need to use a package override though