Bug 1636886

Summary: [abrt] dnf: __init__(): transaction.py:729:__init__:RuntimeError: Exec failed: database is locked
Product: [Fedora] Fedora Reporter: Christian Stadelmann <fedora>
Component: dnfAssignee: Jaroslav Rohel <jrohel>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 29CC: 9jYqEjAGii7bauq6tAFv, aoellerer, dmach, faelp22, hsmolip, johannes, jones.peter.busi, jorti, kparal, mattison.computer, mblaha, mhatina, packaging-team-maint, redhat.com, rpm-software-management, tsozik, vmukhame
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/c865a12567b444e1e16ec26353dbc7e18355d685
Whiteboard: abrt_hash:8d4513a01b579bc5990714f12301069ba4b89103;VARIANT_ID=workstation;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-16 08:54:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: backtrace
none
File: cpuinfo
none
File: dnf-makecache.log
none
File: namespaces
none
File: _var_log_dnf.log none

Description Christian Stadelmann 2018-10-08 08:03:50 UTC
Description of problem:
I was running a third instance of dnf as user root and got this backtrace.

Version-Release number of selected component:
dnf-3.6.1-1.fc29

Additional info:
reporter:       libreport-2.9.5
cmdline:        /usr/bin/python3 /usr/bin/dnf debuginfo-install libical webkit2gtk3
crash_function: __init__
exception_type: RuntimeError
executable:     /usr/bin/dnf
interpreter:    python3-3.7.0-9.fc29.x86_64
kernel:         4.18.11-301.fc29.x86_64
runlevel:       N 5
type:           Python3

Truncated backtrace:
transaction.py:729:__init__:RuntimeError: Exec failed: database is locked

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/cli/main.py", line 99, in _main
    return cli_run(cli, base)
  File "/usr/lib/python3.7/site-packages/dnf/cli/main.py", line 123, in cli_run
    ret = resolving(cli, base)
  File "/usr/lib/python3.7/site-packages/dnf/cli/main.py", line 146, in resolving
    base.resolve(cli.demands.allow_erasing)
  File "/usr/lib/python3.7/site-packages/dnf/base.py", line 748, in resolve
    self._transaction = self._goal2transaction(goal)
  File "/usr/lib/python3.7/site-packages/dnf/base.py", line 645, in _goal2transaction
    ts.add_install(pkg, obs, reason)
  File "/usr/lib/python3.7/site-packages/dnf/db/group.py", line 256, in add_install
    ti_new = self.new(new, libdnf.transaction.TransactionItemAction_INSTALL, reason)
  File "/usr/lib/python3.7/site-packages/dnf/db/group.py", line 219, in new
    rpm_item = self._pkg_to_swdb_rpm_item(pkg)
  File "/usr/lib/python3.7/site-packages/dnf/db/group.py", line 210, in _pkg_to_swdb_rpm_item
    rpm_item = self.history.swdb.createRPMItem()
  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: Exec failed: database is locked

Local variables in innermost frame:
self: <libdnf.transaction.Swdb;  >
args: ('/var/lib/dnf/history.sqlite',)

Comment 1 Christian Stadelmann 2018-10-08 08:03:57 UTC
Created attachment 1491535 [details]
File: backtrace

Comment 2 Christian Stadelmann 2018-10-08 08:03:58 UTC
Created attachment 1491536 [details]
File: cpuinfo

Comment 3 Christian Stadelmann 2018-10-08 08:04:04 UTC
Created attachment 1491537 [details]
File: dnf-makecache.log

Comment 4 Christian Stadelmann 2018-10-08 08:04:06 UTC
Created attachment 1491538 [details]
File: namespaces

Comment 5 Christian Stadelmann 2018-10-08 08:06:52 UTC
Created attachment 1491539 [details]
File: _var_log_dnf.log

Comment 6 Daniel Mach 2018-10-08 11:42:04 UTC
AFAIK it's merged in upstream already.
SQLite connection switched to WAL journal and there's a busy wait timeout for obtaining a connection.

Comment 7 Kamil Páral 2018-10-16 08:54:02 UTC

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

Comment 8 aoellerer 2018-12-05 14:36:36 UTC
*** Bug 1656450 has been marked as a duplicate of this bug. ***

Comment 9 Peter H. Jones 2019-02-26 15:46:12 UTC
*** Bug 1683328 has been marked as a duplicate of this bug. ***

Comment 10 Dima Tsozik 2019-03-03 19:51:23 UTC
*** Bug 1684912 has been marked as a duplicate of this bug. ***

Comment 11 Johannes Rest 2019-03-13 12:53:16 UTC
*** Bug 1688280 has been marked as a duplicate of this bug. ***

Comment 12 aoellerer 2019-03-19 13:33:38 UTC
*** Bug 1690436 has been marked as a duplicate of this bug. ***

Comment 13 Isael 2019-03-21 13:38:44 UTC
*** Bug 1691364 has been marked as a duplicate of this bug. ***

Comment 14 9jYqEjAGii7bauq6tAFv 2019-03-26 22:50:53 UTC
*** Bug 1693010 has been marked as a duplicate of this bug. ***

Comment 15 redhat.com 2019-04-26 16:45:52 UTC
*** Bug 1703548 has been marked as a duplicate of this bug. ***

Comment 16 Bill 2019-05-16 20:17:17 UTC
*** Bug 1711058 has been marked as a duplicate of this bug. ***

Comment 17 humberto 2019-06-16 15:40:11 UTC
*** Bug 1720924 has been marked as a duplicate of this bug. ***