-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ringboard-server fails to start: "Failed to open pressure file" #28
Comments
I don't see how you'd be able to disable cgroups. What's the output of |
Oh actually I think I have a fix. |
|
You're on cgroup v1. We could support that eventually but eh. For now let's just not crash. |
Hi, sorry for posting to a closed issue, but I'm having the same problem:
Contents of
I followed the installation instructions. Thanks! |
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. |
I wonder if you're in hybrid mode. Can you run |
Also can you try installing |
Actually nevermind, I think I need to make a slice for myself. |
Ok, can you run these commands (assuming you use systemd?):
If that doesn't work, try modifying
and then
to see if it works. |
Yes, here they are:
There is no file
Thanks! |
Ok, you have the same config as me so I think the slice thing should fix it. Oh and to see if the server started properly run
|
Even with the recent fix, I think that cgroups should not a dependency of Ringboard and any failure to open the pressure file should be handled gracefully. |
…toring. Addresses SUPERCILEX#28#issuecomment-2302729826
Thanks for the quick reply, but it did't work, here is the output of
And the output of
BUT I got it working changing the line ''ExecStart'' back to:
I have no idea why that works :( |
@vi yes, handling cgroups gracefully means using them correctly. You're suggesting blindly ignoring the failures which is bad engineering. If I'm going to ignore an error, I want to know why the error occurs and I'll only ignore it if it's something outside of my control. Otherwise, it means I caused the error and it's my bug. |
@AguirreIF did you run the |
Yes, now it works fine, I was missing an absolute path, sorry :( Thanks very much for such an amazing clipboard manager (I was using clipster until yesterday). |
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 |
I currently use Ringboard without systemd and (mostly) without dbus. |
But you're on cgroup v1 right? So there shouldn't be any issues—I'd want to know why somebody uses cgroup v2 without systemd. |
Though realistically I'll have to ignore perm denied errors eventually. But I wouldn't have discovered the systemd slice fix if I had just ignored errors from the start! So let's let it bake for a while longer and if somebody comes along with permission errors and they're not using systemd, then I think it's reasonable to ignore the error as we'll have caught most of the bugs in my cgroup code by then. |
Yes, that's probably by default on current Debian Stable. Previously I remember mounting cgroups to nonstandard location (when I was using self-built kernel and customized the system more drastically). I expect things to work without cgroups at all if needed, unless it's a container or security software.
Maybe just log them with higher severity that would be visible by default (including in
Maybe somebody would be building their own distro (Linux From Scratch-style) and choosing v2 instead of v1 because of 2 > 1. Maybe somebody running embedded distro with a small GUI (and using only It is hard to know how users would use your program, even outside Linux Desktop. Within Linux Desktop, custom configurations may be a notable percentage of users, especially when when speaking about a program that shows some new approach. |
I sympathize with wanting to customize things (this is a custom clipboard manager after all), but I also feel like cgroups being mounted at
Nobody looks at logs when things are working. :)
Yes ish, but I'd rather deal with that in real issues than hypotheticals. Also like I said I'll eventually add a check for |
Just a note: Some distros like openSUSE have the whole memory-module deactivated by default for performance reasons. So even though all other cgroup-files are there, the pressure-file might still be absent. |
Hmmm, ok if that comes up then I guess we'll catch not found errors. |
Yep, I'm on opensuse, and this application does not work, even with the slice fix above. I'm on cgroup2, not hybrid, and using the latest install script.
|
Alright, I think we've got most of the bugs ironed out so we can just make it fully optional. Sadly not going to have access to a computer for the next few weeks so I can't actually fix this. @vi if you wanted to submit a PR which adds a match statement with a condition on file not found (look around the repo to see where else I've done this) and break out of the scope, I'd accept it. |
I assume denied access to the file should also cause the fallback, not just specifically not found file. |
Yeah I guess we can do EPERM and ENOTFOUND together. I'd say just throw in a warn statement for both: |
Fixed in 36ea5ae. |
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?
The text was updated successfully, but these errors were encountered: