11

I am running Debian Linux 9 (Stretch) with a 4.9 kernel, and I notice periodically the system launches an apt-config process with user _apt that uses 100% CPU and consumes enough resources that I can't mount or unmount volumes, much less use desktop functions (in my case KDE Plasma).

I thought this might be due to the installation of the unattended-upgrades package that is now installed by default as described on the Debian wiki, but following the procedure to disable with the command sudo dpkg-reconfigure -plow unattended-upgrades did not help.

I see no similar resource consumption issues when I open a console and use aptitude or dselect, or if I use Discover, even though these programs will also open an apt-config process with user _apt that uses 100% CPU.

How should I approach this problem?

ultradian
  • 581
  • 5
  • 20
  • +1 exactly same environment and problem. I've inspected /var/log/apt/ but found nothing related. I wonder where is the place to find the logs of apt-config, and preferably also the procedure envoking apt-config... – Bill Huang Dec 11 '17 at 12:20
  • Yeah. I never figured out how this was precisely getting invoked and what makes it different than using `aptitude` or `dselect`. I simply removed `unattended-upgrades` and went back to manual updating. If that works for you, maybe we should put it up as an answer although it doesn't fully answer the question. – ultradian Dec 12 '17 at 00:07
  • +1 same issue on KDE, debian stretch, backports kernel. I have two machines with unattended-upgrades, but this issue only affects one of them – mappu Feb 10 '18 at 21:37

2 Answers2

6

This is debian bug #881787. Packagekit is checking for updates every 5-10 minutes on a Stretch KDE system. You can see this in systemctl status packagekit.

The packagekit logs also show how long the checks take. On my system they took over 500 seconds and so were running basically constantly.

The apper package may be responsible.

I had this package installed. I uninstalled it and have now successfully gone a whole 30 minutes without any new entries appearing in the packagekit logs. So that solved it for me!

mappu
  • 329
  • 2
  • 16
  • Thanks for finding this! I found the same lines in my syslog, and removing apper seems to clear it up. – ultradian Nov 15 '18 at 23:30
  • 2
    I had the problem recur four days later, and now have removed all of `PackageKit` and `plasma-discover`. – ultradian Nov 20 '18 at 14:15
2

I had this issue as well. I don't know exactly what happened, but I think executing pkcon refresh fixed it. (pkcon is part of packagekit-tools.) Execution took quite some time, maybe 3 minutes. The progress was stuck at Downloading packages for most of the time — first at 98% and some time later at 99%, like this:

Refreshing cache              [=========================]
Waiting in queue              [=========================]
Loading cache                 [=========================]
Refreshing software list      [=========================]
Downloading packages          [======================== ] (98%)

99%:

Downloading packages          [======================== ] (99%)

The final output was as follows:

Refreshing cache              [=========================]
Waiting in queue              [=========================]
Loading cache                 [=========================]
Refreshing software list      [=========================]
Downloading packages          [=========================]
Running                       [=========================]
Finished                      [=========================]
 Enabled                              http://security.debian.org/debian-security stretch/updates InRelease
 ...
 ...
 ...

Now executing pkcon refresh and pkcon refresh force takes only 1 or 2 seconds:

Refreshing cache              [=========================]
Loading cache                 [=========================]
Downloading packages          [=========================]
Finished                      [=========================]
 Enabled                              http://security.debian.org/debian-security stretch/updates InRelease
 ...
myrdd
  • 3,222
  • 2
  • 22
  • 22