Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-4651

LevelDB crashes JVM when stop() is called concurrently with write()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 7.0.0.Beta2
    • 7.0.0.Beta1
    • Loaders and Stores
    • None

    Description

      This test reproduces the issue:

          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();
            }
         }
      

      Attachments

        Activity

          People

            rvansa1@redhat.com Radim Vansa (Inactive)
            rvansa1@redhat.com Radim Vansa (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: