Bug 2369519 - Low disk space causes self-inflicted "soft deadlock" on malformed /usr/lib/sysimage/libdnf5/nevras.toml
Summary: Low disk space causes self-inflicted "soft deadlock" on malformed /usr/lib/sy...
Keywords:
Status: CLOSED DUPLICATE of bug 2330306
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf5
Version: rawhide
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: rpm-software-management
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-05-30 21:37 UTC by Jan Pokorný
Modified: 2025-06-02 15:04 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-06-02 15:04:25 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jan Pokorný 2025-05-30 21:37:41 UTC
Happened to me on live distro:

```console
# dnf --setopt=cachedir=/tmp/dnfcache remove somepackage
Loading system state TOML file /usr/lib/sysimage/libdnf5/nevras.toml failed (see dnf5-system-state(7)): [error] bad format: unknown value appeared
 --> /usr/lib/sysimage/libdnf5/nevras.toml
      |
 1669 | ... -3.fc41.x86_64" = {from_repo =
      |                                   ^-- here
[error] toml::parse_inline_table: missing closing bracket `}`
 --> /usr/lib/sysimage/libdnf5/nevras.toml
      |
 1669 | ... -3.fc41.x86_64" = {from_repo =
      |                                   ^-- expected `}`, reached line end
```

Apparently, it is vital for that file to always be in consistent
state, written in full or not at all/former version retained.

This situation is also likely not solvable by the means of dnf
proper such as with a subcommand to reconcile the state, or even
with some automatic resolution (consult RPM DB?).

Reproducible: Always




Additional Information:
```console
# rpm -qf /usr/lib/sysimage/libdnf5/nevras.toml
dnf5-5.2.11.0-1.fc43.x86_64
```

Comment 1 Jan Pokorný 2025-05-30 21:41:48 UTC
Could `renameat2(,,,,RENAME_EXCHANGE)` possibly help?

Comment 2 Petr Pisar 2025-06-02 15:04:25 UTC

*** This bug has been marked as a duplicate of bug 2330306 ***


Note You need to log in before you can comment on or make changes to this bug.