I have a few Rocky Linux 8 and 9 machines, of both x86_64 and aarch64 architecture, which regularly pull updates using dnf update.
Very recently, the Rocky Linux 9 aarch64 machines begin failing with:
Module yaml error: Parser error
terminate called after throwing an instance of 'libdnf::ModulePackageContainer::ResolveException'
what(): Failed to update from string: Unexpected YAML event in document stream [line 1 col 1]
Aborted
This is apparently while parsing one of the YAML files of the AppStream repository. That is, when I set enabled=0 for the [appstream] section in /etc/yum.repos.d/rocky.repo, the problem disappears.
Full transcript from a docker session:
% docker run -ti rockylinux:9
[root@a18d3b53294e /]# cat /etc/os-release
NAME="Rocky Linux"
VERSION="9.3 (Blue Onyx)"
ID="rocky"
ID_LIKE="rhel centos fedora"
VERSION_ID="9.3"
PLATFORM_ID="platform:el9"
PRETTY_NAME="Rocky Linux 9.3 (Blue Onyx)"
ANSI_COLOR="0;32"
LOGO="fedora-logo-icon"
CPE_NAME="cpe:/o:rocky:rocky:9::baseos"
HOME_URL="https://rockylinux.org/"
BUG_REPORT_URL="https://bugs.rockylinux.org/"
SUPPORT_END="2032-05-31"
ROCKY_SUPPORT_PRODUCT="Rocky-Linux-9"
ROCKY_SUPPORT_PRODUCT_VERSION="9.3"
REDHAT_SUPPORT_PRODUCT="Rocky Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="9.3"
[root@a18d3b53294e /]# uname -a
Linux a18d3b53294e 6.12.54-linuxkit #1 SMP Tue Nov 4 21:21:47 UTC 2025 aarch64 aarch64 aarch64 GNU/Linux
[root@a18d3b53294e /]# dnf update
Rocky Linux 9 - BaseOS 16 MB/s | 7.5 MB 00:00
Rocky Linux 9 - AppStream 24 MB/s | 11 MB 00:00
Rocky Linux 9 - Extras 1.1 kB/s | 17 kB 00:15
Module yaml error: Parser error
terminate called after throwing an instance of 'libdnf::ModulePackageContainer::ResolveException'
what(): Failed to update from string: Unexpected YAML event in document stream [line 1 col 1]
Aborted
Having found a similar issue in Dnf (yum) suddenly stopped working on RockyLinux 8 machines - Support - TheForeman , I tried using strace as they did there:
openat(AT_FDCWD, "/var/cache/dnf/appstream-056c207c7f3c6316/repodata/c32a428b8b4e706b6fd51aa79ebe336585c3aaf0675b0c18a02a10b7303a3869-modules.yaml.xz", O_RDONLY) = 8
fstat(8, {st_mode=S_IFREG|0644, st_size=8596, ...}) = 0
..
write(2, "Module yaml error: ", 19) = 19
write(2, "Parser error", 12) = 12
write(2, "\n", 1) = 1
write(2, "terminate called after throwing "..., 48) = 48
write(2, "libdnf::ModulePackageContainer::"..., 48) = 48
...
--- SIGABRT {si_signo=SIGABRT, si_code=SI_TKILL, si_pid=944, si_uid=0} ---
+++ killed by SIGABRT (core dumped) +++
If I uncompress the c32a428b8b4e706b6fd51aa79ebe336585c3aaf0675b0c18a02a10b7303a3869-modules.yaml.xz file, I seems to start fairly normally:
# head -20 c32a428b8b4e706b6fd51aa79ebe336585c3aaf0675b0c18a02a10b7303a3869-modules.yaml
---
document: modulemd-defaults
version: 1
data:
module: mariadb
profiles:
10.11: [server]
...
---
document: modulemd
version: 2
data:
name: mariadb
stream: "10.11"
version: 9070020251119234135
context: rhel9
static_context: true
arch: aarch64
summary: MariaDB Module
description: >-
Does anybody have an idea what might be wrong?
It looks like this only happens for aarch64, and Rocky Linux 9. x86_64 fine.
[Edited to indicate that this affects the latest Rocky 9.x. It’s a Docker artifact that the most recent rockylinux:9 tag seems to point at 9.3].