[Devel] Re: [PATCH] Memory shortage can result in inconsistent flocks state

Balbir Singh balbir at linux.vnet.ibm.com
Thu Sep 13 00:16:27 PDT 2007


On 9/13/07, Pavel Emelyanov <xemul at openvz.org> wrote:
> J. Bruce Fields wrote:
> > On Tue, Sep 11, 2007 at 04:38:13PM +0400, Pavel Emelyanov wrote:
> >> This is a known feature that such "re-locking" is not atomic,
> >> but in the racy case the file should stay locked (although by
> >> some other process), but in this case the file will be unlocked.
> >
> > That's a little subtle (I assume you've never seen this actually
> > happen?), but it makes sense to me.
>
> Well, this situation is hard to notice since usually programs
> try to finish up when some error is returned from the kernel,
> but I do believe that this could happen in one of the openvz
> kernels since we limit the kernel memory usage for "containers"
> and thus -ENOMEM is a common error.
>

The fault injection framework should be able to introduce the same
error. Of course hitting the error would require careful setup of the
fault parameters.

Balbir




More information about the Devel mailing list