Description of problem: same bug 1596540: dnf doesn't work for some missing table: # Traceback (most recent call last): File "/usr/lib/python3.7/site-packages/dnf/cli/main.py", line 64, in main return _main(base, args, cli_class, option_parser_class) File "/usr/lib/python3.7/site-packages/dnf/cli/main.py", line 99, in _main return cli_run(cli, base) File "/usr/lib/python3.7/site-packages/dnf/cli/main.py", line 115, in cli_run cli.run() File "/usr/lib/python3.7/site-packages/dnf/cli/cli.py", line 1100, in run return self.command.run() File "/usr/lib/python3.7/site-packages/dnf/cli/commands/__init__.py", line 219, in run self.opts.packages) File "/usr/lib/python3.7/site-packages/dnf/cli/cli.py", line 477, in output_packages '=' : clir, 'not in' : clie}) File "/usr/lib/python3.7/site-packages/dnf/cli/output.py", line 633, in listPkgs print(self.infoOutput(pkg, highlight=highlight) + "\n") File "/usr/lib/python3.7/site-packages/dnf/cli/output.py", line 504, in infoOutput history_repo = self.history.repo(pkg) File "/usr/lib/python3.7/site-packages/dnf/db/history.py", line 368, in repo return self.swdb.getRPMRepo(str(pkg)) File "/usr/lib/python3.7/site-packages/dnf/db/history.py", line 291, in swdb self._swdb = libdnf.transaction.Swdb(self.dbpath) File "/usr/lib64/python3.7/site-packages/libdnf/transaction.py", line 729, in __init__ this = _transaction.new_Swdb(*args) RuntimeError: Failed to open backup database: /var/lib/dnf/history/history-2016-11-15.sqlite-journal During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/bin/dnf", line 58, in <module> main.user_main(sys.argv[1:], exit_code=True) File "/usr/lib/python3.7/site-packages/dnf/cli/main.py", line 179, in user_main errcode = main(args) File "/usr/lib/python3.7/site-packages/dnf/cli/main.py", line 64, in main return _main(base, args, cli_class, option_parser_class) File "/usr/lib/python3.7/site-packages/dnf/base.py", line 121, in __exit__ self.close() File "/usr/lib/python3.7/site-packages/dnf/base.py", line 472, in close self._finalize_base() File "/usr/lib/python3.7/site-packages/dnf/base.py", line 455, in _finalize_base self.history.close() File "/usr/lib/python3.7/site-packages/dnf/db/history.py", line 305, in close self.swdb.closeTransaction() File "/usr/lib/python3.7/site-packages/dnf/db/history.py", line 291, in swdb self._swdb = libdnf.transaction.Swdb(self.dbpath) File "/usr/lib64/python3.7/site-packages/libdnf/transaction.py", line 729, in __init__ this = _transaction.new_Swdb(*args) RuntimeError: Failed to open backup database: /var/lib/dnf/history/history-2016-11-15.sqlite-journal Version-Release number of selected component: dnf-4.0.9-1.fc29 Additional info: reporter: libreport-2.9.6 cmdline: /usr/bin/python3 /usr/bin/dnf info dnf crash_function: __init__ exception_type: RuntimeError executable: /usr/bin/dnf interpreter: python3-3.7.1-4.fc29.x86_64 kernel: 4.19.6-300.fc29.x86_64 runlevel: N 5 type: Python3 uid: 1000 Truncated backtrace: transaction.py:729:__init__:RuntimeError: Failed to open backup database: /var/lib/dnf/history/history-2016-11-15.sqlite-journal Traceback (most recent call last): File "/usr/lib/python3.7/site-packages/dnf/cli/main.py", line 64, in main return _main(base, args, cli_class, option_parser_class) File "/usr/lib/python3.7/site-packages/dnf/cli/main.py", line 99, in _main return cli_run(cli, base) File "/usr/lib/python3.7/site-packages/dnf/cli/main.py", line 115, in cli_run cli.run() File "/usr/lib/python3.7/site-packages/dnf/cli/cli.py", line 1100, in run return self.command.run() File "/usr/lib/python3.7/site-packages/dnf/cli/commands/__init__.py", line 219, in run self.opts.packages) File "/usr/lib/python3.7/site-packages/dnf/cli/cli.py", line 477, in output_packages '=' : clir, 'not in' : clie}) File "/usr/lib/python3.7/site-packages/dnf/cli/output.py", line 633, in listPkgs print(self.infoOutput(pkg, highlight=highlight) + "\n") File "/usr/lib/python3.7/site-packages/dnf/cli/output.py", line 504, in infoOutput history_repo = self.history.repo(pkg) File "/usr/lib/python3.7/site-packages/dnf/db/history.py", line 368, in repo return self.swdb.getRPMRepo(str(pkg)) File "/usr/lib/python3.7/site-packages/dnf/db/history.py", line 291, in swdb self._swdb = libdnf.transaction.Swdb(self.dbpath) File "/usr/lib64/python3.7/site-packages/libdnf/transaction.py", line 729, in __init__ this = _transaction.new_Swdb(*args) RuntimeError: Failed to open backup database: /var/lib/dnf/history/history-2016-11-15.sqlite-journal During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/bin/dnf", line 58, in <module> main.user_main(sys.argv[1:], exit_code=True) File "/usr/lib/python3.7/site-packages/dnf/cli/main.py", line 179, in user_main errcode = main(args) File "/usr/lib/python3.7/site-packages/dnf/cli/main.py", line 64, in main return _main(base, args, cli_class, option_parser_class) File "/usr/lib/python3.7/site-packages/dnf/base.py", line 121, in __exit__ self.close() File "/usr/lib/python3.7/site-packages/dnf/base.py", line 472, in close self._finalize_base() File "/usr/lib/python3.7/site-packages/dnf/base.py", line 455, in _finalize_base self.history.close() File "/usr/lib/python3.7/site-packages/dnf/db/history.py", line 305, in close self.swdb.closeTransaction() File "/usr/lib/python3.7/site-packages/dnf/db/history.py", line 291, in swdb self._swdb = libdnf.transaction.Swdb(self.dbpath) File "/usr/lib64/python3.7/site-packages/libdnf/transaction.py", line 729, in __init__ this = _transaction.new_Swdb(*args) RuntimeError: Failed to open backup database: /var/lib/dnf/history/history-2016-11-15.sqlite-journal Local variables in innermost frame: self: <libdnf.transaction.Swdb; > args: ('/var/lib/dnf/history.sqlite',)
Created attachment 1513280 [details] File: _var_log_dnf.log
Created attachment 1513281 [details] File: backtrace
Created attachment 1513282 [details] File: cgroup
Created attachment 1513283 [details] File: cpuinfo
Created attachment 1513284 [details] File: dnf-makecache.log
Created attachment 1513285 [details] File: environ
Created attachment 1513286 [details] File: mountinfo
Created attachment 1513287 [details] File: namespaces
Created attachment 1513288 [details] File: open_fds
I believe following PR fixes the problem: https://github.com/rpm-software-management/libdnf/pull/695 The root cause was that the file names were matched incorrectly and journal file was passed instead of database.
FEDORA-2019-d4b6ede072 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-d4b6ede072
dnf-4.2.5-4.fc29, dnf-plugins-extras-4.0.4-2.fc29, libdnf-0.31.0-6.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-d4b6ede072
dnf-4.2.5-4.fc29, dnf-plugins-extras-4.0.4-2.fc29, libdnf-0.31.0-6.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.