On Mon, Dec 26, 2016 at 01:06:48PM +0100, Yuri D'Elia wrote: > On Mon, Dec 26 2016, Oswald Buddenhagen wrote: > > even after looking at the code several more times, i plain can't see how > > this would be possible. it seems that *someting* is pre-allocating space > > in the file, but is getting interrupted before writing the actual data. > > alternatively, it's actually appending nulls for some bizarre reason. > > This looks like an initial open/creat, where a write was interrupted > with no flush. The nulls should either be a multiple size of stdbuf (if > libc regular IO is used) or the default block alloc of the underlying > fs (depending on where the write was interrupted).
In my case broken journal file has 33 bytes: "2", "\n" and 31 NULLs. But file allocation should be multiple of 512 bytes, and I suspect the defult libc buffer size is much higher than 31 and multiple of 2. > The nulls are there because the space was allocated, but nobody wrote > into it yet. This assumption is quite natural, but it conradicts at least two facts: 1. small data record sizes and 2. the model of file operation (unflushed data can appear in a file only on crash/reboot or severe kernel bug). > > ltrace and strace of the process could help for starters - if something > > fishy is done from user space, this should become immediately obvious. > > I had to stop logging at some point, as I couldn't reproduce it when > running under strace (probably due to the added latencies). No doubts, this bug is rare, so it's very hard to reproduce it. I've got damage when internet route to server was very slow and unstable (high %loss and frequent breaks). Probably bug is triggered on processing of network timeout condition. It may be some write() to wrong fd and/or with erroneous pointer to data. -- Eugene Berdnikov ------------------------------------------------------------------------------ Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today.http://sdm.link/intel _______________________________________________ isync-devel mailing list isync-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/isync-devel