Re: [jgroups-dev] LockService concurrent usage issue

Bela Ban <[email protected]> Thu, 18 Jul 2013 08:44:58 +0200
Newsgroups gmane.comp.java.javagroups.devel
Message-ID <[email protected]>
Looks like a bug. I recall I had an issue with tryLock() before. If you 
changed to tryLock(timeout) or lock(), the issue disappeared. Can you 
verify that ?

Can you create a JIRA and attach your test case ?

On 7/17/13 6:35 PM, Olexandr Markushyn wrote:
> Greetings,
>
> Could you help to clarify the situation we have with concurent
> LockService usage please?
>
> We have rather simple test that starts some amount of threads which in
> turn simultaneously obtain lock through LockService#getLock then perform
> lock and unlock.
>
> Each thread works during some time.
>
> After couple of seconds of work some threads just hang up in
> Locking$ClientLock(Object).wait() called indirectly from
> LockService$LockImpl.tryLock().
>
> Here is stack trace:
>
> Thread [Thread-ClientImitation-1] (Suspended)
>
>                  Object.wait(long) line: not available [native method]
>
>                  Locking$ClientLock(Object).wait() line: 485
>
>                  Locking$ClientLock.acquireTryLock(long, boolean) line:
> 1010
>
>                  Locking$ClientLock.tryLock() line: 896
>
>                  CENTRAL_LOCK(Locking).down(Event) line: 152
>
>                  ProtocolStack.down(Event) line: 1025
>
>                  JChannel.down(Event) line: 718
>
>                  LockService$LockImpl.tryLock() line: 102
>
>                  LockServiceStabilityTestCase$ClientImitation.run()
> line: 167
>
>                  Thread.run() line: 662
>
> I’ve attached the test just in case (lockservice_stability_testcase.ja_).
>
> Attached test is hardcoded to work during 20 seconds with 15 threads.
>
> Java source is inside of the attachment.
>
> We are able to reproduce the problem under MyEclipse IDE with 2 threads
> in 4 seconds.
>
> But in case of simple JVM start it is not reproducible sometimes even
> with 15 threads and in 20 seconds.
>
> Command line:
>
> \jdk1.6.0_31\jre\bin\java.exe -cp
> junit-4.4.jar;jgroups-3.2.4.Final.jar;log4j-1.2.15.jar;lockservice_stability_testcase.jar
> org.junit.runner.JUnitCore
> com.softcomputer.softweb.infl.commons.clustering.stabilitytest.LockServiceStabilityTestCase
>
> Dependencies:
>
> jgroups-3.2.4.Final.jar (with jgroups-3.3.3.Final the situation is the same)
>
> junit-4.4.jar
>
> log4j-1.2.15.jar (log4j.xml is inside. It creates test.trace file)
>
> Best regards,
>
> Oleksandr Markushyn
>
>
>
> ------------------------------------------------------------------------------
> See everything from the browser to the database with AppDynamics
> Get end-to-end visibility with application monitoring from AppDynamics
> Isolate bottlenecks and diagnose root cause in seconds.
> Start your free trial of AppDynamics Pro today!
> http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
>
>
>
> _______________________________________________
> Javagroups-development mailing list
>

-- 
Bela Ban, JGroups lead (http://www.jgroups.org)

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Javagroups-development mailing list