[Unionfs] corruption of rpm database with unionfs (and ldconfig)
Olivier Blin
blino at mandriva.com
Mon Feb 25 12:38:13 EST 2008
Hello,
We have a weird rpm database corruption in Mandriva live systems with
current unionfs (2.2.4).
Databases files from /var/lib/rpm get corrupted with no obvious
reason after running ldconfig (at first look, it does not look
related to the ldconfig thread on this ML).
It happens on an union of squashfs + tmpfs, after running ldconfig,
which appears to modify /var/lib/rpm/__db* files, while strace shows
it does not access them:
# LC_ALL=C ./test-unionfs-rpm.sh
basesystem-2008.0-6mdv2008.1
c834f8beec722b0f89b081b782835404 /var/lib/rpm/__db.001
4c8cf181f1bb94522f458b2985394326 /var/lib/rpm/__db.002
Running ldconfig
ce338fe6899778aacfc28414f2d9498b /var/lib/rpm/__db.001
a2634d09174bc01360c1ee22bb9321c3 /var/lib/rpm/__db.002
rpmdb: Program version 4.3 doesn't match environment version
error: db4 error(-30974) from dbenv->open: DB_VERSION_MISMATCH: Database environment version mismatch
error: cannot open Packages index using db3 - (-30974)
error: cannot open Packages database in /var/lib/rpm
package basesystem is not installed
Notice the modified md5sums in this log, the second md5sums being
displayed right after running this command:
strace -efile ldconfig 2>&1 | grep __db
The bug can not be reproduced without using unionfs, and it
did not appear with unionfs 1.4 either.
The attached script allows to reproduce pretty easily the bug with an
existing Mandriva image, by mounting the union and running a few
commands to reproduce the problem (it does not require to boot from
the live system).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-unionfs-rpm.sh
Type: application/x-sh
Size: 1141 bytes
Desc: script to reproduce rpm bug with unionfs
Url : http://www.fsl.cs.sunysb.edu/pipermail/unionfs/attachments/20080225/3ac2941b/test-unionfs-rpm.sh
-------------- next part --------------
Here is mandriva-linux-2008-spring-beta2-one-KDE-int-cdrom-i586.iso:
http://distrib-coffee.ipsl.jussieu.fr/pub/linux/MandrivaLinux/devel/iso/2008.1/beta2/
(sorry, it's about 700M, I don't have a smaller test image ready)
Maybe you can find a faster mirror from this mirror list:
http://mandriva.com/en/download/free
For the record, our Mandriva bug report can be found here:
http://qa.mandriva.com/show_bug.cgi?id=38011
To be fair, it could be a more general issue in the kernel.
We also have rpm database corruption when using ext3 filesystems with
1k block size: https://qa.mandriva.com/show_bug.cgi?id=32547
Regards
--
Olivier Blin (blino) - Mandriva
More information about the unionfs
mailing list