Packages

  • Status Closed
  • Percent Complete
    100%
  • 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
Attached to Project: Packages
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

Closed by  Emulatorman
13.03.2018 19:22
Reason for closing:  Fixed

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.

Admin

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?

Admin

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.

Admin

Btw, i'm preparing cronie to limit memory and I/O for cron jobs, i let you know when it is ready too.

Admin

cronie is ready [0] and fcron too [1] . Now, it requires testing to confirm if works well.

Admin

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!

Date User Effort (H:M)
watch my effort tracking timers

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing