Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

terminate called after throwing an instance of 'std::out_of_range' #1550

Closed
manisandro opened this issue Jun 14, 2024 · 1 comment · Fixed by #1623
Closed

terminate called after throwing an instance of 'std::out_of_range' #1550

manisandro opened this issue Jun 14, 2024 · 1 comment · Fixed by #1623
Assignees
Labels
bug Originally reported in Jira or Bugzilla Priority: HIGH Triaged Someone on the DNF 5 team has read the issue and determined the next steps to take

Comments

@manisandro
Copy link

As initially filed at https://bugzilla.redhat.com/show_bug.cgi?id=2282104:

I ran dnf update, and ran out of space while the scriptlets where running

$ sudo dnf update
[...]
>>> Stop trigger-post-uninstall scriptlet: man-db-0:2.12.1-1.fc41.x86_64SQL statement execution failed: "ROLLBACK": (1) - SQL logic error

Any subsequent dnf update now fails with:

$ sudo dnf update
terminate called after throwing an instance of 'std::out_of_range'
  what():  [error] key "reason" not found
 --> /usr/lib/sysimage/libdnf5/packages.toml
      |
 9464 | [packages."zeromq.x86_64"]
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~ in this table
Aborted

Reproducible: Always

dnf5-5.2.1.0-1.fc41.x86_64

The out_of_range exception persists with
dnf5-5.2.3.0-3.fc41.x86_64

@ppisar ppisar added Priority: HIGH bug Originally reported in Jira or Bugzilla Triaged Someone on the DNF 5 team has read the issue and determined the next steps to take labels Jun 17, 2024
@m-blaha m-blaha self-assigned this Aug 2, 2024
@m-blaha
Copy link
Member

m-blaha commented Aug 5, 2024

The problem is that TOML files in /usr/lib/sysimage/libdnf5/*.toml (or at least some of them) are not parsable. Most likely their content is incomplete due to running out of the disk space. The immediate help to make dnf5 working again would be removing (or backuping) them.

The real solution needs to be on several layers:

  1. do not terminate in such situation, print an error message instead (this will be fixed in this ticket)
  2. we can try to make system state writing more robust (e.g. write the toml files to temporary location first and then move them to the final one to prevent ending up with partial files) - new issue Make system state *.toml files writing more robust #1609
  3. we need a recover mechanism - something like dnf5 system-state regenerate command which would regenerate as much of system state as possible from rpmdb and dnf5 transaction history database - new issue Prepare mechanism to regenerate the system state *.toml files #1610

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Originally reported in Jira or Bugzilla Priority: HIGH Triaged Someone on the DNF 5 team has read the issue and determined the next steps to take
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants