[paludis-user] Paludis, ext4, delayed allocation, zero file length

Rodolphe Rocca maitrechang at gmail.com
Sun Oct 4 16:25:14 UTC 2009


Ciaran McCreesh wrote:
> On Sun, 04 Oct 2009 17:25:48 +0200
> Rodolphe Rocca <maitrechang at gmail.com> wrote:
>>> No, it's unrelated. We don't fsync anything, at all.
>> I'm not not a filesystem expert but isn't it the problem ?
> 
> No. There's absolutely no need to call fsync in normal cases. The only
> time you call fsync is if you need to get some kind of synchronisation
> between two different processes.
> 
> Your problem is that you killed your system in the middle of doing
> something. That will cause breakage regardless of what an application
> does.

True. But there are different kinds of breakage.

I understand that in case of a machine crashing, a package gets
partially installed, as long as the package files content is either the
old one or the new one. This can potentially cause trouble, but has a
higher resilience than ending with some empty files in VDB causing
paludis to be unusable until a manual intervention in /var/cache/db.

Notice I'm not saying it's necessarily paludis' fault. Just opening a
discussion to hear about your thoughts and share my experience with
other potential users ;-)

For the record, a few days ago my /var was under reiserfs. I had several
machine crashes of the same kind while running paludis (and other
programs), but never ended with such empty files, and it never really
broke paludis in such an ugly way that a manual intervention was
required other than reinstalling the package or removing a temporary
directory.

I tried to turn the auto_da_alloc ext4 mount option on as it is supposed
to fix the "zero file length" issue for some file replacing patterns. A
few minutes later I got a new crash and empty files again. So I guess
the corruption is unrelated or paludis uses a rename pattern which is
not detected by ext4.

Now I'm at the point where I disabled ext4 delayed allocation
(nodelalloc mount option). Let's see what happens.



More information about the paludis-user mailing list