-
Notifications
You must be signed in to change notification settings - Fork 32
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
[remux] hang at 100% cpu after restarting keyd #228
Comments
Does it handle the folio connecting and disconnecting properly when keyd isn't running? |
Yes, it handles the type folio properly when keyd isn't running. To answer your question I did the following: (in type-folio, but "lying down"/disconnected)
Throughout this sequence of actions, remux used negligible cpu and 1% of memory. |
Well that's good to know. I haven't looked closely at the code to see how it gets the key device(s) to work with. When keyd is not running, there will be a key input device for the power button, and one for the folio. The folio device will be removed and re-added every time it's disconnected and reconnected. With kyed running the same stuff happens, but there are now new virtual input devices provided by keyd, and it will grab all input on the other devices. Restarting keyd would remove and re-add these virtual devices, as well as ungrab, and then grab the other devices. Depending on how the code is setup to handles these devices, it might not be happy with these input devices going away as they were the only ones not grabbed when remux started. And when keyd isn't running, it's just not an issue as it gets the power button input device and not the folio as the key input. So the folio device going away doesn't matter. @raisjn or someone else who has looked closer at the code would confirm. |
Ok, thanks for explaining that. I'll try looking at the code if I have time later to set up a build environment. |
If you aren't averse to using docker, using the docker version of the makefile targets does simplify setting up a build environment. |
@plredmond: thank you so much for reporting this and the reliable repro steps! it looks like a file descriptor was going away when keyd is restarted. i put in some hacky code to re-open the file descriptors in d2e0387 and it looks like the infinite loop + CPU usage goes away. please try it out - you can use the latest build on the build servers: build.rmkit.dev/ and verify it fixes it |
Thanks @raisjn!
load average stays low and |
Repro
(in type-folio, but "lying down"/disconnected)
(in "flight mode")
systemctl restart keyd
systemctl restart keyd
i have also observed remux getting into this 100% cpu state without restarting keyd, but i haven't figured out a repro for that yet
systemctl restart remux
seems to fix the problemSoftware versions
# toltecctl status
# launcherctl status
😮
# opkg info remux
# opkg info keyd
toltec-dev/toltec#744 (comment) is me
# opkg info yaft
The text was updated successfully, but these errors were encountered: