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

nix develop nix makes clangd fill up XDG_RUNTIME_DIR tmpfs #10430

Closed
roberth opened this issue Apr 8, 2024 · 1 comment · Fixed by #10883
Closed

nix develop nix makes clangd fill up XDG_RUNTIME_DIR tmpfs #10430

roberth opened this issue Apr 8, 2024 · 1 comment · Fixed by #10883
Labels
bug contributor-experience Developer experience for Nix contributors flakes new-cli Relating to the "nix" command nix-shell nix-shell, nix develop, nix print-dev-env, etc

Comments

@roberth
Copy link
Member

roberth commented Apr 8, 2024

Describe the bug

nix develop changes TMPDIR to point to /run/user/1000 (typically), which is a tmpfs of limited size.

When programs, such as clangd, which we use for hacking on Nix itself, dump non-trivial amounts of information into TMPDIR, it causes various issues with not just the nix shell, but desktop programs as well.

Steps To Reproduce

  1. Use clangd from .#native-clangStdenvPackages shell, on NixOS
  2. Hack around a bit. clangd may generate a bunch of large .pch files, and put them in the undersized /run/user/1000 directory.

Expected behavior

Shell uses the normal tmpdir, which is larger.

nix-env --version output

Additional context

Priorities

Add 👍 to issues you find important.

@roberth roberth added bug new-cli Relating to the "nix" command flakes contributor-experience Developer experience for Nix contributors nix-shell nix-shell, nix develop, nix print-dev-env, etc labels Apr 8, 2024
@whentze
Copy link

whentze commented Apr 17, 2024

The behaviour of setting TMPDIR to $XDG_RUNTIME_DIR is simply busted, and has continued to cause all kinds of problems for nearly a decade now.

I have tried to summarize my feelings about this in #2957 (comment).

For now, you can work around this by

  • Exporting TMPDIR=/tmp before entering nix develop or
  • Increasing the size and inode limits on $XDG_RUNTIME_DIR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug contributor-experience Developer experience for Nix contributors flakes new-cli Relating to the "nix" command nix-shell nix-shell, nix develop, nix print-dev-env, etc
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants