[CentOS] Yum segmentation fault updating from 5.6 to 5.7

Thu Sep 15 16:36:10 UTC 2011
Alain Péan <alain.pean at lpp.polytechnique.fr>

Le 15/09/2011 18:16, sebastiano at datafaber.net a écrit :
> [root at picard ~]# ll /var/cache/yum/base
> total 1004K
> -rw-r--r-- 1 root root    0 Sep 15 19:12 cachecookie
> -rw-r--r-- 1 root root 1017 Sep 15 19:11 mirrorlist.txt
> drwxr-xr-x 2 root root 4.0K Jul 10 12:19 packages/
> -rw-r--r-- 1 root root 961K Sep  5 13:52 primary.xml.gz
> -rw-r--r-- 1 root root  20K Sep 15 19:12 primary.xml.gz.sqlite
> -rw-r--r-- 1 root root 1.2K Sep  5 13:52 repomd.xml
>
> The file /var/cache/yum/base/primary.xml.gz.sqlite is only 20KB,
> whereas in the "normal" case I'd expect it to be 6.5MB. Somehow, yum is
> failing to regenerate this file for the base repository, and is crashing
> with a segmentation fault when trying to read it. I don't know however
> how to make it generate a correct sqlite file.

It is interesting because I had previously this error :

# yum update
....
http://mirror.centos.org/centos/5/cr/x86_64/repodata/filelists.sqlite.bz2:
[Errno 14] HTTP Error 404: Not Found
Trying other mirror.
Error: failure: repodata/filelists.sqlite.bz2 from cr: [Errno 256] No
more mirrors to try.

See : http://lists.centos.org/pipermail/centos/2011-September/117615.html

And here is the answer from Karanbir Singh :

"unfortunately, you hit an issue that I did not think anyone would see (
but was aware of... ). The issue originates from the fact that the new
CR repo has no sqlite metadata store, its xml only. And your machine was
trying to get the sqlite files - hitting a valid 404, since those files
do not exist."


See the full answer on the thread. So I wonder if it is related... I had 
the CR repo configured, before trying to update. In my case, yum clean 
all worked, but I have indeed a bigger primary.xml.gz.sqlite :
# ls -lh
total 36M
....
-rw-r--r-- 1 root root 1,3M sep  6 00:28 primary.xml.gz
-rw-r--r-- 1 root root 8,9M sep 14 15:11 primary.xml.gz.sqlite
-rw-r--r-- 1 root root 1,2K sep  6 00:28 repomd.xml
...

Alain

-- 
==========================================================
Alain Péan - LPP/CNRS
Administrateur Système/Réseau
Laboratoire de Physique des Plasmas - UMR 7648
Observatoire de Saint-Maur
4, av de Neptune, Bat. A
94100 Saint-Maur des Fossés
Tel : 01-45-11-42-39 - Fax : 01-48-89-44-33
==========================================================