[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

rpm-4.0.4: rpm -V md5sum failure, file corruption



Greetings,

I have a filesystem corruption problem which may or may not be related
to rpm.  Perhaps someone can help.

I have seen the same symptoms on kernel 2.2.20 and 2.2.23 (stock, from
kernel.org) on both ext2 and ext3 filesystems, both with and without
Andre Hedrick's IDE patches.

The symptoms are as follows:

case 1)

rpm -V <package> reports that a file fails an md5sum check:

bash# rpm -V adns
..5.....   /usr/lib/libadns.so.1.0

grab a copy of this file and run md5sum on it, to verify the broken-ness:

bash# cp /usr/lib/libadns.so.1.0 libadns.broken
bash# md5sum libadns.broken /usr/lib/libadns.so.1.0
f063a5fc902afee9e35e4a92289123ac  /usr/lib/libadns.so.1.0
f063a5fc902afee9e35e4a92289123ac  libadns.broken
bash# rpm -V adns
bash#

So, first there's a problem, then there isn't.

case 2)

As above, but the copied file *actually* shows a different md5sum.

bash# rpm -V adns
..5.....   /usr/lib/libadns.so.1.0
bash# cp /usr/lib/libadns.so.1.0 libadns.broken
bash# md5sum libadns.broken /usr/lib/libadns.so.1.0
f063a5fc902afee9e35e4a92289123ac  /usr/lib/libadns.so.1.0
28217c897d15b22181b903dca306d7fc  libadns.broken
bash# rpm -V adns
bash#

So it's broken, verified as broken, then okay.

Case 3)

Gets broken, stays broken:

bash# rpm -V adns
..5.....   /usr/lib/libadns.so.1.0
bash# cp /usr/lib/libadns.so.1.0 libadns.broken
bash# md5sum libadns.broken /usr/lib/libadns.so.1.0
28217c897d15b22181b903dca306d7fc  /usr/lib/libadns.so.1.0
28217c897d15b22181b903dca306d7fc  libadns.broken
bash# rpm -V adns
..5.....   /usr/lib/libadns.so.1.0
<Check md5sum on separate machine, and verify that it should be
something else>
bash#

In the case where the permanently corrupted file is a text file, say a
configuration file, opening the file with vi shows NULL bytes where they
shouldn't be.

So, I had thought that this was filesystem corruption independent of
rpm, perhaps related to the ext3 filesystem (0.0.7a from kernel.org), or
my media, but the symptoms appear on both ext2 and ext3, 2.2.20 and
2.2.23, on CompactFlash media and hard drives.

I wrote a script to run rpm -Va over and over, check for md5 failures,
and copy files if failures are seen.  I get a failure once or twice a
day, over several thousand iterations.  This happens on a large number
of machines all with the same software.  I've used the fstest program
from Samba(.org) to test the filesystem, and the filesystem appears to
work fine under 2.2.23 and ext2 (for over 24 hours of testing).

Is it possible that rpm-4.0.4 is corrupting files, or at least
incorrectly reporting md5sum failures?

Looking through strace shows rpm opening files read-only, but...

Any ideas?

Thanks,

Matt





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []