envfs icon indicating copy to clipboard operation
envfs copied to clipboard

mount.envfs sometimes makes the system super slow

Open jheidbrink opened this issue 7 months ago • 0 comments

Sometimes mount.envfs starts consuming around 97% CPU. I notice this because my system feels sluggish, the fan is spinning constantly and I come to realize that this time it's not due to MS Teams.

I cannot say what triggers it, but often it starts after using the laptop for some hours. Once it starts, it doesn't seem to resolve automatically.

When this happens,

  • ls /usr/bin and ls /bin take around 1.5 seconds and don't show any files. (when this doesn't happen, ls /usr/bin takes only around 10 milliseconds but also doesn't show any files)
  • htop itself will use around 40% CPU.
  • trying to ssh to another user at localhost hangs.

When searching for envfs in the journal, the only matching lines are

usr-bin.mount: Unit process 995 (mount.envfs) remains running after unit stopped.

when the system is shutting down.

I enabled envfs by adding services.envfs.enable = true; to my configuration.nix on NixOS unstable. Not sure when this started, maybe a week ago or a bit longer.

I can fix it by

sudo stop usr-bin.mount
sudo kill <pid of mount.envfs>

but this also breaks some things because this removes /usr/bin/env as well.

jheidbrink avatar Jul 10 '25 15:07 jheidbrink