[
https://issues.jboss.org/browse/JGRP-2299?page=com.atlassian.jira.plugin....
]
David White edited comment on JGRP-2299 at 8/20/19 6:40 PM:
------------------------------------------------------------
I tried to test this fix (4.1.2) but unfortunately something seems to be
broken with the CENTRAL_LOCK2 protocol.
Upon shutdown, my application successfully closes the JChannel which uses
the CENTRAL_LOCK2 protocol. However, after the application completely
exits from all my application code the JVM is still running and never
exits. It appears there is a thread still running the CENTRAL_LOCK2
protocol and it is stuck in the method processQueue() on the line
"req=req_queue.take();}.
The last version I tested was 4.0.19 so I don't know when this problem was
introduced. Please advise.
was (Author: dwhitejazz):
I tried to test this fix (4.1.2) but unfortunately something seems to be
broken with the CENTRAL_LOCK2 protocol.
Upon shutdown, my application successfully closes the JChannel which uses
the CENTRAL_LOCK2 protocol. However, after the application completely
exits from all my application code the JVM is still running and never
exits. It appears there is a thread still running the CENTRAL_LOCK2
protocol and it is stuck in the method processQueue() on the line
"req=req_queue.take();}.
The last version I tested was 4.0.19 so I don't know when this problem was
introduced. Please advise.
Dave
From: "Bela Ban (Jira)" <issues(a)jboss.org>
To: dfwhite(a)us.ibm.com
Date: 08/02/2019 08:25 AM
Subject: [EXTERNAL] [JBoss JIRA] (JGRP-2299) LockService does not
work correctly if unlock/lock is called in immediate succession
Bela Ban resolved as Done
Resolving this; let me know if this fixes all of your issues!
JGroups / JGRP-2299
LockService does not work correctly if unlock/lock is called in immediate
succession
Change By:
Bela Ban
Status:
Open Resolved
Resolution:
Done
Add Comment
This message was sent by Atlassian Jira (v7.12.1#712002-sha1:609a505)
LockService does not work correctly if unlock/lock is called in
immediate succession
------------------------------------------------------------------------------------
Key: JGRP-2299
URL:
https://issues.jboss.org/browse/JGRP-2299
Project: JGroups
Issue Type: Bug
Affects Versions: 4.0.15
Environment: Windows 10 Oracle JDK 1.8 131
AIX IBM Java 8
Reporter: Mirko Streckenbach
Assignee: Bela Ban
Priority: Major
Fix For: 4.1.2
Attachments: JGroupsExample.java, image.png, udp+lock.xml
In our application we have encountered occasional cases of LockService allowing 2
processes to hold the same lock at the same time. I could reproduce this with a simple
program (see atttachment) and it happens if for a lock "unlock" is called and
immediately afterwards "lock". If there is a small delay (e.g. 1 second) between
the two operations everything works as expected.
This can be produced with the attached program. The program does lock/unlock/lock on a
lock and then tries to lock the same lock from a different JChannel and is awarded the
lock. If you place a small sleep() after the unlock, everything works as expected and the
parallel lock is not awarded.
If you turn on debugging you'll see no output between unlock and lock, so it looks to
me like the lock is awarded without passing GRANT_LOCK messages to the stack. Using a
conditional break point you can see that ClientLock.acquired is still true even after the
unlock().
--
This message was sent by Atlassian Jira
(v7.12.1#712002)