Bug In Yum When Attempting To Update

General support questions including new installations
BobCochran
Posts: 18
Joined: 2006/09/23 22:30:35
Contact:

Bug In Yum When Attempting To Update

Post by BobCochran » 2009/01/18 15:01:44

Hi,

Is this a big in yum? Does anyone recognize the cause and know how to fix it? The problem for me started yesterday when I logged in and noticed the automatic package update process was complaining it can't check for packages and I should check my network connections. So I tried running 'yum update' manually. I'm running CentOS 5.2, x86_64 as a Vmware virtual machine.

Here is the output:

# yum update
Loading "fastestmirror" plugin
Loading mirror speeds from cached hostfile
* base: mirrors.serveraxis.net
* updates: yum.singlehop.com
* addons: mirrors.liquidweb.com
* extras: wuarchive.wustl.edu

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

(process:4048): GLib-CRITICAL **: g_timer_destroy: assertion `timer != NULL' failed
Traceback (most recent call last):
File "/usr/bin/yum", line 29, in ?
yummain.main(sys.argv[1:])
File "/usr/share/yum-cli/yummain.py", line 105, in main
result, resultmsgs = base.doCommands()
File "/usr/share/yum-cli/cli.py", line 289, in doCommands
self._getTs()
File "/usr/lib/python2.4/site-packages/yum/depsolve.py", line 85, in _getTs
self._getTsInfo()
File "/usr/lib/python2.4/site-packages/yum/depsolve.py", line 91, in _getTsInfo
self._tsInfo.setDatabases(self.rpmdb, self.pkgSack)
File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 537, in
pkgSack = property(fget=lambda self: self._getSacks(),
File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 392, in _getSacks
self.repos.populateSack(which=repos)
File "/usr/lib/python2.4/site-packages/yum/repos.py", line 242, in populateSack
sack.populate(repo, mdtype, callback, cacheonly)
File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 168, in populate
dobj = repo_cache_function(xml, csum)
File "/usr/lib64/python2.4/site-packages/sqlitecachec.py", line 42, in getPrimary
self.repoid))
TypeError: Can not create packages table: near "release": syntax error

My Yum version:

# rpm -q yum
yum-3.2.8-9.el5.centos.2.1

Help is much appreciated.

Thanks

Bob Cochran

User avatar
AlanBartlett
Forum Moderator
Posts: 9329
Joined: 2007/10/22 11:30:09
Location: ~/Earth/UK/England/Suffolk
Contact:

Re: Bug In Yum When Attempting To Update

Post by AlanBartlett » 2009/01/18 15:17:36

Please try [b]yum --enablerepo=\* --disablerepo=c5-media clean all[/b].

If the above command executes without error, then try a [b]yum --disablerepo=\* --enablerepo=base --enablerepo=updates update[/b] command.

If an error is obtained with the second command, please post the error message and also the output from [b]yum repolist all[/b].

BobCochran
Posts: 18
Joined: 2006/09/23 22:30:35
Contact:

Re: Bug In Yum When Attempting To Update

Post by BobCochran » 2009/01/19 00:26:57

Thanks for your help! Unfortunately the second command didn't work. As a note, I recently compiled sqlite version 3.6.10 (installed into /usr/local/sqlite-3.6.10), but I've been installing sqlite versions in CentOS for a long time without ill effect. Also, I've been working with a Perl MVC framework named Catalyst. I recently installed Catalyst-Runtime-5.7015 and a large number of Perl dependencies through the CPAN archive.

# yum --enablerepo=\* --disablerepo=c5-media clean all
Loading "fastestmirror" plugin
Loading mirror speeds from cached hostfile
* base: mirrors.liquidweb.com
* updates: yum.singlehop.com
* centosplus: mirror.trouble-free.net
* addons: centos.luhost.info
* extras: wuarchive.wustl.edu
Cleaning up Everything
Cleaning up list of fastest mirrors
# yum --disablerepo=\* --enablerepo=base --enablerepo=updates update
Loading "fastestmirror" plugin
Determining fastest mirrors
* base: centos.cs.wisc.edu
* updates: centos.omnispring.com
base 100% |=========================| 1.1 kB 00:00
primary.xml.gz 100% |=========================| 1.1 MB 00:03

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

(process:4120): GLib-CRITICAL **: g_timer_destroy: assertion `timer != NULL' failed
Traceback (most recent call last):
File "/usr/bin/yum", line 29, in ?
yummain.main(sys.argv[1:])
File "/usr/share/yum-cli/yummain.py", line 105, in main
result, resultmsgs = base.doCommands()
File "/usr/share/yum-cli/cli.py", line 289, in doCommands
self._getTs()
File "/usr/lib/python2.4/site-packages/yum/depsolve.py", line 85, in _getTs
self._getTsInfo()
File "/usr/lib/python2.4/site-packages/yum/depsolve.py", line 91, in _getTsInfo
self._tsInfo.setDatabases(self.rpmdb, self.pkgSack)
File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 537, in
pkgSack = property(fget=lambda self: self._getSacks(),
File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 392, in _getSacks
self.repos.populateSack(which=repos)
File "/usr/lib/python2.4/site-packages/yum/repos.py", line 242, in populateSack
sack.populate(repo, mdtype, callback, cacheonly)
File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 168, in populate
dobj = repo_cache_function(xml, csum)
File "/usr/lib64/python2.4/site-packages/sqlitecachec.py", line 42, in getPrimary
self.repoid))
TypeError: Can not create packages table: near "release": syntax error

Any suggestions?

Bob Cochran

User avatar
AlanBartlett
Forum Moderator
Posts: 9329
Joined: 2007/10/22 11:30:09
Location: ~/Earth/UK/England/Suffolk
Contact:

Re: Bug In Yum When Attempting To Update

Post by AlanBartlett » 2009/01/19 14:57:06

[quote]I recently installed [i][/i] a large number of Perl dependencies through the CPAN archive.[/quote]
Ouch!

I'm sorry to say this but I suspect that your use of [i]CPAN[/i] has brought on this problem. The only advice I can offer is to suggest that you revert those additions and re-install the [i]CentOS[/i] perl packages from your installation medium . . .

I wonder if [b]toracat[/b] has a bright idea?

Evolution
Posts: 229
Joined: 2005/02/22 16:10:54
Location: Houston Texas
Contact:

Re: Bug In Yum When Attempting To Update

Post by Evolution » 2009/01/19 15:46:06

This one is pretty clearly an sqlite issue. It's almost certainly due to having a newer version of sqlite interacting with the query structure or other bits.

The notable entries in the error which show this are here ->
TypeError: Can not create packages table: near "release": syntax error

Mostly that says that it can't create a table for the packages, and that the query syntax is wrong.
I'd guess that you've gotten away with doing this for a while now, but you were finally bitten by a change in sqlite.

It's not a bug in yum so much as it's a query structure conflict between two versions. The only way out of this I see for you is to nuke yum's cache, and remove the sqlite install that you built into /usr/local from your path. You can still use it, just call it directly when you need to. You'll have to maintain your install and the distro specific install.

User avatar
AlanBartlett
Forum Moderator
Posts: 9329
Joined: 2007/10/22 11:30:09
Location: ~/Earth/UK/England/Suffolk
Contact:

Re: Bug In Yum When Attempting To Update

Post by AlanBartlett » 2009/01/19 16:23:10

Thanks for those words of wisdom and spotting the bit I missed [b]Jim[/b].

[ot]Did you get a new broom at Christmas? :-P [/ot]

User avatar
toracat
Forum Moderator
Posts: 7462
Joined: 2006/09/03 16:37:24
Location: California, US
Contact:

Re: Bug In Yum When Attempting To Update

Post by toracat » 2009/01/19 16:42:04

[quote]
AlanJBartlett wrote:

[ot]Did you get a new broom at Christmas? :-P [/ot][/quote]
Yes, I sent him a bunch. CentOS floors should stay clean for a while. :-D

User avatar
AlanBartlett
Forum Moderator
Posts: 9329
Joined: 2007/10/22 11:30:09
Location: ~/Earth/UK/England/Suffolk
Contact:

Re: Bug In Yum When Attempting To Update

Post by AlanBartlett » 2009/01/19 18:14:34

[quote]
toracat wrote:
[quote]
AlanJBartlett wrote:

[ot]Did you get a new broom at Christmas? :-P [/ot][/quote]
Yes, I sent him a bunch. CentOS floors should stay clean for a while. :-D[/quote]
[b][i]:roll: Egad![/i][/b]

Evolution
Posts: 229
Joined: 2005/02/22 16:10:54
Location: Houston Texas
Contact:

Re: Bug In Yum When Attempting To Update

Post by Evolution » 2009/01/19 19:45:39

[quote]
AlanJBartlett wrote:
Thanks for those words of wisdom and spotting the bit I missed [b]Jim[/b].

[ot]Did you get a new broom at Christmas? :-P [/ot][/quote]

I'm all stocked up on brooms now. I've moved on to mops

I <3 mop!

BobCochran
Posts: 18
Joined: 2006/09/23 22:30:35
Contact:

Re: Bug In Yum When Attempting To Update

Post by BobCochran » 2009/01/20 01:55:50

[quote]
Evolution wrote:
This one is pretty clearly an sqlite issue. It's almost certainly due to having a newer version of sqlite interacting with the query structure or other bits.

The notable entries in the error which show this are here ->
TypeError: Can not create packages table: near "release": syntax error

Mostly that says that it can't create a table for the packages, and that the query syntax is wrong.
I'd guess that you've gotten away with doing this for a while now, but you were finally bitten by a change in sqlite.

It's not a bug in yum so much as it's a query structure conflict between two versions. The only way out of this I see for you is to nuke yum's cache, and remove the sqlite install that you built into /usr/local from your path. You can still use it, just call it directly when you need to. You'll have to maintain your install and the distro specific install.[/quote]

I'm not totally sure of what is happening but there seems to be a difference between sqlite-3.6.7 (installed on January 9) and sqlite-3.6.10 (installed on January 15) which is causing the problem. My habit is to install them to /usr/local/sqlite-x.x.xx where x is the version number, then edit /etc/ld.so.conf to point to the latest module. The version of sqlite installed by CentOS is 3.3.6 but I guess that even though /usr/local/sqlite-3.6.10 is not on the system's path, that code must be getting executed if I have ld.so.conf pointing to it?

In any case, changing ld.so.conf to point to /usr/local/sqlite-3.6.7 and then running `ldconfig` and then running `yum update` will allow yum to complete normally. Changing it back to /usr/local/sqlite-3.6.10 causes yum to break with the error I've been citing. See the output I'm getting below:

ls -al /usr/local
total 132
drwxr-xr-x 21 root root 4096 Jan 15 20:09 .
drwxr-xr-x 16 root root 4096 Feb 23 2008 ..
drwxr-xr-x 2 root root 4096 Mar 29 2007 bin
drwxr-xr-x 2 root root 4096 Mar 29 2007 etc
drwxr-xr-x 2 root root 4096 Mar 29 2007 games
drwxr-xr-x 2 root root 4096 Mar 29 2007 include
drwxr-xr-x 2 root root 4096 Mar 29 2007 lib
drwxr-xr-x 2 root root 4096 Mar 29 2007 lib64
drwxr-xr-x 2 root root 4096 Mar 29 2007 libexec
drwxr-xr-x 2 root root 4096 Mar 29 2007 sbin
drwxr-xr-x 4 root root 4096 Jul 22 2007 share
drwxr-xr-x 5 root root 4096 Jul 23 2007 sqlite-3.4.1
drwxr-xr-x 5 root root 4096 Nov 30 2007 sqlite-3.5.3
drwxr-xr-x 5 root root 4096 Dec 15 2007 sqlite-3.5.4
drwxr-xr-x 5 root root 4096 Feb 8 2008 sqlite-3.5.6
drwxr-xr-x 5 root root 4096 Apr 3 2008 sqlite-3.5.7
drwxr-xr-x 5 root root 4096 Apr 16 2008 sqlite-3.5.8
drwxr-xr-x 5 root root 4096 Jan 15 20:09 sqlite-3.6.10
drwxr-xr-x 5 root root 4096 Jan 9 19:45 sqlite-3.6.7
drwxr-xr-x 2 root root 4096 Mar 29 2007 src
drwxr-xr-x 6 root root 4096 Jan 10 2008 tt2
su -
Password:
]# gedit /etc/ld.so.conf

[Editorial note: change /etc/ld.so.conf to point to /usr/local/sqlite-3.6.7 here]

# ldconfig

[Editorial note: show SQLite version installed by CentOS]

# sqlite3
SQLite version 3.3.6
Enter ".help" for instructions
sqlite> .quit
# rpm -q sqlite
sqlite-3.3.6-2
sqlite-3.3.6-2

[Editorial note: try a yum update now]

# yum update
Loading "fastestmirror" plugin
Loading mirror speeds from cached hostfile
* base: mirror.skiplink.com
* updates: centos.omnispring.com
* addons: mirrors.unbornmedia.com
* extras: mirror.skiplink.com
base : ################################################## 3223/3223
updates 100% |=========================| 951 B 00:00
primary.xml.gz 100% |=========================| 427 kB 00:41
updates : ################################################## 944/944
addons 100% |=========================| 951 B 00:00
primary.xml.gz 100% |=========================| 157 B 00:00
extras 100% |=========================| 1.1 kB 00:00
primary.xml.gz 100% |=========================| 97 kB 00:00
extras : ################################################## 263/263
Setting up Update Process
No Packages marked for Update

Editorial note: change /etc/ld.so.conf to point to /usr/local/sqlite-3.6.10 here]

# gedit /etc/ld.so.conf
# ldconfig
# yum update
Loading "fastestmirror" plugin
Loading mirror speeds from cached hostfile
* base: centos.omnispring.com
* updates: centos.omnispring.com
* addons: mirrors.serveraxis.net
* extras: pubmirrors.reflected.net

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

(process:4434): GLib-CRITICAL **: g_timer_destroy: assertion `timer != NULL' failed
Traceback (most recent call last):
File "/usr/bin/yum", line 29, in ?
yummain.main(sys.argv[1:])
File "/usr/share/yum-cli/yummain.py", line 105, in main
result, resultmsgs = base.doCommands()
File "/usr/share/yum-cli/cli.py", line 289, in doCommands
self._getTs()
File "/usr/lib/python2.4/site-packages/yum/depsolve.py", line 85, in _getTs
self._getTsInfo()
File "/usr/lib/python2.4/site-packages/yum/depsolve.py", line 91, in _getTsInfo
self._tsInfo.setDatabases(self.rpmdb, self.pkgSack)
File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 537, in
pkgSack = property(fget=lambda self: self._getSacks(),
File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 392, in _getSacks
self.repos.populateSack(which=repos)
File "/usr/lib/python2.4/site-packages/yum/repos.py", line 242, in populateSack
sack.populate(repo, mdtype, callback, cacheonly)
File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 168, in populate
dobj = repo_cache_function(xml, csum)
File "/usr/lib64/python2.4/site-packages/sqlitecachec.py", line 42, in getPrimary
self.repoid))
TypeError: Can not create packages table: near "release": syntax error

Editorial note: change /etc/ld.so.conf to point to /usr/local/sqlite-3.6.7 again]

# gedit /etc/ld.so.conf
# ldconfig
# yum update
Loading "fastestmirror" plugin
Loading mirror speeds from cached hostfile
* base: centos.omnispring.com
* updates: centos.omnispring.com
* addons: mirrors.serveraxis.net
* extras: pubmirrors.reflected.net
base : ################################################## 3223/3223
Setting up Update Process
No Packages marked for Update
#

Please feel free to set me straight if my practices are not accepted methods here. I can always learn more. I'm also going to post this information to the sqlite-users mailing list to see what they say.

Thanks again, everyone, for all your help!

Post Reply

Return to “CentOS 5 - General Support”