Skip to content

build environment variables size reaching ARG_MAX limit on musl #217075

@yu-re-ka

Description

@yu-re-ka

Seen with tdesktop, and recently libreoffice-fresh, on x86_64-unknown-linux-musl.

musl has 128K ARG_MAX limit, darwin has 256K.
Once these limits are reached (can check with printenv | wc -c), all find ... -exec will fail.

We are the only distro running into this, because our nix store path names (in PATH, etc.) bloat the environment variables size quite a bit.

After some discussions in musl irc, for musl-linux it would be possible to patch findutils to ignore the limit, since the kernel actually has a significantly higher limit (which is dynamically calculated relatively to the process stack size).

But even if we can use this workaround for musl, we might eventually run into this on darwin.

Metadata

Metadata

Assignees

No one assigned

    Labels

    1.severity: significantNovel ideas, large API changes, notable refactorings, issues with RFC potential, etc.2.status: stalehttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md6.topic: muslRunning or building packages with musl libc

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions