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

tests/bash-profile.sh on master fails on darwin with auto-allocate-uids enabled #8444

Open
cole-h opened this issue Jun 3, 2023 · 2 comments
Labels

Comments

@cole-h
Copy link
Member

cole-h commented Jun 3, 2023

Describe the bug

As in the title, tests/bash-profile.sh on master fails on darwin when auto-allocate-uids is enabled on the builder.

Steps To Reproduce

  1. nix build github:nixos/nix on darwin (testing on aarch64-darwin)
  2. See error

Expected behavior

For the tests to not fail

nix-env --version output

nix-env (Nix) 2.15.0

Additional context

ran test tests/bash-profile.sh... [FAIL]
    +++(/private/tmp/nix-build-nix-2.17.0pre20230602_a15b2c0.drv-0/source/tests/common/vars-and-functions.sh:274) trap onError ERR
    ++(common.sh:8) [[ -n '' ]]
    +(bash-profile.sh:3) sed -e 's|@localstatedir@|/private/tmp/nix-build-nix-2.17.0pre20230602_a15b2c0.drv-0/nix-test/tests/bash-profile/profile-var|g' -e 's|@coreutils@|/nix/store/v8y9sd43ygc27x4808asaymbk5nn4ild-coreutils-9.1/bin|g'
    ++(bash-profile.sh:5) whoami
    whoami: cannot find name for user ID 56930
    +(bash-profile.sh:5) user=
    ++(bash-profile.sh:5) onError
    ++(/private/tmp/nix-build-nix-2.17.0pre20230602_a15b2c0.drv-0/source/tests/common/vars-and-functions.sh:237) set +x
    bash-profile.sh: test failed at:
      main in bash-profile.sh:5
make: *** [mk/lib.mk:124: tests/bash-profile.sh.test] Error 1
make: *** Waiting for unfinished jobs....

Priorities

Add 👍 to issues you find important.

@cole-h cole-h added the bug label Jun 3, 2023
@abathur
Copy link
Member

abathur commented Jun 7, 2023

Braindumping since this came up in installer workgroup meeting.

Beyond the question of fixing the test, there's also the question of how many package builds would be affected by this whoami behavior (and whether we'd need patching or environment fiddling to address this in nixpkgs?)

Eelco mentioned running macOS hydra builders with auto-allocate-uids to collect information on whether this causes significant breakage or not.

@nanzhong
Copy link

I'm not sure if it is related to this or not, but I ran into a build issue on Darwin with auto-allocate-uids enabled. It was quite confusing to debug as it manifested as stalled processes (more details @ NixOS/nixpkgs#238087 (comment)).

I suspect enabling auto-allocate-uids on macOS hydra builders will present more strange failures akin to what I ran into.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants