You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Simon Willnauer <si...@googlemail.com> on 2011/11/15 11:50:19 UTC

JVM Bugs affecting Lucene & Solr

hey folks,

we lately looked into
https://issues.apache.org/jira/browse/LUCENE-3235 again, an issue
where a class using ConcurrentHashMap hangs / deadlocks on specific
JVMs in combination with specific CPUs. It turns out its a JVM bug in
Sun / Oracle Java 1.5 as well as Java 1.6. Its apparently fixed in
1.6.u18 so if you are running on a JVM >= 1.6.u18 you should be safe.
Yet, in older JVMs all classes using
java.util.concurrent.locks.LockSupport are vulnerable which includes
ConcurrentHashMap, ReentrantLock, CountDownLatch etc. Lucene and Solr
make use of those classes too so if you running on an older JVM you
could be affected by this bug and should either upgrade to a new JVM
or use -XX:+UseMembar to start you JVM.

In general its a good idea to keep an eye on
http://wiki.apache.org/lucene-java/SunJavaBugs we try to keep this
up-to-date

thanks,

Simon

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Fw: JVM Bugs affecting Lucene & Solr

Posted by Andrew Purtell <ap...@apache.org>.
----- Forwarded Message -----

> From: Simon Willnauer <si...@googlemail.com>
> To: dev@lucene.apache.org; java-user <ja...@lucene.apache.org>; solr-user@lucene.apache.org; general@lucene.apache.org
> Cc: 
> Sent: Tuesday, November 15, 2011 2:50 AM
> Subject: JVM Bugs affecting Lucene & Solr
> 
> hey folks,
> 
> we lately looked into
> https://issues.apache.org/jira/browse/LUCENE-3235 again, an issue
> where a class using ConcurrentHashMap hangs / deadlocks on specific
> JVMs in combination with specific CPUs. It turns out its a JVM bug in
> Sun / Oracle Java 1.5 as well as Java 1.6. Its apparently fixed in
> 1.6.u18 so if you are running on a JVM >= 1.6.u18 you should be safe.
> Yet, in older JVMs all classes using
> java.util.concurrent.locks.LockSupport are vulnerable which includes
> ConcurrentHashMap, ReentrantLock, CountDownLatch etc. Lucene and Solr
> make use of those classes too so if you running on an older JVM you
> could be affected by this bug and should either upgrade to a new JVM
> or use -XX:+UseMembar to start your JVM.
> 
> In general its a good idea to keep an eye on
> http://wiki.apache.org/lucene-java/SunJavaBugs we try to keep this
> up-to-date
> 
> thanks,
> 
> Simon



We used -XX:+UseMembar in production for a while to work around a case
where monitors might miss wakeups occasionally. I seem to recall
discussion on the HBase lists also. 

   - Andy



Fw: JVM Bugs affecting Lucene & Solr

Posted by Andrew Purtell <ap...@apache.org>.
----- Forwarded Message -----

> From: Simon Willnauer <si...@googlemail.com>
> To: dev@lucene.apache.org; java-user <ja...@lucene.apache.org>; solr-user@lucene.apache.org; general@lucene.apache.org
> Cc: 
> Sent: Tuesday, November 15, 2011 2:50 AM
> Subject: JVM Bugs affecting Lucene & Solr
> 
> hey folks,
> 
> we lately looked into
> https://issues.apache.org/jira/browse/LUCENE-3235 again, an issue
> where a class using ConcurrentHashMap hangs / deadlocks on specific
> JVMs in combination with specific CPUs. It turns out its a JVM bug in
> Sun / Oracle Java 1.5 as well as Java 1.6. Its apparently fixed in
> 1.6.u18 so if you are running on a JVM >= 1.6.u18 you should be safe.
> Yet, in older JVMs all classes using
> java.util.concurrent.locks.LockSupport are vulnerable which includes
> ConcurrentHashMap, ReentrantLock, CountDownLatch etc. Lucene and Solr
> make use of those classes too so if you running on an older JVM you
> could be affected by this bug and should either upgrade to a new JVM
> or use -XX:+UseMembar to start your JVM.
> 
> In general its a good idea to keep an eye on
> http://wiki.apache.org/lucene-java/SunJavaBugs we try to keep this
> up-to-date
> 
> thanks,
> 
> Simon



We used -XX:+UseMembar in production for a while to work around a case
where monitors might miss wakeups occasionally. I seem to recall
discussion on the HBase lists also. 

   - Andy