Bug 1071853 - [abrt] yum: sqlutils.py:166:executeSQLQmark:OperationalError: database is locked
Summary: [abrt] yum: sqlutils.py:166:executeSQLQmark:OperationalError: database is locked
Alias: None
Product: Fedora
Classification: Fedora
Component: yum
Version: 20
Hardware: x86_64
OS: Unspecified
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
Whiteboard: abrt_hash:bb0c5704ce00d0499f6aeb8c857...
Depends On:
TreeView+ depends on / blocked
Reported: 2014-03-03 10:19 UTC by Moez Roy
Modified: 2015-06-29 19:13 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2015-06-29 19:13:22 UTC
Type: ---

Attachments (Terms of Use)
File: backtrace (1.46 KB, text/plain)
2014-03-03 10:19 UTC, Moez Roy
no flags Details
File: environ (2.02 KB, text/plain)
2014-03-03 10:19 UTC, Moez Roy
no flags Details

Description Moez Roy 2014-03-03 10:19:16 UTC
Version-Release number of selected component:

Additional info:
reporter:       libreport-2.1.12
cmdline:        /usr/bin/python /bin/yum install yumex
executable:     /bin/yum
kernel:         3.13.5-200.fc20.x86_64
runlevel:       N 5
type:           Python
uid:            0

Truncated backtrace:
sqlutils.py:166:executeSQLQmark:OperationalError: database is locked

Traceback (most recent call last):
  File "/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 355, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 261, in main
    return_code = base.doTransaction()
  File "/usr/share/yum-cli/cli.py", line 772, in doTransaction
    resultobject = self.runTransaction(cb=cb)
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1765, in runTransaction
    lastdbv = self.history.last()
  File "/usr/lib/python2.7/site-packages/yum/history.py", line 1265, in last
    ret = self.old([], 1, complete_transactions_only)
  File "/usr/lib/python2.7/site-packages/yum/history.py", line 1214, in old
    executeSQL(cur, sql, params)
  File "/usr/lib/python2.7/site-packages/yum/sqlutils.py", line 166, in executeSQLQmark
    return cursor.execute(query)
OperationalError: database is locked

Local variables in innermost frame:
cursor: <sqlite3.Cursor object at 0x466f650>
query: 'SELECT tid,\n                         trans_beg.timestamp AS beg_ts,\n                         trans_beg.rpmdb_version AS beg_rv,\n                         trans_end.timestamp AS end_ts,\n                         trans_end.rpmdb_version AS end_rv,\n                         loginuid, return_code\n                  FROM trans_beg JOIN trans_end USING(tid) ORDER BY tid DESC LIMIT 1'
params: None

Potential duplicate: bug 756406

Comment 1 Moez Roy 2014-03-03 10:19:19 UTC
Created attachment 869874 [details]
File: backtrace

Comment 2 Moez Roy 2014-03-03 10:19:21 UTC
Created attachment 869875 [details]
File: environ

Comment 3 jeff 2014-11-10 22:37:16 UTC
A temporary workaround for this problem is to rename /var/lib/yum/history folder.

Comment 4 jeff 2014-11-17 20:40:02 UTC
Ignore the previous comment about renaming the /var/lib/yum/history folder.  That would be a last resort - it will mean that you lose all that history.

Rather, find out what process is locking the history files:

$ sudo fuser /var/lib/yum/history/history*
/var/lib/yum/history/history-2014-10-15.sqlite:  [some pid ####]
/var/lib/yum/history/history-2014-10-15.sqlite-journal:  [some pid ####]

$ ps aux | grep [some pid ####]

This will list the process with lock.  At this point you need to decide how to remove the lock - if the process is a service you can try stopping and restarting the service.

Comment 5 Fedora End Of Life 2015-05-29 11:07:45 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. 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 '20'.

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 20 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.

Comment 6 Fedora End Of Life 2015-06-29 19:13:22 UTC
Fedora 20 changed to end-of-life (EOL) status on 2015-06-23. Fedora 20 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

Thank you for reporting this bug and we are sorry it could not be fixed.

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