test failure (lix main on darwin): functional-nix-shell-basic #1042

Open
opened 2025-11-20 06:12:18 +00:00 by dustypomerleau · 4 comments

Describe the bug

Thanks for all the time you're putting into Lix!

Compiling Lix main on Darwin is failing during installcheck. The failed test, functional-nix-shell-basic appears unable to create files with touch due to an illegal byte sequence in the filename.

Steps To Reproduce

Compile Lix main on Darwin with rev f3b2f3496bd6d346cba475d0ba152a9d3a83dec7 or more recent. I have tested rev 2c73f3c49299af4628bb812469d0a0f2566f38ec today and get the same error.

Expected behavior

Successful installcheck after compilation.

nix --version output

nix (Lix, like Nix) 2.95.0-pre20251118-dev_1b7ad3a
System type: aarch64-darwin
Additional system types: x86_64-darwin
Features: gc, signed-caches
System configuration file: /etc/nix/nix.conf
User configuration files: /Users/dn/.config/nix/nix.conf:/etc/xdg/nix/nix.conf
Store directory: /nix/store
State directory: /nix/var/nix
Data directory: /nix/store/g9xdwgpd9xylw7dm4pcf8gcm5jlw7s8q-lix-2.95.0-pre20251118-dev_1b7ad3a/share

Additional context

The full log is available in this gist, but below is a snapshot of the failing test output:

