Hi All.
I've updated reproducer and provided some investigation results at issue.
On Fri, Sep 15, 2017 at 7:12 PM, rajivgandhi wrote:
> Hi Yakov,
> The test will pass if you comment the line:
> "IgniteCache
yakov -
I just looked the code, and it clearly shows that lock is on item in cache2,
where as cache.clear() is performed for cach1. The real issue here is
creation of new cache(cache3) is causing deadlock when there is a lock on
items in other cache.
-Naresh
--
Sent from:
I see that you call cache.clear() after acquiring explicit lock on key
"fake". This cause cache clear to hang and this in turn prevents
lock.unlock() call. Explicit lock also holds the exchange process.
If I comment out cache.clear() test passes without deadlock.
--Yakov
Hi Yakov,
This is pretty easy to repro. Please find attached the source code project
which reproduces this 100% of the time.
If you could please suggest a workaround or time line for the fix.
thanks and Regards,
Rajeev
ignite-deadlock.zip
Naresh,
The case you described should work. Can you please create a reproducer that
I can run locally?
I also filed this to make best effort to avoid deadlocks -
https://issues.apache.org/jira/browse/IGNITE-6380
--Yakov
Val,
JMX console is not detecting deadlocks, but the threads are on indefinite
wait.
Scenario:
Similar to scenario provided below by rajivgandhi:
Use case:
1. Thread 1 creates (getorcreate) Cache1
2. Thread 1 acquires a lock on item1 in Cache3 (different cache)
3. Thread 2 creates Ignite
getOrCreateCache can cause deadlock only under certain circumstances, in
which we throw an exception for this particular reason. Scenarios you
describe should not cause a deadlock, please attach thread dumps from all
the nodes if you believe you have one.
-Val
--
Sent from:
One more symptom:
If 2 or more threads are calling getOrCreate concurrently, it is deadlocking
the threads.
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Frankly, I am quite perplexed that the simplest of the API (getOrCreate) can
potentially deadlock the application.
1. Can you please tell me how to use Locks then? If an application has a
need to create a cache and it has a need to use Lock/unlock block, if the
getOrCreate happens to occur in one
In our case, cache 2 is not part of the transaction in thread 1 (which uses
only cache 2). Why should Thread 2 be affected by a transaction in thread 1
when they are working with different caches?
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Naresh,
This is correct behavior. Creation of new cache triggers global exchange
process which can't be done concurrently with transactions, so if you create
a cache synchronously within a transaction, you would create a deadlock. You
should create all caches required for a transaction prior to
Hi All,
We are encountering the below problem during application startup configured
with Ignite 2.1.0
Error: "Cannot start/stop cache within lock or transaction"
Use case:
1. Thread 1 creates (getorcreate) Cache1
2. Thread 1 acquires a lock on item1 in Cache1
3. Thread 2 crea