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

Re: LMDB killed process and LOCK_MUTEX_W()



Dimitrios Apostolou wrote:
Hi Howard,

On Wed, 16 Jul 2014, Dimitrios Apostolou wrote:

On Wed, 16 Jul 2014, Howard Chu wrote:

Dimitrios Apostolou wrote:

What would you suggest for such a situation? I'm thinking of patching LMDB
to lock with mutex_timedwait() and periodically check if the PID having
taken the mutex is still alive. Is the writer PID stored somewhere, or a
change of format will be needed? Any other ideas are welcome!

We have a patch to use robust mutexes. They're a few percent slower but
will allow recovery from this situation.

Great! Is the patch public so that I can see if it fixes the situation?

By using Google I could find a patch from 2012 from Hallvard Furuseth at
http://folk.uio.no/hbf/OpenLDAP/its7165.diff is that the one you are
talking about?

Not quite, that's a much older patch and it primarily contains code to break threading.

In addition, is the PID of the lock-acquirer stored somewhere in shared
map? There are lots of PIDs and TIDs in there and I'm having trouble in
deciphering the code, so I'd appreciate if you pointed to the struct
member.


Thanks!
Dimitris




--
  -- Howard Chu
  CTO, Symas Corp.           http://www.symas.com
  Director, Highland Sun     http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/