Bug 623887

Summary: Can not create db_info table: database is locked
Product: Red Hat Enterprise Linux 6 Reporter: gregrwm <rhbugzi>
Component: yumAssignee: James Antill <james.antill>
Status: CLOSED NOTABUG QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: medium Docs Contact:
Priority: low    
Version: 6.1Keywords: RHELNAK
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-09-20 20:14:56 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:

Description gregrwm 2010-08-13 04:27:33 UTC
Description of problem:  yum fails.


Version-Release number of selected component (if applicable):  yum-3.2.27-12.el6.noarch


Steps to Reproduce:
1.  rhn_register
2.  remove "enabled=0" from rhel-beta
3.  yum install screen kernel.x86_64 twm


Actual results:
Loaded plugins: rhnplugin

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

(process:2727): GLib-CRITICAL **: g_timer_destroy: assertion `timer != NULL' failed
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 254, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 109, in main
    result, resultmsgs = base.doCommands()
  File "/usr/share/yum-cli/cli.py", line 353, in doCommands
    self._getTs(needTsRemove)
  File "/usr/lib/python2.6/site-packages/yum/depsolve.py", line 99, in _getTs
    self._getTsInfo(remove_only)
  File "/usr/lib/python2.6/site-packages/yum/depsolve.py", line 110, in _getTsInfo
    pkgSack = self.pkgSack
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 774, in <lambda>
    pkgSack = property(fget=lambda self: self._getSacks(),
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 564, in _getSacks
    self.repos.populateSack(which=repos)
  File "/usr/lib/python2.6/site-packages/yum/repos.py", line 279, in populateSack
    sack.populate(repo, mdtype, callback, cacheonly)
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 187, in populate
    dobj = repo_cache_function(xml, csum)
  File "/usr/lib64/python2.6/site-packages/sqlitecachec.py", line 46, in getPrimary
    self.repoid))
TypeError: Can not create db_info table: database is locked


Expected results:  install packages

Comment 2 RHEL Program Management 2010-08-13 04:57:49 UTC
This issue has been proposed when we are only considering blocker
issues in the current Red Hat Enterprise Linux release.

** If you would still like this issue considered for the current
release, ask your support representative to file as a blocker on
your behalf. Otherwise ask that it be considered for the next
Red Hat Enterprise Linux release. **

Comment 3 gregrwm 2010-08-13 06:35:06 UTC
apparently related to being on nfs.  if /var/cache/yum is local, it's fine.  via nfs, it creates primary.xml.gz.sqlite as zero length and barfs.  yes it has no-root-squash, and 10g of freespace.

Comment 4 seth vidal 2010-08-13 13:52:56 UTC
If you have yum cache on nfs having locking problems then it is likely that your nfs lockdaemon is not working.

Comment 5 gregrwm 2010-08-14 00:38:45 UTC
ok.  very likely we aren't running nfslockd.  is that a new requirement of yum, or is rhel6b2 defaulting to nfs4?  just curious how i got here.  does it need to run on the server or client or both?  is nfs4 relevant here?

Comment 6 gregrwm 2010-08-14 00:43:23 UTC
my rhel5 and rhel4 boxen are not having this trouble, using the same nfs server.

Comment 7 gregrwm 2010-08-14 00:54:54 UTC
i think (nfs)lockd is running on the server:
 USER      SESS TPGID  PGRP  PPID   PID  STARTED  NI WCHAN  STAT COMMAND
 root         1    -1     1     1  4400   Jul 17   0 ?      S      [nfsd]
 root         1    -1     1     1  4401   Jul 17   0 ?      S      [nfsd]
 root         1    -1     1     1  4402   Jul 17   0 ?      S      [nfsd]
 root         1    -1     1     1  4403   Jul 17   0 ?      S      [nfsd]
 root         1    -1     1     1  4404   Jul 17   0 ?      S      [nfsd]
 root         1    -1     1     1  4405   Jul 17   0 ?      S      [nfsd]
 root         1    -1     1     1  4406   Jul 17   0 ?      S      [nfsd]
 root         1    -1     1     1  4407   Jul 17   0 ?      S      [nfsd]
 root         1    -1     1     1  4408   Jul 17   0 ?      S      [lockd]
 root         1    -1     1     1  4409   Jul 17   0 rpciod S      [rpciod]
 rpc       4175    -1  4175     1  4175   Jul 17   0 -      Ss     portmap
 rpcuser   4184    -1  4184     1  4184   Jul 17   0 -      Ss     rpc.statd
 root      4258    -1  4258     1  4258   Jul 17   0 -      Ss     rpc.idmapd
 root      4335    -1  4335     1  4335   Jul 17   0 -      Ss     /usr/sbin/acpid
 root      4396    -1  4396     1  4396   Jul 17   0 -      Ss     rpc.rquotad
 root      4413    -1  4413     1  4413   Jul 17   0 -      Ss     rpc.mountd

Comment 8 seth vidal 2010-08-16 18:41:22 UTC
Then something is wrong with the locking on the client side.

Comment 9 James Antill 2010-08-16 21:32:38 UTC
You can use the "flock" command from linux-utils-ng to test using no yum code.

Comment 10 RHEL Program Management 2010-08-18 21:28:14 UTC
Thank you for your bug report. This issue was evaluated for inclusion
in the current release of Red Hat Enterprise Linux. Unfortunately, we
are unable to address this request in the current release. Because we
are in the final stage of Red Hat Enterprise Linux 6 development, only
significant, release-blocking issues involving serious regressions and
data corruption can be considered.

If you believe this issue meets the release blocking criteria as
defined and communicated to you by your Red Hat Support representative,
please ask your representative to file this issue as a blocker for the
current release. Otherwise, ask that it be evaluated for inclusion in
the next minor release of Red Hat Enterprise Linux.

Comment 11 James Antill 2010-09-20 20:14:56 UTC
 I'm going to close this ... as again, the only times I've seen this it's been a  problem yum can't deal with (locking doesn't work on NFS).
 If you have data (flock commands etc.) showing that locking does work, but yum/sqlite/whatever doesn't ... feel free to reopen (or create another bug).