Uploaded image for project: 'Hibernate Search'
  1. HSEARCH-2179

Hanging during shutdown of SyncWorkProcessor

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.6.0.Alpha2
    • Fix Version/s: 5.5.3.Final, 5.6.0.Alpha3
    • Component/s: None
    • Labels:
      None

      Description

      This behavior has been observed intermittently in the Infinispan test suite. Apparently an exception on Lucene prevents the shutdownLatch latch of the SyncWorkProcessor to be released.

      Error logged:

      [22:04:42][org.infinispan:infinispan-directory-provider] Exception in thread "Hibernate Search sync consumer thread for index emails" java.lang.AssertionError: file _a.si does not exist; files=[_6.cfe, _3.si, _7.cfs, _c_Lucene50_0.tip, _a.si, _c_Lucene50_0.tim, _6.cfs, _7.cfe, _7.si, _2.si, _5.cfs, _4.cfe, _3.cfe, _b.si, _c.nvd, _3.cfs, _5.cfe, _4.cfs, _c.nvm, _6.si, _c.fnm, segments_c, _b.cfe, _1.cfe, _1.si, _c.cfs, _2.cfs, _c.si, _c.fdt, _1.cfs, _2.cfe, _c.fdx, _c_Lucene50_0.pos, _5.si, _9.si, _a.cfe, _0.si, _0.cfs, _c_Lucene50_0.doc, _8.cfe, _9.cfs, _a.cfs, _0.cfe, _b.cfs, _9.cfe, _4.si, _8.cfs, _c.cfe, _8.si]
      [22:04:42][org.infinispan:infinispan-directory-provider] 	at org.apache.lucene.index.IndexWriter.filesExist(IndexWriter.java:4327)
      [22:04:42][org.infinispan:infinispan-directory-provider] 	at org.apache.lucene.index.IndexWriter.startCommit(IndexWriter.java:4398)
      [22:04:42][org.infinispan:infinispan-directory-provider] 	at org.apache.lucene.index.IndexWriter.prepareCommitInternal(IndexWriter.java:2860)
      [22:04:42][org.infinispan:infinispan-directory-provider] 	at org.apache.lucene.index.IndexWriter.commitInternal(IndexWriter.java:2963)
      [22:04:42][org.infinispan:infinispan-directory-provider] 	at org.apache.lucene.index.IndexWriter.commit(IndexWriter.java:2930)
      [22:04:42][org.infinispan:infinispan-directory-provider] 	at org.hibernate.search.backend.impl.lucene.IndexWriterHolder.commitIndexWriter(IndexWriterHolder.java:146)
      [22:04:42][org.infinispan:infinispan-directory-provider] 	at org.hibernate.search.backend.impl.lucene.IndexWriterHolder.commitIndexWriter(IndexWriterHolder.java:159)
      [22:04:42][org.infinispan:infinispan-directory-provider] 	at org.hibernate.search.backend.impl.lucene.PerChangeSetCommitPolicy.onChangeSetApplied(PerChangeSetCommitPolicy.java:29)
      [22:04:42][org.infinispan:infinispan-directory-provider] 	at org.hibernate.search.backend.impl.lucene.AbstractWorkspaceImpl.afterTransactionApplied(AbstractWorkspaceImpl.java:97)
      [22:04:42][org.infinispan:infinispan-directory-provider] 	at org.hibernate.search.backend.impl.lucene.LuceneBackendQueueTask.applyUpdates(LuceneBackendQueueTask.java:105)
      [22:04:42][org.infinispan:infinispan-directory-provider] 	at org.hibernate.search.backend.impl.lucene.LuceneBackendQueueTask.run(LuceneBackendQueueTask.java:46)
      [22:04:42][org.infinispan:infinispan-directory-provider] 	at org.hibernate.search.backend.impl.lucene.SyncWorkProcessor$Consumer.applyChangesets(SyncWorkProcessor.java:158)
      [22:04:42][org.infinispan:infinispan-directory-provider] 	at org.hibernate.search.backend.impl.lucene.SyncWorkProcessor$Consumer.run(SyncWorkProcessor.java:147)
      [22:04:42][org.infinispan:infinispan-directory-provider] 	at java.lang.Thread.run(Thread.java:745)
      

      Stack trace:

      "main" #1 prio=5 os_prio=0 tid=0x00007f1884008800 nid=0x5889 waiting on condition [0x00007f188a32d000]
         java.lang.Thread.State: TIMED_WAITING (parking)
      	at sun.misc.Unsafe.park(Native Method)
      	- parking to wait for  <0x00000000841d43a8> (a java.util.concurrent.CountDownLatch$Sync)
      	at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
      	at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedNanos(AbstractQueuedSynchronizer.java:1037)
      	at java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireSharedNanos(AbstractQueuedSynchronizer.java:1328)
      	at java.util.concurrent.CountDownLatch.await(CountDownLatch.java:277)
      	at org.hibernate.search.backend.impl.lucene.SyncWorkProcessor.shutdown(SyncWorkProcessor.java:117)
      	at org.hibernate.search.backend.impl.lucene.LuceneBackendQueueProcessor.close(LuceneBackendQueueProcessor.java:69)
      	at org.hibernate.search.indexes.spi.DirectoryBasedIndexManager.destroy(DirectoryBasedIndexManager.java:78)
      	at org.hibernate.search.indexes.impl.IndexManagerHolder.stop(IndexManagerHolder.java:197)
      	- locked <0x000000008325e288> (a org.hibernate.search.indexes.impl.IndexManagerHolder)
      	at org.hibernate.search.engine.impl.ImmutableSearchFactory.close(ImmutableSearchFactory.java:230)
      	at org.hibernate.search.engine.impl.MutableSearchFactory.close(MutableSearchFactory.java:137)
      	at org.hibernate.search.hcore.impl.HibernateSearchSessionFactoryObserver.sessionFactoryClosed(HibernateSearchSessionFactoryObserver.java:99)
      	at org.hibernate.internal.SessionFactoryObserverChain.sessionFactoryClosed(SessionFactoryObserverChain.java:48)
      	at org.hibernate.internal.SessionFactoryImpl.close(SessionFactoryImpl.java:1084)
      	at org.hibernate.search.test.util.FullTextSessionBuilder.close(FullTextSessionBuilder.java:149)
      	at org.infinispan.hibernate.search.LiveRunningTest.liveRun(LiveRunningTest.java:54)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:497)
      	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
      	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
      	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
      	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
      	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
      	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
      	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
      	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
      	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
      	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
      	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
      	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
      	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
      	at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
      	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:283)
      	at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:173)
      	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
      	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:128)
      	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)
      	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
      	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103
      

        Attachments

          Activity

            People

            • Assignee:
              gustavonalle Gustavo Fernandes
              Reporter:
              gustavonalle Gustavo Fernandes
              Participants:
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: