- Status Closed
- Percent Complete
- Task Type Feature Request
- Category Any
-
Assigned To
Emulatorman - Operating System All
- Severity Critical
- Priority High
- Reported Version Any
- Due in Version Starfix
-
Due Date
Undecided
- Votes
- Private
Opened by ralessi - 10/03/2018
Last edited by Emulatorman - 13/03/2018
FS#672 - [pacman-key][cronie][fcron] eating up hardware resources
This morning while I was working on my X200, I noticed that my CPU was kept 100% busy for a long time by some process which was obvioulsy eating up the battery life. The culprit was pacman-key, triggered by logrotate.
To stop this, I did ‘chmod -x /etc/cron.daily/pacman-key’ and I rebooted.
Later on, it was impossible to install a new package as it was impossible to get over the step marked as “checking keys in keyring...”
So I tried to do again ‘pacman-key –refresh-keys’: the overall process took more than an hour—behind a fast and robust internet connection. I finally got three lines, saying that about 1,000 keys were updated but I never got the prompt back. So I hit Ctrl-C.
At the time of writing, I am still trying to refresh the keys—a quite desperate attempt, if I may say so.
Although I tagged this report as a “Feature request”, it is in my opinion of quite some importance. I understand very well the absolute necessity to always have the keys updated, but in this particular case, with so many keys and so frequent updates, I begin to wonder if losses are not beginning to prevail over benefits.
Unless I am doing something wrong or missing something I should do?
Any help would be strongly appreciated.
Robert
Loading...
Available keyboard shortcuts
- Alt + ⇧ Shift + l Login Dialog / Logout
- Alt + ⇧ Shift + a Add new task
- Alt + ⇧ Shift + m My searches
- Alt + ⇧ Shift + t focus taskid search
Tasklist
- o open selected task
- j move cursor down
- k move cursor up
Task Details
- n Next task
- p Previous task
- Alt + ⇧ Shift + e ↵ Enter Edit this task
- Alt + ⇧ Shift + w watch task
- Alt + ⇧ Shift + y Close Task
Task Editing
- Alt + ⇧ Shift + s save task
Completely reinitializing the keys solved this issue, starting from 'rm -rf /etc/pacman.d/gnupg/'.
Still, I have no idea as to what could have happened.
I think your gnupg keys were corrupted or with some issues. It happens sometime.
Otherwise, I could limit memory and I/O for cron jobs [0] and move pacman-key cron job file from /etc/cron.daily to /etc/cron.weekly. What do you think?
I first thought of moving pacman-key job to /etc/cron.weekly, but I find that limiting memory and I/O for all cron jobs is a more sensible option.
Regarding pacman-key job, ideally, one should get a failure notice from anacron in case it takes too long to complete or after some timeout is reached. Would that be possible?
Many thanks! By the way Hyperbola is so wonderful!
And yes, moving pacman-key to /etc/cron.weekly in any case may be sensible too?
Ok, i've pushed a new revision [0] . It includes timeout command to kill it if still running after certain time (10 minutes by default) with a list of key servers available in the pacman-key cron job. Even, it could be modified by any user through /etc/pacman-key.conf
If you found some issue or instability, please let me know.
Btw, i'm preparing cronie to limit memory and I/O for cron jobs, i let you know when it is ready too.
cronie is ready [0] and fcron too [1] . Now, it requires testing to confirm if works well.
I've pushed a new revision of pacman to move pacman-key cron settings to /etc/cron.weekly/pacman-key [0] to keep it under a KISS way for all users.
Anyway, please let me know if it is working well to close the task.
Many thanks for this work. I just got the updates of both cronie (which I use, but I could test fcron as well) and pacman.
The new scheme, that is: have a timeout of 10 minutes by default, otherwise go through nice and apply limits to memory and I/O, all that sounds very sensible choices.
By the way, I never thought of fcron for my laptop.
I will make the tests later on today.
Well, tonight, after almost two days of testing, everything is working perfectly. I think that this may be closed.
Many thanks again!