Can't run nvtop

$ nvtop
cannot preserve mount namespace of process 160595 as nvtop.mnt: Permission denied
unexpected eof from helper process
$ snap --version
snap          2.76+ubuntu24.04
snapd         2.76+ubuntu24.04
series        16
ubuntu        24.04
kernel        7.0.0-28-generic
architecture  amd64
$ snap info nvtop | grep -ie 'installed:' -e tracking
tracking:     latest/stable
installed:          3.3.2            (344) 1.42MB -

This is somewhat similar to what I’m experiencing with LXD.

I also opened a bug report, but not sure if there’s also something I may have done.

Have you tried to clear the namespace with snap-discard-ns ?

Might be a stupid question, but how do I run this?

Command isn’t recognized

LOL, indeed, it does not live in PATH …

you can launch it as:

/usr/lib/snapd/snap-discard-ns

@zyga perhaps the manpage should mention that somewhere ?

yamiyuki@skarletsky:~$ sudo /usr/lib/snapd/snap-discard-ns nvtop
yamiyuki@skarletsky:~$ nvtop
cannot preserve mount namespace of process 327040 as nvtop.mnt: Permission denied
unexpected eof from helper process
yamiyuki@skarletsky:~$ sudo nvtop
cannot preserve mount namespace of process 327070 as nvtop.mnt: Permission denied
unexpected eof from helper process
yamiyuki@skarletsky:~$ sudo /usr/lib/snapd/snap-discard-ns --snap-already-locked nvtop
unexpectedly managed to acquire exclusive lock over snap nvtop
yamiyuki@skarletsky:~$ sudo nvtop
cannot preserve mount namespace of process 327184 as nvtop.mnt: Permission denied
unexpected eof from helper process
yamiyuki@skarletsky:~$ sudo /usr/lib/snapd/snap-discard-ns --snap-already-locked nvtop
unexpectedly managed to acquire exclusive lock over snap nvtop
yamiyuki@skarletsky:~$ sudo /usr/lib/snapd/snap-discard-ns --from-snap-confine nvtop
unexpectedly managed to acquire exclusive lock over snap nvtop
yamiyuki@skarletsky:~$ sudo nvtop
cannot preserve mount namespace of process 327267 as nvtop.mnt: Permission denied
unexpected eof from helper process

not sure if I’m using this right?

I’m honestly not sure either :slight_smile: but according to the manpage you are it seems …

This is a bug in Linux 6.18. We have a workaround here: snap-confine: work around kernel mnt_ns_loop() ordering bug by zyga · Pull Request #17376 · canonical/snapd · GitHub

Edit, but given you are on 7.x kernel maybe the damage is more widespread?

Edit2: I need more coffee. The error is different. I don’t know what is wrong in your case yet.