clipboard-history: ringboard-server fails to start: "Failed to open pressure file"
$ target/myrelease/ringboard-server --help
Error: an I/O error occurred
│
╰─▶ No such file or directory (os error 2)
╰╴Failed to open pressure file: "/sys/fs/cgroup/\n13:rdma:/\n12:pids:/\n11:hugetlb:/\n10:net_prio:/\n9:perf_event:/\n8:net_cls:/\n7:freezer:/\n6:devices:/\n5:memory:/\n4:blkio:/\n3:cpuacct:/\n2:cpu:/\n1:cpuset:/memory.pressure"
Does it expect cgroup v2 instead of v1?
Is there a keep-it-simple mode without memory pressure monitoring? What if somebody is running a Linux kernel without cgroup support at all?
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 30 (18 by maintainers)
Commits related to this issue
- Make cgroup memory pressure monitoring optional. Resolves #28. — committed to vi/clipboard-history by vi 2 years ago
- Support (in a degraded state) cgroup v1 (fixes #28) Signed-off-by: Alex Saveau <saveau.alexandre@gmail.com> — committed to vi/clipboard-history by SUPERCILEX 2 years ago
- Gracefully handle all failures regarding opening memory pressure monitoring. Addresses #28#issuecomment-2302729826 — committed to vi/clipboard-history by vi 2 years ago
- Continue running server even if pressure file isn't available (#28) — committed to SUPERCILEX/clipboard-history by deleted user 2 years ago
- Continue running server even if pressure file isn't available (#28) — committed to SUPERCILEX/clipboard-history by deleted user 2 years ago
- Oops, fix incorrect errno for unwritable pressure file (#28) — committed to SUPERCILEX/clipboard-history by deleted user 2 years ago
No worries and thanks for testing this!
I think this will still be broken when used outside of systemd if the current cgroup is owned by root, but I kinda want to say that’s user error. Will wait for someone to run into that case so I can understand it better, but that’s where @vi’s approach of ignoring the failure might make sense as creating a user cgroup just to run the server is going to be too much of a hassle. Seems like basically everything uses systemd though so eh: https://en.wikipedia.org/wiki/Systemd#Adoption
@AguirreIF did you run the
sedcommands? The error there is because the binaryringboard-serverwasn’t found which is normal. The sed commands are supposed to inline the absolute path. Anyway, does the service starts up normally with the/bin/shpath stuff (or an absolute path)? If so, then the error is fixed right? I assume your original error was that the service refused to start with the cgroup perms error?Ok, can you run these commands (assuming you use systemd?):
If that doesn’t work, try modifying
~/.config/systemd/user/ringboard.sliceto includeand then
to see if it works.
Actually nevermind, I think I need to make a slice for myself.
Also can you try installing
dbus-user-sessionwith your package manager and then rebooting to see if it’s fixed? Based on this thread it seems like you have one global cgroup instead of one per process.I wonder if you’re in hybrid mode. Can you run
grep cgroup2 /proc/mountsandstat -f /sys/fs/cgroup/unifiedand see what those output?Indeed, I expected it to only warn on any errors regarding memory pressure monitoring, but the commit only changed things about parsing content of a file.