You are not logged in.

#1 2024-01-22 05:58:14

roBooter
Member
Registered: 2022-10-29
Posts: 10

[SOLVED] dirmngr uses 100% cpu

Hi all! In my system, in random time appears new command in htop

dirmngr --homedir /etc/pacman.d/gnupg --daemon

Which uses 100% of cpu. The worst thing is that I can't kill it. It goes back with different PID second after kill. I did see some alike problem in forum https://bugs.archlinux.org/task/42798 but it didn't end with any solution. I can remove this command only by rebooting my machine.

Last edited by roBooter (2024-01-31 12:02:48)

Offline

#2 2024-01-22 09:14:31

seth
Member
Registered: 2012-09-03
Posts: 52,299

Re: [SOLVED] dirmngr uses 100% cpu

https://wiki.archlinux.org/title/Pacman … _regularly

systemctl status archlinux-keyring-wkd-sync.service

Does it go away if you stop the timer?

Offline

#3 2024-01-22 10:39:32

roBooter
Member
Registered: 2022-10-29
Posts: 10

Re: [SOLVED] dirmngr uses 100% cpu

I will wait for the moment when it will appear one more time. Cause I already rebooted, due to the high noise of fans.

Offline

#4 2024-01-31 12:01:30

roBooter
Member
Registered: 2022-10-29
Posts: 10

Re: [SOLVED] dirmngr uses 100% cpu

seth wrote:

https://wiki.archlinux.org/title/Pacman … _regularly

systemctl status archlinux-keyring-wkd-sync.service

Does it go away if you stop the timer?

Finally it happened again. Yes. It did stop the process. Thank you very much!

Offline

#5 2024-01-31 13:30:43

seth
Member
Registered: 2012-09-03
Posts: 52,299

Re: [SOLVED] dirmngr uses 100% cpu

What was/is the status of the service?
Generally you might want to keep the timer for the reasons described in the wiki.
Also there's popped up another thread that now links here.

Offline

#6 2024-01-31 18:41:35

roBooter
Member
Registered: 2022-10-29
Posts: 10

Re: [SOLVED] dirmngr uses 100% cpu

seth wrote:

What was/is the status of the service?
Generally you might want to keep the timer for the reasons described in the wiki.
Also there's popped up another thread that now links here.

When its on:
archlinux-keyring-wkd-sync.service:

● archlinux-keyring-wkd-sync.service - Refresh existing keys of archlinux-keyring
     Loaded: loaded (/usr/lib/systemd/system/archlinux-keyring-wkd-sync.service; static)
     Active: active (running) since Wed 2024-01-31 21:29:57 MSK; 1s ago
TriggeredBy: ● archlinux-keyring-wkd-sync.timer
   Main PID: 5142 (archlinux-keyri)
      Tasks: 4 (limit: 19059)
     Memory: 17.2M (peak: 17.8M)
        CPU: 1.323s
     CGroup: /system.slice/archlinux-keyring-wkd-sync.service
             ├─5142 /usr/bin/bash /usr/bin/archlinux-keyring-wkd-sync
             ├─5167 gpg --homedir /etc/pacman.d/gnupg/ --quiet --no-permission-warning --auto-key-locate clear,nodefault,wkd --locate->
             └─5169 dirmngr --homedir /etc/pacman.d/gnupg --daemon

archlinux-keyring-wkd-sync.timer:

● archlinux-keyring-wkd-sync.timer - Refresh existing PGP keys of>
     Loaded: loaded (/usr/lib/systemd/system/archlinux-keyring-wk>
     Active: active (waiting) since Wed 2024-01-31 15:38:03 MSK; >
    Trigger: Sun 2024-02-11 19:47:41 MSK; 1 week 3 days left
   Triggers: ● archlinux-keyring-wkd-sync.service

When i stopped the timer:

● archlinux-keyring-wkd-sync.service - Refresh existing keys of archlinux-keyring
     Loaded: loaded (/usr/lib/systemd/system/archlinux-keyring-wkd-sync.service; static)
     Active: active (running) since Wed 2024-01-31 21:29:57 MSK; 8min ago
TriggeredBy: ○ archlinux-keyring-wkd-sync.timer
   Main PID: 5142 (archlinux-keyri)
      Tasks: 4 (limit: 19059)
     Memory: 24.4M (peak: 25.5M)
        CPU: 2min 53.241s
     CGroup: /system.slice/archlinux-keyring-wkd-sync.service
             ├─5142 /usr/bin/bash /usr/bin/archlinux-keyring-wkd-sync
             ├─5169 dirmngr --homedir /etc/pacman.d/gnupg --daemon
             └─5878 gpg --homedir /etc/pacman.d/gnupg/ --quiet --no-permission-warning --auto-key-locate clear,nodefault,wkd --locate->

BTW - after restarting the timer (to send u a reply), it started using 100% cpu again...

Offline

#7 2024-01-31 21:11:35

seth
Member
Registered: 2012-09-03
Posts: 52,299

Re: [SOLVED] dirmngr uses 100% cpu

The service didn't stop after a long while (and just disabling the timer won't either, next run is scheduled for 2/11 anyway)
If you stop the service and run

sudo /usr/bin/archlinux-keyring-wkd-sync

does that
a) cause the cpu loading dirmngr processs
b) yell any errors at you?

Offline

#8 2024-02-01 04:02:33

roBooter
Member
Registered: 2022-10-29
Posts: 10

Re: [SOLVED] dirmngr uses 100% cpu

seth wrote:

The service didn't stop after a long while (and just disabling the timer won't either, next run is scheduled for 2/11 anyway)
If you stop the service and run

sudo /usr/bin/archlinux-keyring-wkd-sync

does that
a) cause the cpu loading dirmngr processs
b) yell any errors at you?

a) It had peaks at 100% CPU, but they didn't last more than a couple seconds.
b) It yelled, and at the end it summed up all the mistakes:

Error refreshing key D8AFDDA07A5B6EDFA7D8CCDAD6D055F927843F1C with UID anthraxx@master-key.archlinux.org.
Error refreshing key 69E6471E3AE065297529832E6BA0F5A2037F4F41 with UID demize@master-key.archlinux.org.
Error refreshing key 3572FA2A1B067F22C58AF155F8B821B42A6FDCD7 with UID artafinde@master-key.archlinux.org.
Error refreshing key 034D823DA2055BEE6A6BF0BB25EA6900D9EA5EBC with UID grawlinson@archlinux.org.
Error refreshing key 04DC3FB1445FECA813C27EFAEA4F7B321A906AD9 with UID polyzen@archlinux.org.
Error refreshing key 04F7A0E31E08D3E08D39AFEBD147F94364295E8C with UID raster@archlinux.org.
Error refreshing key 05C7775A9E8B977407FE08E69D4C5AA15426DA0A with UID freswa@archlinux.org.
Error refreshing key 0A9DDABB64B993D82AD45E4F32EAB0A976938292 with UID kgizdov@archlinux.org.
Error refreshing key 0CADAACF70F64C654E131B3111675C743429DDEF with UID mtorromeo@archlinux.org.
Error refreshing key 209A36D43CE2E87DA861FC58539DFD48135182EF with UID juergen@archlinux.org.
Error refreshing key 25ACE777F62C5E5ACBF2C0474E532176DBAD6F47 with UID cbehan@archlinux.org.
Error refreshing key 2E36D8620221482FC45CB7F2A91764759326B440 with UID lfleischer@archlinux.org.
Error refreshing key 355BDB97ED4724E6B3A450E7A3D9562A589874AB with UID juergen@archlinux.org.
Error refreshing key 38EDD1886756924E1224E49524E4CDB0013C2580 with UID svetlemodry@archlinux.org.
Error refreshing key 3DCE51D60930EBA47858BA4146F633CBB0EB4BF2 with UID lains@archlinux.org.
Error refreshing key 3FFA6AB7B69AAE6CCA263DDE019A7474297D8577 with UID dbermond@archlinux.org.
Error refreshing key 4AA4767BBC9C4B1D18AE28B77F2D434B9741E8AC with UID pierre@archlinux.org.
Error refreshing key 5134EF9EAF65F95B6BB1608E50FB9B273A9D0BB5 with UID demize@archlinux.org.
Error refreshing key 535F8C0339450F054A4D282706096A6AD1CEDDAC with UID lordheavym@archlinux.org.
Error refreshing key 56C3E775E72B0C8B1C0C1BD0B5DB77409B11B601 with UID maximbaz@archlinux.org.
Error refreshing key 5B7E3FB71B7F10329A1C03AB771DF6627EDF681F with UID tpowa@archlinux.org.
Error refreshing key 60939E55F6D5ABF7EE419F08B1A1D3C5F2DF9BC5 with UID wild@archlinux.org.
Error refreshing key 64B13F7117D6E07D661BBCE0FE763A64F5E54FD6 with UID kpcyrd@archlinux.org.
Error refreshing key 6645B0A8C7005E78DB1D7864F99FFE0FEAE999BD with UID allan@archlinux.org.
Error refreshing key 69DA34D78FE0EFD596AC6D049D893EC4DAAF9129 with UID archange@archlinux.org.
Error refreshing key 6DAF7B808F9DF25139620000D21461E3DFE2060D with UID chris.rebischke@archlinux.org.
Error refreshing key 8742F7535E7B394A1B048163332C9C40F40D2072 with UID jsteel@archlinux.org.
Error refreshing key 8FC15A064950A99DD1BD14DD39E4B877E62EB915 with UID svenstaro@archlinux.org.
Error refreshing key 903BAB73640EB6D65533EFF3468F122CE8162295 with UID santiago@archlinux.org.
Error refreshing key 9D74DF6F91B7BDABD5815CA84AC5588F941C2A25 with UID arojas@archlinux.org.
Error refreshing key A2FF3A36AAA56654109064AB19802F8B0D70FC30 with UID heftig@archlinux.org.
Error refreshing key B4B759625D4633430B74877059E43E106B247368 with UID artafinde@archlinux.org.
Error refreshing key B5971F2C5C10A9A08C60030F786C63F330D7CB92 with UID felixonmars@archlinux.org.
Error refreshing key BD27B07A5EF45C2ADAF70E0484818A6819AF4A9B with UID eschwartz@archlinux.org.
Error refreshing key BE2DBCF2B1E3E588AC325AEAA06B49470F8E620A with UID ainola@archlinux.org.
Error refreshing key CB33B736591A9CA06098A9A5FCAC9CF5A6EE1209 with UID iff@archlinux.org.
Error refreshing key CCB34EBBB9541EF3F7B366C1D4A753468A5A5B67 with UID alerque@archlinux.org.
Error refreshing key FE2E6249201CA54A4FB90D066E80CA1446879D04 with UID diabonas@archlinux.org.
Error refreshing key 991F6E3F0765CF6295888586139B09DA5BF0D338 with UID dvzrv@archlinux.org.
Error refreshing key E62545315B012B69C8C94A1D56EC201BFC794362 with UID yan12125@archlinux.org.
Error refreshing key 14E46FE5FD69F2E287E244DB632C3CC0D1C9CAF6 with UID bgyorgy@archlinux.org.
Error refreshing key F00B96D15228013FFC9C9D0393B11DAA4C197E3D with UID gromit@archlinux.org.
Error refreshing key 5E6D49448958B384301F1F22498EF247F340C1E0 with UID fabiscafe@archlinux.org.

Offline

#9 2024-02-01 08:23:14

seth
Member
Registered: 2012-09-03
Posts: 52,299

Re: [SOLVED] dirmngr uses 100% cpu

Does your /usr/lib/systemd/system/archlinux-keyring-wkd-sync.service have

[Service]
ExecStart=/usr/bin/archlinux-keyring-wkd-sync
Restart=on-failure
RestartSec=5minutes

Can you start the service w/

Restart=no

(don't forget to reload the daemon in doubt)

Offline

#10 2024-02-01 10:04:16

roBooter
Member
Registered: 2022-10-29
Posts: 10

Re: [SOLVED] dirmngr uses 100% cpu

seth wrote:

Does your /usr/lib/systemd/system/archlinux-keyring-wkd-sync.service have

[Service]
ExecStart=/usr/bin/archlinux-keyring-wkd-sync
Restart=on-failure
RestartSec=5minutes

Can you start the service w/

Restart=no

(don't forget to reload the daemon in doubt)

First of all - I checked the status of the service, and I don't think its fine:

× archlinux-keyring-wkd-sync.service - Refresh existing keys of archlinux-keyring
     Loaded: loaded (/usr/lib/systemd/system/archlinux-keyring-wkd-sync.service; static)
     Active: failed (Result: exit-code) since Thu 2024-02-01 07:01:43 MSK; 5h 56min ago
   Duration: 10min 46.131s
TriggeredBy: ● archlinux-keyring-wkd-sync.timer
    Process: 8017 ExecStart=/usr/bin/archlinux-keyring-wkd-sync (code=exited, status=48)
   Main PID: 8017 (code=exited, status=48)
        CPU: 715ms

Feb 01 07:01:43 ldt systemd[1]: archlinux-keyring-wkd-sync.service: Scheduled restart job, restart counter is at 3.
Feb 01 07:01:43 ldt systemd[1]: archlinux-keyring-wkd-sync.service: Start request repeated too quickly.
Feb 01 07:01:43 ldt systemd[1]: archlinux-keyring-wkd-sync.service: Failed with result 'exit-code'.
Feb 01 07:01:43 ldt systemd[1]: Failed to start Refresh existing keys of archlinux-keyring.

*I restarted timer, as u can see*

-Yes, It has this rows.

-After restarting with the new row, the status of the service:

● archlinux-keyring-wkd-sync.service - Refresh existing keys of archlinux-keyring
     Loaded: loaded (/usr/lib/systemd/system/archlinux-keyring-wkd-sync.service; static)
     Active: active (running) since Thu 2024-02-01 13:02:56 MSK; 1s ago
TriggeredBy: ● archlinux-keyring-wkd-sync.timer
   Main PID: 14789 (archlinux-keyri)
      Tasks: 2 (limit: 19059)
     Memory: 1.5M (peak: 3.3M)
        CPU: 116ms
     CGroup: /system.slice/archlinux-keyring-wkd-sync.service
             ├─14789 /usr/bin/bash /usr/bin/archlinux-keyring-wkd-sync
             └─14814 gpg --homedir /etc/pacman.d/gnupg/ --quiet --no-permission-warning --auto-key-locate clear,nodefault,wkd --locate>

Feb 01 13:02:56 ldt archlinux-keyring-wkd-sync[14789]: Skipping key 165E0FF7C48C226E1EC363A7F83424824B3E4B90 with UID orhunparmaksiz@g>
Feb 01 13:02:56 ldt archlinux-keyring-wkd-sync[14789]: Skipping key 169704C6FB490C6892C7F23C37E0AF1FDA48F373 with UID jerome@leclan.ch>
Feb 01 13:02:56 ldt archlinux-keyring-wkd-sync[14789]: Skipping key 169704C6FB490C6892C7F23C37E0AF1FDA48F373 with UID jleclanche@archl>
Feb 01 13:02:56 ldt archlinux-keyring-wkd-sync[14789]: Skipping key 1A60DC44245D06FEF90623D6EEEEE2EEEE2EEEEE with UID gaetan@fenua.org>
Feb 01 13:02:56 ldt archlinux-keyring-wkd-sync[14789]: Skipping key 1A60DC44245D06FEF90623D6EEEEE2EEEE2EEEEE with UID bisson@gaati.org>
Feb 01 13:02:56 ldt archlinux-keyring-wkd-sync[14789]: Skipping key 209A36D43CE2E87DA861FC58539DFD48135182EF with UID juergen@archlinu>
Feb 01 13:02:56 ldt archlinux-keyring-wkd-sync[14789]: Skipping key 25ACE777F62C5E5ACBF2C0474E532176DBAD6F47 with UID cbehan@archlinux>
Feb 01 13:02:56 ldt archlinux-keyring-wkd-sync[14789]: Skipping key 2612B04099DBD9B9A3DD92A0456C7A9B91B842AE with UID jakob.gruber@gma>
Feb 01 13:02:56 ldt archlinux-keyring-wkd-sync[14789]: Skipping key 27FFC4769E19F096D41D9265A04F9397CDFD6BB0 with UID dan@master-key.a>
Feb 01 13:02:56 ldt archlinux-keyring-wkd-sync[14789]: Refreshing key 2AC0A42EFB0B5CBC7A0402ED4DC95B6D7BE9892E with UID dvzrv@master-k>
~

Offline

#11 2024-02-01 14:29:48

seth
Member
Registered: 2012-09-03
Posts: 52,299

Re: [SOLVED] dirmngr uses 100% cpu

I assume the cpu load is currently ok?
See whether it flares up again w/ the different restart behavior.

Is your network kinda spotty and do you use reflector (without silly filters that restrict you randmo stuff like national borders)?

Offline

#12 2024-02-23 06:41:32

an4oud
Member
Registered: 2016-12-17
Posts: 28

Re: [SOLVED] dirmngr uses 100% cpu

Offline

#13 2024-02-23 09:32:05

seth
Member
Registered: 2012-09-03
Posts: 52,299

Offline

#14 2024-02-23 10:09:22

an4oud
Member
Registered: 2016-12-17
Posts: 28

Re: [SOLVED] dirmngr uses 100% cpu

In my case systemd service or manually launched /usr/bin/archlinux-keyring-wkd-sync complete successfully so systemd unit editing does not help me.
Why after successfully complete /usr/bin/archlinux-keyring-wkd-sync ( or systemd service) /usr/bin/dirmngr --homedir /etc/pacman.d/gnupg --supervised process does not stop and utiliztes my cpu core to 100%?

Offline

#15 2024-02-23 11:58:29

an4oud
Member
Registered: 2016-12-17
Posts: 28

Re: [SOLVED] dirmngr uses 100% cpu

in my logs I see

Feb 23 14:41:38 sinx dirmngr[511635]: error loading certificate '/etc/ssl/certs/ca-certificates.crt': Certificate expired
Feb 23 14:41:38 sinx dirmngr[511635]: permanently loaded certificates: 145
Feb 23 14:41:38 sinx dirmngr[511635]:     runtime cached certificates: 0
Feb 23 14:41:38 sinx dirmngr[511635]:            trusted certificates: 145 (145,0,0,0)
Feb 23 14:41:39 sinx dirmngr[511635]: number of system provided CAs: 165
Feb 23 14:41:39 sinx dirmngr[511635]: ERROR:fapi:src/tss2-fapi/ifapi_config.c:202:expand_home() Home directory can't be determined.
Feb 23 14:41:39 sinx dirmngr[511635]: ERROR:fapi:src/tss2-fapi/ifapi_config.c:275:ifapi_config_initialize_finish() Expand home directory. ErrorCode (0x0006001d)
Feb 23 14:41:39 sinx dirmngr[511635]: ERROR:fapi:src/tss2-fapi/api/Fapi_Initialize.c:198:Fapi_Initialize_Finish() Could not finish initialization ErrorCode (0x0006001d)
Feb 23 14:41:39 sinx dirmngr[511635]: WARNING: Listing FAPI token objects failed: "fapi:The provided path is bad"
Feb 23 14:41:39 sinx dirmngr[511635]: Please see https://github.com/tpm2-software/tpm2-pkcs11/blob/1.9.0/docs/FAPI.md for more details
Feb 23 14:41:39 sinx dirmngr[511635]: WARNING: FAPI backend was not initialized.

Offline

#16 2024-02-23 13:41:13

seth
Member
Registered: 2012-09-03
Posts: 52,299

Re: [SOLVED] dirmngr uses 100% cpu

pacman -Qs tpm2

and elaborate on why that is there/used?

Offline

#17 2024-02-23 13:49:44

an4oud
Member
Registered: 2016-12-17
Posts: 28

Re: [SOLVED] dirmngr uses 100% cpu

seth wrote:
pacman -Qs tpm2
pacman -Qs tpm2
local/python-tpm2-pytss 2.1.0-2
    Python bindings for tpm2-tss
local/tpm2-pkcs11 1.9.0-1
    PKCS#11 interface for Trusted Platform Module 2.0 hardware
local/tpm2-tools 5.3-2
    Trusted Platform Module 2.0 tools based on tpm2-tss
local/tpm2-tss 4.0.1-1
    Implementation of the TCG Trusted Platform Module 2.0 Software Stack
    (TSS2)
seth wrote:

and elaborate on why that is there/used?

I do not known

Offline

#18 2024-02-23 15:10:44

seth
Member
Registered: 2012-09-03
Posts: 52,299

Re: [SOLVED] dirmngr uses 100% cpu

So try to get rid of it and see what impact it has on dirmngr,

pacman -Rs tpm2-pkcs11

Offline

Board footer

Powered by FluxBB