[
https://issues.apache.org/jira/browse/LUCENE-3235?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13149979#comment-13149979
]
Simon Willnauer commented on LUCENE-3235:
-----------------------------------------
here is a very detailed writeup for this:
http://blogs.oracle.com/dave/entry/a_race_in_locksupport_park
some interesting facts:
* The problem would only manifest when we were using the -UseMembar
optimization that lets us remove fences from certain hot thread state
transitions paths that need to coordinate safepoints between mutator threads
and the JVM. This feature is enabled by default, but we can turn it off with
the -XX:+UseMembar switch, which causes the JVM to emit normal fence
instructions in the state transitions paths.
* The bug is a "day-one" bug and present in all versions of HotSpot.
* Parker::park() and unpark() reside in os_linux.cpp, os_solaris.cpp and
os_windows.cpp for Linux, Solaris and Windows, respectively.
* The built-in synchronized implementation uses a different park mechanism
(PlatformPark::) whereas the java.util.concurrent infrastructure uses Parker::.
Only Parker:: is vulnerable.
* The bug will not manifest on uniprocessors or environments where threads are
otherwise constrained to just a single processor.
I think the only reasonable fix for this is to recommend people to use
-XX:+UseMembar if they are running on a vulnerable JVM
simon
> TestDoubleBarrelLRUCache hangs under Java 1.5, 3.x and trunk, likely JVM bug
> ----------------------------------------------------------------------------
>
> Key: LUCENE-3235
> URL: https://issues.apache.org/jira/browse/LUCENE-3235
> Project: Lucene - Java
> Issue Type: Bug
> Affects Versions: 3.0, 3.1, 3.2, 3.3, 3.4
> Reporter: Michael McCandless
> Fix For: 3.5
>
> Attachments: LUCENE-3235.patch, LUCENE-3235.patch, LUCENE-3235.patch
>
>
> Not sure what's going on yet... but under Java 1.6 it seems not to hang bug
> under Java 1.5 hangs fairly easily, on Linux. Java is 1.5.0_22.
> I suspect this is relevant:
> http://stackoverflow.com/questions/3292577/is-it-possible-for-concurrenthashmap-to-deadlock
> which refers to this JVM bug
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6865591 which then refers
> to this one http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6822370
> It looks like that last bug was fixed in Java 1.6 but not 1.5.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]