[infinispan-issues] [JBoss JIRA] (ISPN-4651) LevelDB crashes JVM when stop() is called concurrently with write()
Radim Vansa (JIRA)
issues at jboss.org
Tue Aug 19 07:39:32 EDT 2014
Radim Vansa created ISPN-4651:
---------------------------------
Summary: LevelDB crashes JVM when stop() is called concurrently with write()
Key: ISPN-4651
URL: https://issues.jboss.org/browse/ISPN-4651
Project: Infinispan
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Loaders and Stores
Affects Versions: 7.0.0.Beta1
Reporter: Radim Vansa
Assignee: Radim Vansa
This test reproduces the issue:
{code}
public void testConcurrentWriteAndRestart() {
final int THREADS = 4;
final AtomicBoolean run = new AtomicBoolean(true);
final CountDownLatch started = new CountDownLatch(THREADS);
ExecutorService executor = Executors.newFixedThreadPool(THREADS);
for (int i = 0; i < THREADS; ++i) {
executor.execute(new Runnable() {
@Override
public void run() {
started.countDown();
int i = 0;
while (run.get()) {
InternalCacheEntry entry = TestInternalCacheEntryFactory.create("k" + i, "v" + i);
MarshalledEntry me = TestingUtil.marshalledEntry(entry, getMarshaller());
cl.write(me);
++i;
}
}
});
}
try {
started.await();
Thread.sleep(1000);
cl.stop();
Thread.sleep(1000);
cl.start();
Thread.sleep(1000);
} catch (InterruptedException e) {
throw new IllegalStateException(e);
} finally {
run.set(false);
executor.shutdown();
}
}
{code}
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
More information about the infinispan-issues
mailing list