Bug in rwlock implementation

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Bug in rwlock implementation

Rickard Green-2
I've found a bug in the rwlock implementation that can cause a lock to
end up in an inconsistent state. The bug is very seldom triggered, but
can be. It is most likely to be triggered when using the
read_concurrency option on an ets table that is frequently accessed from
multiple processes doing lots of writes and reads. That is, a situation
where you typically don't want to use the read_concurrency option in the
first place.

There is a fix for this bug currently under testing. The fix will appear
in R14B01, but there might be changes to it since it is still under
testing. You can help us out testing it, by using it.

The fix can be fetched using: git fetch
git://github.com/rickard-green/otp.git rickard/rwlock-euc2010/OTP-8925

Alternatively you can download the complete source including the fix by
clicking at the download button at:

Note that you need to run "./otp_build autoconf" in the top directory
before building.

If you are worried that the bug might be triggered on your system, and
you don't want to use a fix that isn't in its final state, it is also
possible to enable pthread rwlocks as a workaround until R14B01. You do
this by configuring the build as follows:
  ./configure force_pthread_rwlocks=yes <other configure options>

Rickard Green, Erlang/OTP, Ericsson AB.

erlang-questions (at) erlang.org mailing list.
See http://www.erlang.org/faq.html
To unsubscribe; mailto:[hidden email]