apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Florian Weimer ...@deneb.enyo.de>
Subject Re: Default Linux mutex method
Date Sun, 02 Apr 2017 18:48:52 GMT
* William A. Rowe, Jr.:

> Are modern pthread mutexes sufficiently reliable this decade?

glibc and the Linux kernel have bugs in this area, but the basic
functionality is there.

One problem could be that a switch might not be backwards-compatible
from an application point of view.  32-bit and 64-bit applications
would not be able to use the same mutex.

Upgrading glibc could become more complicated if the shared mutex
isn't recreated on boot, but persisted in the file system.  Berkeley
DB has this problem with process-shared condition variables, but the
same problem applies to mutexes as well:

  <https://bugzilla.redhat.com/show_bug.cgi?id=1394862>

POSIX requires that the mutex is reinitialized after the last process
detaches from a file mapping (perhaps due to a system reboot), so this
is not a conformance issue, strictly speaking.

Mime
View raw message