"Hide processes running in containers" hides nearly all processes when no containers are running
Description
Enabling "Hide processes running in containers" (O / Display options) hides
almost the entire process list on a plain desktop Linux install with no
containers currently running. Only a single process (ksecretd, a KDE
component) remains visible; every other process, including the shell and
htop itself, disappears from the list.
Disabling the option immediately restores the full process list.
Steps to reproduce
- On a plain Arch Linux + KDE Plasma desktop with no containers running.
- Start
htop. - Press
O(or enable "Hide processes running in containers" viaF2→ Display options). - Observe: the process list collapses to a single process.
- Press
Oagain (or disable the option) — the full process list returns immediately.
Expected behavior
Since no processes are actually running inside containers on this system, enabling the option should have no visible effect on the process list.
Actual behavior
Nearly all processes disappear, as if they were being misidentified as "running in a container".
Environment
- OS: Arch Linux
- DE: KDE Plasma
- htop version: 3.5.2-1-arch
Additional info
$ cat /proc/self/status | grep NSpid
NSpid: 108407
$ cat /proc/self/cgroup
0::/user.slice/user-1000.slice/[email protected]/app.slice/kitty-104783-0.scopeI noticed some related discussion in PR #1062 about timing issues with the container-detection logic when the option is toggled, though that seemed to be about a temporary lag rather than persistently misclassifying almost all processes as containerized. Not sure if this is the same root cause or a separate bug.
Source: htop-dev/htop