[K 50/139 lix:installcheck / functional-nix-shell-basic                               FAIL            1.87s   exit status 1
>>> MSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 MALLOC_PERTURB_=139 MESON_TEST_ITERATION=1 ASAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1 UBSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 MESON_BUILD_ROOT=/nix/var/nix/b/643hmw6bqirf365lmq28a124vz/source/build /nix/store/1s8ldw92176ry0hcdlzm0090w5v2a42n-python3-3.13.9-env/bin/python3 /nix/var/nix/b/643hmw6bqirf365lmq28a124vz/source/meson/run-test.py nix-shell/basic.sh
 ✀  
stdout:
clearing store...
/nix/var/nix/b/643hmw6bqirf365lmq28a124vz/nix-test/nix-shell/basic/shell.drv!dev
/nix/var/nix/b/643hmw6bqirf365lmq28a124vz/nix-test/nix-shell/basic/shell!dev
[FAIL]
stderr:
touch: cannot touch '/nix/var/nix/b/643hmw6bqirf365lmq28a124vz/tmp.CVFqYl86mu/'$'\322''.txt': Illegal byte sequence
++(common/vars-and-functions.sh:314) trap onError ERR
+(init.sh:6) test -n /nix/var/nix/b/643hmw6bqirf365lmq28a124vz/nix-test/nix-shell/basic
+(init.sh:7) test -d /nix/var/nix/b/643hmw6bqirf365lmq28a124vz/nix-test/nix-shell/basic
+(init.sh:8) chmod -R u+w /nix/var/nix/b/643hmw6bqirf365lmq28a124vz/nix-test/nix-shell/basic
+(init.sh:10) killDaemon
+(common/vars-and-functions.sh:122) [[ '' == '' ]]
+(common/vars-and-functions.sh:123) return
+(init.sh:11) rm -rf /nix/var/nix/b/643hmw6bqirf365lmq28a124vz/nix-test/nix-shell/basic
+(init.sh:13) mkdir /nix/var/nix/b/643hmw6bqirf365lmq28a124vz/nix-test/nix-shell/basic
+(init.sh:15) mkdir /nix/var/nix/b/643hmw6bqirf365lmq28a124vz/nix-test/nix-shell/basic/store
+(init.sh:16) mkdir /nix/var/nix/b/643hmw6bqirf365lmq28a124vz/nix-test/nix-shell/basic/var
+(init.sh:17) mkdir -p /nix/var/nix/b/643hmw6bqirf365lmq28a124vz/nix-test/nix-shell/basic/var/log/nix/drvs
+(init.sh:18) mkdir /nix/var/nix/b/643hmw6bqirf365lmq28a124vz/nix-test/nix-shell/basic/var/nix
+(init.sh:19) mkdir /nix/var/nix/b/643hmw6bqirf365lmq28a124vz/nix-test/nix-shell/basic/etc
+(init.sh:21) cat
++(init.sh:21) whoami
+(init.sh:35) cat
+(init.sh:42) nix-store --init
+(init.sh:45) test -e /nix/var/nix/b/643hmw6bqirf365lmq28a124vz/nix-test/nix-shell/basic/var/nix/db/db.sqlite
touch: cannot touch '/nix/var/nix/b/643hmw6bqirf365lmq28a124vz/tmp.tGtjeT98rg/'$'\322''.txt': Illegal byte sequence
## Describe the bug Thanks for all the time you're putting into Lix! Compiling Lix main on Darwin is failing during `installcheck`. The failed test, `functional-nix-shell-basic` appears unable to create files with `touch` due to an illegal byte sequence in the filename. ## Steps To Reproduce Compile Lix main on Darwin with rev `f3b2f3496bd6d346cba475d0ba152a9d3a83dec7` or more recent. I have tested rev `2c73f3c49299af4628bb812469d0a0f2566f38ec` today and get the same error. ## Expected behavior Successful `installcheck` after compilation. ## `nix --version` output ```sh nix (Lix, like Nix) 2.95.0-pre20251118-dev_1b7ad3a System type: aarch64-darwin Additional system types: x86_64-darwin Features: gc, signed-caches System configuration file: /etc/nix/nix.conf User configuration files: /Users/dn/.config/nix/nix.conf:/etc/xdg/nix/nix.conf Store directory: /nix/store State directory: /nix/var/nix Data directory: /nix/store/g9xdwgpd9xylw7dm4pcf8gcm5jlw7s8q-lix-2.95.0-pre20251118-dev_1b7ad3a/share ``` ## Additional context The full log is available in [this gist](https://gist.github.com/dustypomerleau/16533b321de229132ac38ae95f5e69f2), but below is a snapshot of the failing test output: ```sh [K 50/139 lix:installcheck / functional-nix-shell-basic FAIL  1.87s exit status 1 >>> MSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 MALLOC_PERTURB_=139 MESON_TEST_ITERATION=1 ASAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1 UBSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 MESON_BUILD_ROOT=/nix/var/nix/b/643hmw6bqirf365lmq28a124vz/source/build /nix/store/1s8ldw92176ry0hcdlzm0090w5v2a42n-python3-3.13.9-env/bin/python3 /nix/var/nix/b/643hmw6bqirf365lmq28a124vz/source/meson/run-test.py nix-shell/basic.sh ✀ stdout: clearing store... /nix/var/nix/b/643hmw6bqirf365lmq28a124vz/nix-test/nix-shell/basic/shell.drv!dev /nix/var/nix/b/643hmw6bqirf365lmq28a124vz/nix-test/nix-shell/basic/shell!dev [FAIL] stderr: touch: cannot touch '/nix/var/nix/b/643hmw6bqirf365lmq28a124vz/tmp.CVFqYl86mu/'$'\322''.txt': Illegal byte sequence ++(common/vars-and-functions.sh:314) trap onError ERR +(init.sh:6) test -n /nix/var/nix/b/643hmw6bqirf365lmq28a124vz/nix-test/nix-shell/basic +(init.sh:7) test -d /nix/var/nix/b/643hmw6bqirf365lmq28a124vz/nix-test/nix-shell/basic +(init.sh:8) chmod -R u+w /nix/var/nix/b/643hmw6bqirf365lmq28a124vz/nix-test/nix-shell/basic +(init.sh:10) killDaemon +(common/vars-and-functions.sh:122) [[ '' == '' ]] +(common/vars-and-functions.sh:123) return +(init.sh:11) rm -rf /nix/var/nix/b/643hmw6bqirf365lmq28a124vz/nix-test/nix-shell/basic +(init.sh:13) mkdir /nix/var/nix/b/643hmw6bqirf365lmq28a124vz/nix-test/nix-shell/basic +(init.sh:15) mkdir /nix/var/nix/b/643hmw6bqirf365lmq28a124vz/nix-test/nix-shell/basic/store +(init.sh:16) mkdir /nix/var/nix/b/643hmw6bqirf365lmq28a124vz/nix-test/nix-shell/basic/var +(init.sh:17) mkdir -p /nix/var/nix/b/643hmw6bqirf365lmq28a124vz/nix-test/nix-shell/basic/var/log/nix/drvs +(init.sh:18) mkdir /nix/var/nix/b/643hmw6bqirf365lmq28a124vz/nix-test/nix-shell/basic/var/nix +(init.sh:19) mkdir /nix/var/nix/b/643hmw6bqirf365lmq28a124vz/nix-test/nix-shell/basic/etc +(init.sh:21) cat ++(init.sh:21) whoami +(init.sh:35) cat +(init.sh:42) nix-store --init +(init.sh:45) test -e /nix/var/nix/b/643hmw6bqirf365lmq28a124vz/nix-test/nix-shell/basic/var/nix/db/db.sqlite touch: cannot touch '/nix/var/nix/b/643hmw6bqirf365lmq28a124vz/tmp.tGtjeT98rg/'$'\322''.txt': Illegal byte sequence ```
Owner

Could you share more information about your /etc/nix/nix.conf? I received this error from some other folks but I compile aarch64-darwin a bunch of times and never encountered it... It seems filesystem driven too.

Could you share more information about your `/etc/nix/nix.conf`? I received this error from some other folks but I compile aarch64-darwin a bunch of times and never encountered it... It seems filesystem driven too.
Author

Thank you for your time, @raito.

My nix.conf is generated (contents below). My flake.nix is public if it helps.

# WARNING: this file is generated from the nix.* options in
# your nix-darwin configuration. Do not edit it!
allowed-users = *
auto-optimise-store = false
build-users-group = nixbld
builders = 
cores = 0
experimental-features = nix-command flakes
max-jobs = auto
nix-path = nixpkgs=flake:nixpkgs /nix/var/nix/profiles/per-user/root/channels
require-sigs = true
sandbox = false
sandbox-fallback = false
substituters = https://cache.nixos.org/
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
trusted-substituters = 
trusted-users = @admin @root root
extra-sandbox-paths = 

Is there an issue with string concatenation in the creation of the filenames? I noticed there are extra single quotes within the file being touched.

Thank you for your time, @raito. My `nix.conf` is generated (contents below). My [`flake.nix`](https://github.com/dustypomerleau/config/blob/main/nix-darwin/flake.nix) is public if it helps. ``` # WARNING: this file is generated from the nix.* options in # your nix-darwin configuration. Do not edit it! allowed-users = * auto-optimise-store = false build-users-group = nixbld builders = cores = 0 experimental-features = nix-command flakes max-jobs = auto nix-path = nixpkgs=flake:nixpkgs /nix/var/nix/profiles/per-user/root/channels require-sigs = true sandbox = false sandbox-fallback = false substituters = https://cache.nixos.org/ trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= trusted-substituters = trusted-users = @admin @root root extra-sandbox-paths = ``` Is there an issue with string concatenation in the creation of the filenames? I noticed there are extra single quotes within the file being `touch`ed.
Owner

@dustypomerleau (@)pennae tells me the root cause is that the Darwin detection creates this error, I will try to send a fix soon.

@dustypomerleau (@)pennae tells me the root cause is that the Darwin detection creates this error, I will try to send a fix soon.
Author

Fantastic—thank you for the quick reply @raito.

Fantastic—thank you for the quick reply @raito.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lix-project/lix#1042
No description provided.