Re: [jgroups-dev] LockService concurrent usage issue

Olexandr Markushyn <[email protected]> Thu, 18 Jul 2013 10:08:53 +0000
Newsgroups gmane.comp.java.javagroups.devel
Message-ID <[email protected]>
Greetings,
=A0
>>If you changed to tryLock(timeout) or lock(), the issue disappeared. Can =
you verify that ?
Done.
Issue is reproduced with lock and tryLock without timeout.
In case of tryLock with timeout hanged threads just wait for the timeout an=
d then continue.

>>Can you create a JIRA and attach your test case ?
Done. =

It is JGRP-1660
https://issues.jboss.org/browse/JGRP-1660
=A0
Best regards,
Oleksandr Markushyn
SoftWeb


-----Original Message-----
From: Bela Ban [mailto:[email protected]] =

Sent: Thursday, July 18, 2013 09:45
To: [email protected]
Subject: Re: [jgroups-dev] LockService concurrent usage issue

Looks like a bug. I recall I had an issue with tryLock() before. If you cha=
nged to tryLock(timeout) or lock(), the issue disappeared. Can you verify t=
hat ?

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_sta
> bility_testcase.jar
> org.junit.runner.JUnitCore
> com.softcomputer.softweb.infl.commons.clustering.stabilitytest.LockSer
> viceStabilityTestCase
>
> 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=3D48808831&iu=3D/4140/ostg.c
> lktrk
>
>
>
> _______________________________________________
> 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 bottle=
necks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=3D48808831&iu=3D/4140/ostg.cl=
ktrk
_______________________________________________
Javagroups-development mailing list


---------------------------------------------------------------------------=
---
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=3D48808831&iu=3D/4140/ostg.cl=
ktrk
_______________________________________________
Javagroups-development mailing list