[ 
https://issues.apache.org/jira/browse/LUCENE-5612?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13974314#comment-13974314
 ] 

Robert Muir commented on LUCENE-5612:
-------------------------------------

I ran the test, seems to fail quite fast:
{noformat}
test-lock-factory:
[LockVerifyServer] Listening on /127.0.0.1:50571...
[LockVerifyServer] All clients started, fire gun...
[LockStressTest1] Connecting to server /127.0.0.1:50571 and registering as 
client 1...
[LockStressTest2] Connecting to server /127.0.0.1:50571 and registering as 
client 2...
[LockStressTest2] 0.0% done.
[LockStressTest1] 0.0% done.
[LockStressTest1] Exception in thread "Thread-12" 
java.lang.IllegalStateException: id 1 got lock, but 2 already holds the lock
[LockStressTest1]       at 
org.apache.lucene.store.LockVerifyServer$1.run(LockVerifyServer.java:100)
[LockVerifyServer] Server terminated.
[LockStressTest1] Exception in thread "main" java.lang.IllegalStateException: 
Lock server died because of locking error.
[LockStressTest2] Exception in thread "main" java.lang.IllegalStateException: 
Lock server died because of locking error.
[LockStressTest1]       at 
org.apache.lucene.store.VerifyingLockFactory$CheckedLock.verify(VerifyingLockFactory.java:56)
[LockStressTest1]       at 
org.apache.lucene.store.VerifyingLockFactory$CheckedLock.obtain(VerifyingLockFactory.java:67)
[LockStressTest2]       at 
org.apache.lucene.store.VerifyingLockFactory$CheckedLock.verify(VerifyingLockFactory.java:56)
[LockStressTest1]       at org.apache.lucene.store.Lock.obtain(Lock.java:77)
[LockStressTest2]       at 
org.apache.lucene.store.VerifyingLockFactory$CheckedLock.close(VerifyingLockFactory.java:79)
[LockStressTest1]       at 
org.apache.lucene.store.LockStressTest.main(LockStressTest.java:114)
[LockStressTest2]       at 
org.apache.lucene.store.LockStressTest.main(LockStressTest.java:120)

BUILD FAILED
/home/rmuir/workspace/lucene-trunk/lucene/core/build.xml:192: 
The following error occurred while executing this line:
/home/rmuir/workspace/lucene-trunk/lucene/core/build.xml:160: Java returned: 1
The following error occurred while executing this line:
/home/rmuir/workspace/lucene-trunk/lucene/core/build.xml:160: Java returned: 1

Total time: 2 seconds
{noformat}

With SimpleFSLock, the test passes on linux and build succeeds:
{noformat}
test-lock-factory:
[LockVerifyServer] Listening on /127.0.0.1:37227...
[LockVerifyServer] All clients started, fire gun...
[LockStressTest1] Connecting to server /127.0.0.1:37227 and registering as 
client 1...
[LockStressTest1] 0.0% done.
[LockStressTest2] Connecting to server /127.0.0.1:37227 and registering as 
client 2...
[LockStressTest2] 0.0% done.
[LockStressTest1] 5.0% done.
[LockStressTest2] 5.0% done.
[LockStressTest1] 10.0% done.
[LockStressTest2] 10.0% done.
[LockStressTest2] 15.0% done.
[LockStressTest1] 15.0% done.
[LockStressTest2] 20.0% done.
[LockStressTest1] 20.0% done.
[LockStressTest2] 25.0% done.
[LockStressTest1] 25.0% done.
[LockStressTest1] 30.0% done.
[LockStressTest2] 30.0% done.
[LockStressTest1] 35.0% done.
[LockStressTest2] 35.0% done.
[LockStressTest1] 40.0% done.
[LockStressTest2] 40.0% done.
[LockStressTest2] 45.0% done.
[LockStressTest1] 45.0% done.
[LockStressTest1] 50.0% done.
[LockStressTest2] 50.0% done.
[LockStressTest1] 55.0% done.
[LockStressTest2] 55.0% done.
[LockStressTest1] 60.0% done.
[LockStressTest2] 60.0% done.
[LockStressTest1] 65.0% done.
[LockStressTest2] 65.0% done.
[LockStressTest1] 70.0% done.
[LockStressTest2] 70.0% done.
[LockStressTest1] 75.0% done.
[LockStressTest2] 75.0% done.
[LockStressTest2] 80.0% done.
[LockStressTest1] 80.0% done.
[LockStressTest2] 85.0% done.
[LockStressTest1] 85.0% done.
[LockStressTest2] 90.0% done.
[LockStressTest1] 90.0% done.
[LockStressTest2] 95.0% done.
[LockStressTest1] 95.0% done.
[LockVerifyServer] Server terminated.
[LockStressTest2] Finished 20000 tries.
[LockStressTest1] Finished 20000 tries.

BUILD SUCCESSFUL
Total time: 25 seconds
{noformat}

Nice work, perhaps the target should be moved to a macro, so we can test both 
implementations in jenkins (Simple and Native)? And for now, we have to disable 
Native since we know it will fail, until the bug is fixed.

> LockStressTest fails always with NativeFSLockFactory
> ----------------------------------------------------
>
>                 Key: LUCENE-5612
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5612
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Robert Muir
>            Priority: Blocker
>             Fix For: 4.8
>
>         Attachments: LUCENE-5612-instant-crush.patch, 
> LUCENE-5612-instant-crush.patch, 
> LUCENE-5612-more-sophisticated-crusher.patch, 
> LUCENE-5612-more-sophisticated-crusher.patch, 
> LUCENE-5612-more-sophisticated-crusher.patch, 
> LUCENE-5612-more-sophisticated-crusher.patch, 
> LUCENE-5612-more-sophisticated-crusher.patch, LUCENE-5612-tester.patch, 
> LUCENE-5612-tester.patch, LUCENE-5612.patch
>
>
> I was looking at this, because i wanted to remove the static map inside 
> NativeFSLockFactory (no particular reason: it just smells bad, we require 
> java7, and you get overlappingexception as of java6 so its unnecessary).
> Before changing any code, i wanted to run lockstresstest first, just to 
> ensure it works: but it fails always. Simple works fine always.
> Exception in thread "main" java.lang.RuntimeException: 
> java.lang.RuntimeException: lock was double acquired at 
> org.apache.lucene.store.VerifyingLockFactory$CheckedLock.verify(VerifyingLockFactory.java:67)



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to