Replaced files truncated on upgrade on EXT4 filesystem, potentially leaving system inoperable
Binary package hint: aptitude
I am using the ext4 filesystem, and Jaunty Desktop Alpha.
If, while doing an "aptitude full-upgrade", the system freezes (I assume due to independent reasons), then aptitude (or dpkg?) leaves the system in an unusable state since all files it was busy replacing (in my case, for example, one of the files was libpng12.so.0.27.0, from an libpng update) are truncated. That is, the file from the package exists, but is zero length.
I assume this bug is caused by precisely this reason: https:/
for which Theodore Ts'o suggests what application programmers should be doing when *overwriting* important files here: https:/
What I expect to happen:
If and upgrade is interrupted, then I expect at least that complete copies of all system files will be preserved (who knows what version). Additionally, it would be great if aptitude (-f ?) could recover from this (after reboot), and sanely redo (or continue with) the upgrades.
What did happen:
Luckily, grub, the kernel, and bash, etc. were not touched, so I could boot. I recovered the system using aptitude to figure out and download new versions of the broken packages (about 10 packages), and then something like "dpkg -i --force-all foobar" to overwrite the truncated files.
# apt-cache policy aptitude
*** 0.4.11.11-1ubuntu1 0
DistroRelease: Ubuntu 9.04
Package: aptitude 0.4.11.11-1ubuntu1
Uname: Linux 2.6.28-9-generic i686