Error upgrading archlinux-keyring

~/Desktop ❯ pacman-mirrors -G             
unstable

while update got:

...
 archlinux-keyring-20220118-1-any                                       1032.2 KiB   999 KiB/s 00:01 [###########################################################] 100%
(1/1) checking keys in keyring                                                                       [###########################################################] 100%
(1/1) checking package integrity                                                                     [###########################################################] 100%
(1/1) loading package files                                                                          [###########################################################] 100%
(1/1) checking for file conflicts                                                                    [###########################################################] 100%
(1/1) checking available disk space                                                                  [###########################################################] 100%
...
(1/1) upgrading archlinux-keyring                                                                    [###########################################################] 100%
gpg: can't connect to the agent: IPC connect call failed
gpg: can't connect to the agent: IPC connect call failed
gpg: can't connect to the agent: IPC connect call failed
==> ERROR: There is no secret key available to sign with.
==> Use 'pacman-key --init' to generate a default secret key.
==> Updating trust database...
gpg: next trustdb check due at 2022-04-20
...
~/Desktop ❯ pacman-key --list-keys pacman 
gpg: Note: trustdb not writable
pub   rsa4096 2022-01-14 [SC]
      C3A17FA5A7B70B5472CFDF3F6C31F2B7AC32BD13
uid           [ultimate] Pacman Keyring Master Key <pacman@localhost>

~/Desktop ❯ 
~/Desktop ❯ pacman-key --list-keys | wc -l
gpg: Note: trustdb not writable
1161
~/Desktop ❯

(with the chaotic-keyring package installed)

~/Desktop ❯ tail /etc/pacman.conf -n4
#Server = file:///home/custompkgs

[chaotic-aur]
Include = /etc/pacman.d/chaotic-mirrorlist
~/Desktop ❯ 
complete update log
~/Desktop ❯ sudo pacman -Syu 
:: Synchronising package databases...
 core                                                                    166.9 KiB   143 KiB/s 00:01 [###########################################################] 100%
 extra                                                                  1898.4 KiB   683 KiB/s 00:03 [###########################################################] 100%
 community                                                                 6.9 MiB   876 KiB/s 00:08 [###########################################################] 100%
 multilib                                                                174.0 KiB   123 KiB/s 00:01 [###########################################################] 100%
 chaotic-aur                                                            1730.6 KiB   595 KiB/s 00:03 [###########################################################] 100%
:: Some packages should be upgraded first...
resolving dependencies...
looking for conflicting packages...

Package (1)             Old Version  New Version  Net Change  Download Size

core/archlinux-keyring  20220114-1   20220118-1     0.01 MiB       1.01 MiB

Total Download Size:   1.01 MiB
Total Installed Size:  1.43 MiB
Net Upgrade Size:      0.01 MiB

:: Proceed with installation? [Y/n] 
:: Retrieving packages...
 archlinux-keyring-20220118-1-any                                       1032.2 KiB   999 KiB/s 00:01 [###########################################################] 100%
(1/1) checking keys in keyring                                                                       [###########################################################] 100%
(1/1) checking package integrity                                                                     [###########################################################] 100%
(1/1) loading package files                                                                          [###########################################################] 100%
(1/1) checking for file conflicts                                                                    [###########################################################] 100%
(1/1) checking available disk space                                                                  [###########################################################] 100%
:: Running pre-transaction hooks...
(1/1) Creating Timeshift snapshot before upgrade...
First run mode (config file not found)
Selected default snapshot type: BTRFS
Using system disk as snapshot device for creating snapshots in BTRFS mode
Mounted '/dev/dm-0 (sda1)' at '/run/timeshift/backup'
Creating new backup...(BTRFS)
Saving to device: /dev/dm-0, mounted at path: /run/timeshift/backup
Created directory: /run/timeshift/backup/timeshift-btrfs/snapshots/2022-01-19_21-55-30
Created subvolume snapshot: /run/timeshift/backup/timeshift-btrfs/snapshots/2022-01-19_21-55-30/@
Created control file: /run/timeshift/backup/timeshift-btrfs/snapshots/2022-01-19_21-55-30/info.json
BTRFS Snapshot saved successfully (2s)
Tagged snapshot '2022-01-19_21-55-30': ondemand
------------------------------------------------------------------------------
First run mode (config file not found)
Selected default snapshot type: BTRFS

/dev/dm-0 is mounted at: /run/timeshift/backup, options: rw,relatime,compress=zstd:3,space_cache=v2,autodefrag,subvolid=5,subvol=/

Selected default snapshot device: /dev/dm-0
------------------------------------------------------------------------------
Removing snapshot: 2022-01-18_10-19-49
Deleting subvolume: @ (Id:280)
Deleted subvolume: @ (Id:280)

Destroying qgroup: 0/280
Destroyed qgroup: 0/280

Deleted directory: /run/timeshift/backup/timeshift-btrfs/snapshots/2022-01-18_10-19-49
Removed snapshot: 2022-01-18_10-19-49
------------------------------------------------------------------------------
Generating grub configuration file ...
Found theme: /usr/share/grub/themes/manjaro/theme.txt
Found linux image: /boot/vmlinuz-5.16-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-5.16-x86_64.img
Found initrd fallback image: /boot/initramfs-5.16-x86_64-fallback.img
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Detecting snapshots ...
Found snapshot: 2022-01-19 21:55:31 | timeshift-btrfs/snapshots/2022-01-19_21-55-30/@ | ondemand | {timeshift-autosnap} {created before upgrade} |
Found snapshot: 2022-01-19 09:15:19 | timeshift-btrfs/snapshots/2022-01-19_09-15-19/@ | ondemand | {timeshift-autosnap} {created before upgrade} |
Found snapshot: 2022-01-18 20:22:57 | timeshift-btrfs/snapshots/2022-01-18_20-22-57/@ | ondemand | {timeshift-autosnap} {created before upgrade} |
Found 3 snapshot(s)
Unmount /tmp/grub-btrfs.pv7iMvA7j5 .. Success
Found memtest86+ image: /boot/memtest86+/memtest.bin
done
:: Processing package changes...
(1/1) upgrading archlinux-keyring                                                                    [###########################################################] 100%
gpg: can't connect to the agent: IPC connect call failed
gpg: can't connect to the agent: IPC connect call failed
gpg: can't connect to the agent: IPC connect call failed
==> ERROR: There is no secret key available to sign with.
==> Use 'pacman-key --init' to generate a default secret key.
==> Updating trust database...
gpg: next trustdb check due at 2022-04-20
:: Running post-transaction hooks...
(1/2) Arming ConditionNeedsUpdate...
(2/2) Refreshing PackageKit...

:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...

Package (11)                Old Version  New Version  Net Change  Download Size

core/gnutls                 3.7.2-2      3.7.3-1       -1.05 MiB       2.75 MiB
extra/gst-plugins-bad       1.18.5-4     1.18.5-5       0.00 MiB       1.03 MiB
extra/gst-plugins-bad-libs  1.18.5-4     1.18.5-5       0.00 MiB       1.99 MiB
community/inxi              3.3.11.1-1   3.3.12.1-1     0.00 MiB       0.27 MiB
multilib/lib32-systemd      250.2-1      250.3-1       -0.07 MiB       0.79 MiB
extra/libinput              1.19.3-1     1.19.3-2      -0.31 MiB       0.26 MiB
extra/libwacom              1.12-1       2.0.0-2        0.01 MiB       0.10 MiB
extra/soundtouch            2.3.0-2      2.3.1-1        0.00 MiB       0.06 MiB
core/systemd                250.2-1      250.3-1        0.01 MiB       8.63 MiB
core/systemd-libs           250.2-1      250.3-1       -0.11 MiB       0.77 MiB
core/systemd-sysvcompat     250.2-1      250.3-1        0.00 MiB       0.01 MiB

Total Download Size:   16.66 MiB
Total Installed Size:  55.38 MiB
Net Upgrade Size:      -1.52 MiB

:: Proceed with installation? [Y/n] n
~/Desktop ❯ 
single package installation went good
~/Desktop ❯ sudo pacman -Syy archlinux-keyring
[sudo] password for m: 
:: Synchronising package databases...
 core                                                                    166.9 KiB   209 KiB/s 00:01 [###########################################################] 100%
 extra                                                                  1898.4 KiB   537 KiB/s 00:04 [###########################################################] 100%
 community                                                                 6.9 MiB  1633 KiB/s 00:04 [###########################################################] 100%
 multilib                                                                174.0 KiB   217 KiB/s 00:01 [###########################################################] 100%
 chaotic-aur                                                            1730.6 KiB  1062 KiB/s 00:02 [###########################################################] 100%
warning: archlinux-keyring-20220118-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Package (1)             Old Version  New Version  Net Change

core/archlinux-keyring  20220118-1   20220118-1     0.00 MiB

Total Installed Size:  1.43 MiB
Net Upgrade Size:      0.00 MiB

:: Proceed with installation? [Y/n] 
(1/1) checking keys in keyring                                                                       [###########################################################] 100%
(1/1) checking package integrity                                                                     [###########################################################] 100%
(1/1) loading package files                                                                          [###########################################################] 100%
(1/1) checking for file conflicts                                                                    [###########################################################] 100%
(1/1) checking available disk space                                                                  [###########################################################] 100%
:: Running pre-transaction hooks...
(1/1) Creating Timeshift snapshot before upgrade...
First run mode (config file not found)
Selected default snapshot type: BTRFS
Using system disk as snapshot device for creating snapshots in BTRFS mode

/dev/dm-0 is mounted at: /run/timeshift/backup, options: rw,relatime,compress=zstd:3,space_cache=v2,autodefrag,subvolid=5,subvol=/

Creating new backup...(BTRFS)
Saving to device: /dev/dm-0, mounted at path: /run/timeshift/backup
Created directory: /run/timeshift/backup/timeshift-btrfs/snapshots/2022-01-19_22-18-07
Created subvolume snapshot: /run/timeshift/backup/timeshift-btrfs/snapshots/2022-01-19_22-18-07/@
Created control file: /run/timeshift/backup/timeshift-btrfs/snapshots/2022-01-19_22-18-07/info.json
BTRFS Snapshot saved successfully (1s)
Tagged snapshot '2022-01-19_22-18-07': ondemand
------------------------------------------------------------------------------
First run mode (config file not found)
Selected default snapshot type: BTRFS

/dev/dm-0 is mounted at: /run/timeshift/backup, options: rw,relatime,compress=zstd:3,space_cache=v2,autodefrag,subvolid=5,subvol=/

Selected default snapshot device: /dev/dm-0
------------------------------------------------------------------------------
Removing snapshot: 2022-01-18_20-22-57
Deleting subvolume: @ (Id:281)
Deleted subvolume: @ (Id:281)

Destroying qgroup: 0/281
Destroyed qgroup: 0/281

Deleted directory: /run/timeshift/backup/timeshift-btrfs/snapshots/2022-01-18_20-22-57
Removed snapshot: 2022-01-18_20-22-57
------------------------------------------------------------------------------
Generating grub configuration file ...
Found theme: /usr/share/grub/themes/manjaro/theme.txt
Found linux image: /boot/vmlinuz-5.16-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-5.16-x86_64.img
Found initrd fallback image: /boot/initramfs-5.16-x86_64-fallback.img
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Detecting snapshots ...
Found snapshot: 2022-01-19 22:18:08 | timeshift-btrfs/snapshots/2022-01-19_22-18-07/@ | ondemand | {timeshift-autosnap} {created before upgrade} |
Found snapshot: 2022-01-19 21:55:31 | timeshift-btrfs/snapshots/2022-01-19_21-55-30/@ | ondemand | {timeshift-autosnap} {created before upgrade} |
Found snapshot: 2022-01-19 09:15:19 | timeshift-btrfs/snapshots/2022-01-19_09-15-19/@ | ondemand | {timeshift-autosnap} {created before upgrade} |
Found 3 snapshot(s)
Unmount /tmp/grub-btrfs.K4GdYAsOUJ .. Success
Found memtest86+ image: /boot/memtest86+/memtest.bin
done
:: Processing package changes...
(1/1) reinstalling archlinux-keyring                                                                 [###########################################################] 100%
==> Appending keys from archlinux.gpg...
==> Disabling revoked keys in keyring...
  -> Disabled 2 keys.
==> Updating trust database...
gpg: marginals needed: 3  completes needed: 1  trust model: pgp
gpg: depth: 0  valid:   1  signed:  31  trust: 0-, 0q, 0n, 0m, 0f, 1u
gpg: depth: 1  valid:  31  signed:  95  trust: 0-, 0q, 0n, 31m, 0f, 0u
gpg: depth: 2  valid:  85  signed:  34  trust: 85-, 0q, 0n, 0m, 0f, 0u
gpg: next trustdb check due at 2022-04-20
==> Updating trust database...
gpg: next trustdb check due at 2022-04-20
:: Running post-transaction hooks...
(1/2) Arming ConditionNeedsUpdate...
(2/2) Refreshing PackageKit...
~/Desktop 1m 1s ❯ 

So some OS/hardware stability issue. The PC is about 12-14 years old:

inxi
inxi -Fazy1                   
System:
  Kernel: 5.16.1-1-MANJARO x86_64
    bits: 64
    compiler: gcc
      v: 11.1.0
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-5.16-x86_64 root=UUID=b3cf0f6a-55e1-4e25-83d5-88c0781c30e3 rw rootflags=subvol=@ quiet cryptdevice=UUID=ef44cf91-5209-4ff4-95bf-ffb124a71d7e:luks-ef44cf91-5209-4ff4-95bf-ffb124a71d7e root=/dev/mapper/luks-ef44cf91-5209-4ff4-95bf-ffb124a71d7e apparmor=1 security=apparmor udev.log_priority=3 ipv6.disable=1
  Desktop: KDE Plasma 5.23.5
    tk: Qt 5.15.2
    wm: kwin_x11
    vt: 1
    dm: SDDM
  Distro: Manjaro Linux
    base: Arch Linux

Machine:
  Type: Laptop
  System: ASUSTeK
    product: K50IJ
      v: 1.0
      serial: <superuser required>
  Mobo: ASUSTeK
    model: K50IJ
      v: 1.0
      serial: <superuser required>
  BIOS: American Megatrends
    v: 218
    date: 04/09/2010

Battery:
  Device-1: hidpp_battery_0
    model: Logitech Wireless Keyboard K360
    serial: <filter>
    charge: 50% (should be ignored)
    rechargeable: yes
    status: N/A
  Device-2: hidpp_battery_1
    model: Logitech Wireless Mouse
    serial: <filter>
    charge: 55% (should be ignored)
    rechargeable: yes
    status: Discharging

CPU:
  Info:
    model: Celeron T3100
    bits: 64
    type: MCP
    arch: Core Penryn
    family: 6
    model-id: 0x17 (23)
    stepping: 0xA (10)
    microcode: 0xA0B
  Topology:
    cpus: 1
      cores: 2
    smt: <unsupported>
    cache:
      L1: 128 KiB
        desc: d-2x32 KiB; i-2x32 KiB
      L2: 1024 KiB
        desc: 1x1024 KiB
  Speed (MHz):
    avg: 1895
    min/max: N/A
    cores:
      1: 1895
      2: 1895
    bogomips: 7582
  Flags: ht lm nx pae sse sse2 sse3 ssse3
  Vulnerabilities:
    Type: itlb_multihit
      status: KVM: VMX unsupported
    Type: l1tf
      mitigation: PTE Inversion
    Type: mds
      status: Vulnerable: Clear CPU buffers attempted, no microcode; SMT disabled
    Type: meltdown
      mitigation: PTI
    Type: spec_store_bypass
      status: Vulnerable
    Type: spectre_v1
      mitigation: usercopy/swapgs barriers and __user pointer sanitization
    Type: spectre_v2
      mitigation: Full generic retpoline, STIBP: disabled, RSB filling
    Type: srbds
      status: Not affected
    Type: tsx_async_abort
      status: Not affected

Graphics:
  Device-1: Intel Mobile 4 Series Integrated Graphics
    vendor: ASUSTeK
    driver: i915
      v: kernel
    bus-ID: 00:02.0
    chip-ID: 8086:2a42
    class-ID: 0300
  Device-2: Chicony 2.0M UVC Webcam / CNF7129
    type: USB
    driver: uvcvideo
    bus-ID: 1-3:2
    chip-ID: 04f2:b071
    class-ID: 0e02
    serial: <filter>
  Display: x11
    server: X.org 1.21.1.3
    compositor: kwin_x11
    driver:
      loaded: modesetting
      alternate: fbdev,vesa
    resolution: <missing: xdpyinfo>
  Message: Unable to show advanced data. Required tool glxinfo missing.

Audio:
  Device-1: Intel 82801I HD Audio
    vendor: Santa Cruz Operation
    driver: snd_hda_intel
      v: kernel
    bus-ID: 00:1b.0
    chip-ID: 8086:293e
    class-ID: 0403
  Sound Server-1: ALSA
    v: k5.16.1-1-MANJARO
    running: yes
  Sound Server-2: JACK
    v: 1.9.20
    running: no
  Sound Server-3: PulseAudio
    v: 15.0
    running: yes
  Sound Server-4: PipeWire
    v: 0.3.43
    running: yes

Network:
  Device-1: Qualcomm Atheros AR8121/AR8113/AR8114 Gigabit or Fast Ethernet
    vendor: ASUSTeK
    driver: ATL1E
      v: N/A
      modules: atl1e
    port: ec00
    bus-ID: 02:00.0
    chip-ID: 1969:1026
    class-ID: 0200
    IF: enp2s0
      state: up
      speed: 100 Mbps
      duplex: full
      mac: <filter>

Bluetooth:
  Device-1: Realtek Bluetooth Radio
    type: USB
    driver: btusb
      v: 0.8
    bus-ID: 6-1:2
    chip-ID: 0bda:8771
    class-ID: e001
    serial: <filter>
    Report: rfkill
      ID: hci0
        rfk-id: 2
      state: up
      address: see --recommends

Drives:
  Local Storage:
    total: 232.89 GiB
    used: 95.18 GiB (40.9%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/sda
    maj-min: 8:0
    vendor: Seagate
    model: ST9250315AS
    size: 232.89 GiB
    block-size:
      physical: 512 B
      logical: 512 B
    speed: 3.0 Gb/s
    type: HDD
    rpm: 5400
    serial: <filter>
    rev: SDM1
    scheme: MBR

Partition:
  ID-1: /
    raw-size: 232.88 GiB
    size: 232.88 GiB (100.00%)
    used: 95.18 GiB (40.9%)
    fs: btrfs
    dev: /dev/dm-0
      maj-min: 254:0
      mapped: luks-ef44cf91-5209-4ff4-95bf-ffb124a71d7e
  ID-2: /home
    raw-size: 232.88 GiB
    size: 232.88 GiB (100.00%)
    used: 95.18 GiB (40.9%)
    fs: btrfs
    dev: /dev/dm-0
      maj-min: 254:0
      mapped: luks-ef44cf91-5209-4ff4-95bf-ffb124a71d7e
  ID-3: /var/log
    raw-size: 232.88 GiB
    size: 232.88 GiB (100.00%)
    used: 95.18 GiB (40.9%)
    fs: btrfs
    dev: /dev/dm-0
      maj-min: 254:0
      mapped: luks-ef44cf91-5209-4ff4-95bf-ffb124a71d7e

Swap:
  Kernel:
    swappiness: 1 (default 60)
    cache-pressure: 100 (default)
  ID-1: swap-1
    type: file
    size: 512 MiB
    used: 25.9 MiB (5.1%)
    priority: -2
    file: /swap/swapfile

Sensors:
  System Temperatures:
    cpu: 56.0 C
    mobo: N/A
  Fan Speeds (RPM): N/A

Info:
  Processes: 227
  Uptime: 13h 3m
    wakeups: 109
  Memory: 3.8 GiB
    used: 3.16 GiB (83.2%)
  Init: systemd
    v: 250
    tool: systemctl
  Compilers:
    gcc: 11.1.0
    clang: 13.0.0
  Packages:
    pacman: 1255
      lib: 334
    flatpak: 0
  Shell: Zsh
    v: 5.8
    default: Bash
      v: 5.1.16
    running-in: konsole
  inxi: 3.3.11

~/Desktop 15s ❯ 
~/Desktop ❯ free
               total        used        free      shared  buff/cache   available
Mem:            3888        2436         101         566        1349         648
Swap:            511          26         485
~/Desktop ❯ 

A Forum moderator re-categorized my post from update thread into separate topic.
As you see currently I have no issue: the package was reinstalled ok. The point of the post I see as to save the case for possible further need.

I mostly moved it because you’re using the Chaotic-AUR repo which is unsupported and unrelated to Manjaro upates.

3 Likes

My guess is…

Either you messed up your gpg by having chaotic installed and synced, removed , and then fixed it again by adding it back (malformed databse).

Or … during the installation of chatoic, the pacman hooks forced actions such as
Updating trust database
(just so happened to fix it)

Not sure why there are so many posts about random gpg problems … never seen it on any install around me. But maybe the first note about fiddling with chaotic may be the commonality…

Hi, cscs! Thanks for taking a part here.

Prefer to save pure automated state of local keyring. Indeed first I added the key manually from the keyserver (as the https://aur.chaotic.cx/ instruction tells), then manually lsign the key, that action let me install packages with other keys and mirror URLs.
But after that I remade local keyring from scratch in pure automated mode:

sudo rm -r /etc/pacman.d/gnupg
sudo pacman-key --init
sudo pacman-key --populate

And this populates local keyring with items from archlinux, manjaro and chaotic installed files. That’s it.
After several days I got this issue in the initial post.
Look, I did the same on other more modern PC (mentioned in my profile) and it works just fine at least for about half of a year. No any issue with local keyring I had there.

My guess that installation procedure calls some process and has timeout for the action and cause of other user activity (I was watching online video) that process on such a low performance PC (2 * 2GB DDR2 SODIMM modules 667 MHz RAM), that old couple core lowest-end possible Celeron CPU, 2.5 HDD (not SSD) the timing to answer to function call was wasted and we saw that errors in console (which I never saw before).

Possible prove for that: we saw warning that newly installing keys could not be locally signed, cause the key to sign with is absent, but after that action, the direct call to show local pacman public master key was shown, re-installation of the archlinux-keyring was done successfully.

So I think it is an timeout issue of some function call or some other hardware/OS issues (the PC has the latest possible BIOS firmware available).

cause reinstallation helped this does not look as possible cause

I did not catch this. Please expand that idea.