[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: [LMDB] Lockups with robust mutexes and crashing processes



Marcos-David Dione/NCE/AMADEUS wrote on 24/11/2014 11:10:42:
>         Seen like that I'm not sure if there's a defined behaviour
> for that. I'll ask in the glibc and/or kernel MLs and I'll come

> back with the answer.

        and here's the answer:

> On 11/24/2014 03:34 PM, Marcos Dione wrote:
> >         We found a situation where a robust mutex cannot be recovered
> > from a stale lock and we're wondering if it's simply an undefined
> > situation or  a bug in the kernel. Attached you will find the sample
> > code, which is loosely based on a glibc's test case.The gist of it is as
> > follows:
> >
> > 1. we open a file.
> > 2. we mmap it and use that mem to store a robust mutex.
> > 3. we lock the mutex.
> > 4. we munmap the file.
> > 5. we close the file.
>
> Undefined behaviour.
>
> This results in undefined behaviour since the allocated storage for
> the mutex object has been lost. You need to keep that storage around
> for the robust algorithms to work with. Without any data you can't
> do anything.

        Full answer:

https://sourceware.org/ml/libc-help/2014-11/msg00035.html

--
Marcos Dione
Astek Sud-Est
R&D-SSP-DTA-TAE-TDS
for Amadeus SAS
T: +33 (4)4 9704 1727
marcos-david.dione@amadeus.com