macOS: tarball unpacking is extremely slow on some machines (2-5 mins to unpack Nixpkgs) #1072
Labels
No labels
Affects/CppNix
Affects/Nightly
Affects/Only nightly
Affects/Stable
Area/build-packaging
Area/cli
Area/evaluator
Area/fetching
Area/flakes
Area/language
Area/lix ci
Area/nix-eval-jobs
Area/profiles
Area/protocol
Area/releng
Area/remote-builds
Area/repl
Area/repl/debugger
Area/store
awaiting
author
awaiting
contributors
bug
Context
contributors
Context
drive-by
Context
maintainers
Context
RFD
crash 💥
Cross Compilation
devx
docs
Downstream Dependents
E/easy
E/hard
E/help wanted
E/reproducible
E/requires rearchitecture
Feature/S3
imported
Language/Bash
Language/C++
Language/NixLang
Language/Python
Language/Rust
Needs Langver
OS/Linux
OS/macOS
performance
regression
release-blocker
stability
Status
blocked
Status
invalid
Status
postponed
Status
wontfix
testing
testing/flakey
Topic/Large Scale Installations
ux
No milestone
No project
No assignees
5 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lix-project/lix#1072
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Discussion: https://zulip.lix.systems/#narrow/channel/27-Darwin/topic/slow.20archive.20extraction.20in.20macOS.2026
Repro: install Lix 2.94 using the installer with flakes enabled.
nix-instantiate --eval --expr '<nixpkgs>'. This will get stuck unpacking a tarball for two minutes (!!!!!!).Alternate repro:
cd "$(mktemp -d)" && nix flake init && time nix flake lock --debug.We intend to work on fixing this in the next week.
I don't know why this is happening; it's not a regression on our end as it happens on ancient nixes and also on lixes that have at one point not had the issue. It seems to happen on macOS 15.6.1 and 15.7.2 and also 26. GitHub tarball change? I don't know.
Seems to happen on my machine also. It seems to happen on machines that contain Enterprise Nonsense (SentinelOne EDR) and also VMs that don't.
this is nuts. what is going on here.
nix (Lix, like Nix) 2.95.0-pre20251124-dev_6da3519but it's also on 2.93 and older versions. It seems to have started happening in the last ~month?This issue was mentioned on Gerrit on the following CLs:
Here are some conditions we've seen this bug on:
Lix versions:
CppNix versions:
macOS versions:
NixOS versions:
nixos-unstable, e.g.addf7cf5f383a3101ecfba091b98d0a1263dc9b8We definitely started seeing this bug by December 4th, but vague early reports from November 26th may have been the same bug.
so far it sounds like this being Very Clearly not a lix bug though, but a macos bug? right?
It seems like it. Although things like normal "tar" & even libarchive's "bsdtar" don't seem to be affected? Caveat that it's a little hard to compare since Lix is doing a little more in nix-prefetch-url (download/deletion/other things).
While the regression and sense of urgency in fixing the perf here are new, extracting nixpkgs on macOS has always had bad performance, it's just not risen to the level of "so egregiously bad it's our first priority to go fix it" until Apple screwed up. (note: even if Apple fixes the part of this that's a regression, the status quo was a constant background mild frustration! also holding ones breath about apple fixing bugs is ill advised. one should assume their bugs are permanent)
The proposed fix of not using the problem code obviously will get rid of the problem by nuclear option, but it's not an optimization ultimately coming from nowhere; if macOS support were better funded all along we might have certainly done something like this earlier. It also should be a significant improvement on Linux, just less night and day because the cost per file extracted is lower.
Extremely poor performance fetching GitHub tarballs on macOSto macOS: tarball unpacking is extremely slow on some machines (2-5 mins to unpack Nixpkgs)