Rust programms (like ripgrep, fd, rustc, cargo) are stalling before the actual code runs.
Running strace <program> shows that the system blocks on a openat on /home,
...
statx(AT_FDCWD, "/home/<user>/.rustup", AT_STATX_SYNC_AS_STAT, STATX_ALL, {stx_mask=STATX_BASIC_STATS|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFDIR|0755, stx_size=7, ...}) = 0
getcwd("/home/<user>", 512) = 14
statx(AT_FDCWD, "/home/<user>", AT_STATX_SYNC_AS_STAT, STATX_ALL, {stx_mask=STATX_BASIC_STATS|STATX_MNT_ID, stx_attributes=STATX_ATTR_MOUNT_ROOT, stx_mode=S_IFDIR|0700, stx_size=18, ...}) = 0
lstat("/home", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
lstat("/home/<user>", {st_mode=S_IFDIR|0700, st_size=18, ...}) = 0
openat(AT_FDCWD, "/home/<user>/rust-toolchain", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/<user>/rust-toolchain.toml", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
statx(AT_FDCWD, "/home", AT_STATX_SYNC_AS_STAT, STATX_ALL, {stx_mask=STATX_BASIC_STATS|STATX_MNT_ID, stx_attributes=STATX_ATTR_MOUNT_ROOT, stx_mode=S_IFDIR|0755, stx_size=0, ...}) = 0
lstat("/home", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
openat(AT_FDCWD, "/home/rust-toolchain", O_RDONLY|O_CLOEXEC
but eventually fails to open that nonexistant file and continues searching elsewhere (without slowdown this time) to finally succeed.
openat(AT_FDCWD, "/home/rust-toolchain.toml", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
statx(AT_FDCWD, "/", AT_STATX_SYNC_AS_STAT, STATX_ALL, {stx_mask=STATX_ALL|STATX_MNT_ID, stx_attributes=STATX_ATTR_MOUNT_ROOT, stx_mode=S_IFDIR|0755, stx_size=4096, ...}) = 0
openat(AT_FDCWD, "/rust-toolchain", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/rust-toolchain.toml", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
statx(AT_FDCWD, "/home/<user>/.rustup/toolchains/stable-x86_64-unknown-linux-gnu", AT_STATX_SYNC_AS_STAT, STATX_ALL, {stx_mask=STATX_BASIC_STATS|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFDIR|0755, stx_size=7, ...}) = 0
...
I have no idea why it would look for such a config file there. The slow down might be due to the strange setup at work with our homes being available on multiple debian servers via ssh at once. Moreover, we have no root access obviously.
How would I be able to prevent that file check? And is that really the problem?