ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Warner <m...@warnertechnology.com>
Subject getOrCreateCache hang
Date Mon, 20 Feb 2017 17:35:27 GMT
I'm experiencing Ignite client hangs when calling getOrCreateCache when both
are starting simultaneously. The stack trace shows the clients are hung in
the getOrCreateCache method, which is why I'm focusing here.

This seems like a deadlock when both clients are trying to simultaneously
call getOrCreateCache.

The setup is a vanilla Ignite installation running (./bin/ignite.sh) and two
clients (IgniteConfiguration setClientMode(true)). Both go through the same
setup, albeit in separate jar files (and separate PIDs):

		TcpDiscoverySpi spi = new TcpDiscoverySpi();
		TcpDiscoveryVmIpFinder ipFinder = new TcpDiscoveryVmIpFinder();
		ipFinder.setAddresses(Arrays.asList("127.0.0.1"));
		spi.setIpFinder(ipFinder);
		IgniteConfiguration cfg = new IgniteConfiguration();
		cfg.setDiscoverySpi(spi);
		cfg.setClientMode(true);
		try (Ignite ignite = Ignition.start(cfg)) {
			CacheConfiguration<> cacheCfg = new CacheConfiguration<>(CACHE_NAME);
			cacheCfg.setAtomicityMode(ATOMIC);
			cacheCfg.setReadThrough(true);
			cacheCfg.setWriteThrough(true);
			cacheCfg.setWriteBehindEnabled(false);
			cache = ignite.getOrCreateCache(cacheCfg);  <-- Hangs here
			//
		}

"main" #1 prio=5 os_prio=31 tid=0x00007fdd01009800 nid=0xc07 waiting on
condition [0x0000700000218000]
   java.lang.Thread.State: WAITING (parking)
	at sun.misc.Unsafe.park(Native Method)
	- parking to wait for  <0x00000007964b0e58> (a
org.apache.ignite.internal.processors.cache.GridCacheProcessor$DynamicCacheStartFuture)
	at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
	at
java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:836)
	at
java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:997)
	at
java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1304)
	at
org.apache.ignite.internal.util.future.GridFutureAdapter.get0(GridFutureAdapter.java:160)
	at
org.apache.ignite.internal.util.future.GridFutureAdapter.get(GridFutureAdapter.java:118)
	at
org.apache.ignite.internal.IgniteKernal.getOrCreateCache(IgniteKernal.java:2586)


My apologies in advance if this is a well-known problem. I've been searching
and am stumped.

Thanks!



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/getOrCreateCache-hang-tp10737.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Mime
View raw message