database is locked (sqlite / yum issue not rpm issue)

On occasion an RPM db can get corrupt on RHEL based systems. Running rpm -vv –rebuilddb after backing up /var/lib/rpm is a quick fix to the problem.

I came across the following error during a yum update, on an openvz container


(process:7450): GLib-CRITICAL **: g_timer_stop: assertion `timer != NULL' failed

(process:7450): GLib-CRITICAL **: g_timer_destroy: assertion `timer !=

TypeError: Can not create db_info table: database is locked

Now my immediate thought was rpm db, but that was not the case. This was from a sqlite file in /var/cache/yum.

Cleaning the headers / all in yum did not help, in this case I had to restart the openvz container to release the lock on the database.

Leave a Reply

Your email address will not be published. Required fields are marked *