kachick / dotfiles

πŸ€€βœ‚πŸŒ³
MIT License
13 stars 0 forks source link

Can't open `buildFHSEnv` wrapped zed-editor with bwrap ENOSPC error #809

Closed kachick closed 1 month ago

kachick commented 1 month ago
dotfiles main(a672281)  ≑direnv loaded/allowed via 🐹 v1.22.6 via ❄️  impure (nix-shell-env) zsh
> zed .
bwrap: Creating new namespace failed: nesting depth or /proc/sys/user/max_*_namespaces exceeded (ENOSPC)

> dysk 
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                      filesystem                      β”‚typeβ”‚disk β”‚usedβ”‚   use   β”‚freeβ”‚sizeβ”‚mount pointβ”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚/dev/disk/by-uuid/235a8e7d-cca5-4a9d-bfaa-785289b32040β”‚ext4β”‚cryptβ”‚330Gβ”‚34% β–ˆβ–‹   β”‚650Gβ”‚980Gβ”‚/          β”‚
β”‚/dev/nvme0n1p1                                        β”‚vfatβ”‚ SSD β”‚118Mβ”‚11% β–Œ    β”‚1.0Gβ”‚1.1Gβ”‚/boot      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

> df   
Filesystem     1K-blocks      Used Available Use% Mounted on
devtmpfs         1817132         0   1817132   0% /dev
tmpfs           18171316        12  18171304   1% /dev/shm
tmpfs            9085660      8328   9077332   1% /run
tmpfs           18171316      1216  18170100   1% /run/wrappers
/dev/dm-0      957152472 273987576 634470524  31% /
efivarfs             128        33        91  27% /sys/firmware/efi/efivars
/dev/nvme0n1p1   1098632    115436    983196  11% /boot
tmpfs            3634260       100   3634160   1% /run/user/1001

> df -i
Filesystem       Inodes    IUsed    IFree IUse% Mounted on
devtmpfs        4537521      523  4536998    1% /dev
tmpfs           4542828        4  4542824    1% /dev/shm
tmpfs           4542828     2262  4540566    1% /run
tmpfs           4542828       23  4542805    1% /run/wrappers
/dev/dm-0      60850176 11082109 49768067   19% /
efivarfs              0        0        0     - /sys/firmware/efi/efivars
/dev/nvme0n1p1        0        0        0     - /boot
tmpfs            908565      149   908416    1% /run/user/1001

> la /proc/sys/user 
0644 0 10-01 13:18 max_cgroup_namespaces
0644 0 10-01 13:18 max_fanotify_groups
0644 0 10-01 13:18 max_fanotify_marks
0644 0 10-01 13:18 max_inotify_instances
0644 0 10-01 13:18 max_inotify_watches
0644 0 10-01 13:18 max_ipc_namespaces
0644 0 10-01 13:18 max_mnt_namespaces
0644 0 10-01 13:18 max_net_namespaces
0644 0 10-01 13:18 max_pid_namespaces
0644 0 10-01 13:18 max_time_namespaces
0644 0 10-01 13:18 max_user_namespaces
0644 0 10-01 13:18 max_uts_namespaces

> bat /proc/sys/user/max_inotify_watches
524288

> bat /proc/sys/user/max_user_namespaces 
141797

https://www.reddit.com/r/NixOS/comments/1ccm96v/bwrap_creating_new_namespace_failed_nesting_depth/ https://github.com/containers/bubblewrap/issues/371

kachick commented 1 month ago

https://github.com/NixOS/nixpkgs/blob/bafb19f793583d8b9bc5e21017211d9a897ba940/pkgs/games/steam/fhsenv.nix#L6-L7 https://github.com/kachick/dotfiles/blob/a672281959def72d2cc7462c8bd0244eef4917f8/nixos/desktop/default.nix#L13

Hmm... using buildFHSUserEnv workaround for https://github.com/NixOS/nixpkgs/issues/309662#issuecomment-2155122284 making this error now...? :thinking:

kachick commented 1 month ago

Unwrapped version worked.

> nix run nixpkgs/nixos-unstable#zed-editor -- .
kachick commented 1 month ago

Same problem in recent days https://www.reddit.com/r/NixOS/comments/1flf78h/using_buildfhsenv_in_nix_flake_makes_direnv_to_go/