Bug 1669824
Summary: | “database disk image is malformed” | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Martin Ueding <mu> |
Component: | dnf | Assignee: | rpm-software-management |
Status: | CLOSED EOL | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | high | ||
Version: | 30 | CC: | jmracek, jrohel, lbalhar, mblaha, mhatina, mu, packaging-team-maint, pb, pkratoch, rh, rpm-software-management, shihping.chan, vmukhame, zeluis0712 |
Target Milestone: | --- | Keywords: | Triaged |
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2020-05-26 18:19:03 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Martin Ueding
2019-01-27 11:14:49 UTC
I don't think it's selinux related (restorecon). It's more likely a corrupted sqlite database and you fixed it by dump & restore. Running out of space in / looks like the root cause. System can get into an undefined state pretty easily. If yous still have it, could you attach the broken /var/lib/dnf/history.sqlite file to this bug? If it's too big or if you don't want to attach it to a public bugzilla, you can either email me (dmach) the file or link to it. I have just re-checked that this is the broken version of the `history.sqlite` file and uploaded it here: https://uni-bonn.sciebo.de/s/2IyonVck9y2leGp The link should be good until 2019-12-31. I ran: PRAGMA integrity_check; row 50351 missing from index rpm_name row 52357 missing from index rpm_name row 52739 missing from index rpm_name row 56528 missing from index rpm_name row 61235 missing from index rpm_name row 67482 missing from index rpm_name To fix that, I ran: REINDEX; This might help us to recover from this state. Still not sure what the root cause is. We need to read through https://www.sqlite.org/howtocorrupt.html and make sure we don't do any of those steps in libdnf or in combination with PackageKit. Data point: encountered the same issue with a different error message SQLite version 3.26.0 2018-12-01 12:34:55 Enter ".help" for usage hints. sqlite> PRAGMA integrity_check; *** in database main *** On tree page 2887 cell 223: invalid page number 21365001 Multiple uses for byte 2492 of page 2887 Error: database disk image is malformed sqlite> dumping and undumping fixed the issue I encountered the same issue and the reason was probably full filesystem on /. I solved it by dump/restore of /usr/lib/dnf/history.sqlite. Just hit this on f30, I've not knowingly filled up my / [dg@major ~]$ sudo dnf remove v8-devel terminate called after throwing an instance of 'SQLite3::LibException' what(): Step: database disk image is malformed in SELECT ti.action as action, ti.reason as reason FROM trans_item ti JOIN trans t ON ti.trans_id = t.id JOIN rpm i USING (item_id) WHERE t.state = 1 /* see comment in TransactionItem.hpp - TransactionItemAction */ AND ti.action not in (3, 5, 7, 10) AND i.name = 'grub2-pc-modules' AND i.arch = 'noarch' ORDER BY ti.trans_id DESC LIMIT 1 Aborted Hit me also on F30 during update of packages INSERT OR REPLACE INTO item_replaced_by VALUES (30730, 30729) Removed all files rm -rf /var/cache/dnf/* /var/lib/dnf/* /var/lib/yum/* and run again dnf update This solved the issue This message is a reminder that Fedora 30 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora 30 on 2020-05-26. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '30'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 30 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. Fedora 30 changed to end-of-life (EOL) status on 2020-05-26. Fedora 30 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed. @Ben I'm having the same issue right now in fedora 34, I run dnf update after installation and got this error, now every time I tried to install or run an update shows this error: Total 246 kB/s | 1.3 MB 00:05 Running transaction check error: SELECT DISTINCT key FROM 'Requirename' ORDER BY key: 11: database disk image is malformed ... Installing : newt-0.52.21-9.fc34.x86_64 2/5 error: INSERT INTO 'Requirename' VALUES(?, ?, ?): 11: database disk image is malformed error: INSERT INTO 'Requirename' VALUES(?, ?, ?): 11: database disk image is malformed error: INSERT INTO 'Requirename' VALUES(?, ?, ?): 11: database disk image is malformed error: INSERT INTO 'Requirename' VALUES(?, ?, ?): 11: database disk image is malformed ---------------------------- dnf log file shows: File "/usr/lib/python3.9/site-packages/dnf/cli/main.py", line 130, in cli_run ret = resolving(cli, base) File "/usr/lib/python3.9/site-packages/dnf/cli/main.py", line 176, in resolving base.do_transaction(display=displays) File "/usr/lib/python3.9/site-packages/dnf/cli/cli.py", line 264, in do_transaction raise dnf.exceptions.Error(_('Transaction failed')) dnf.exceptions.Error: Transaction failed 2021-06-07T09:48:31+0100 CRITICAL Error: Transaction failed José, the issue you have is a different one than this bug. It is most likely related to RPM database rather than anything in DNF. If you have more details than what you have reported or ideally a reproducer, could you file a new bug on RPM? |