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

HotRodEventsTest random failures

    XMLWordPrintable

Details

    Description

      EventLogListener uses an ArrayBlockingQueue that may block when 2 threads use it concurrently. If the blocked thread is a client Netty thread, BlockHound throws an exception and prevents the event from being added.

      java.lang.AssertionError: Blocking call! jdk.internal.misc.Unsafe#park on thread Thread[HotRodEventsTest-Client-131-1,5,main]
      	at org.infinispan.util.CoreTestBlockHoundIntegration.lambda$applyTo$0(CoreTestBlockHoundIntegration.java:55)
      	at reactor.blockhound.BlockHound$Builder.lambda$install$8(BlockHound.java:427)
      	at reactor.blockhound.BlockHoundRuntime.checkBlocking(BlockHoundRuntime.java:89)
      	at java.base/jdk.internal.misc.Unsafe.park(Unsafe.java)
      	at java.base/java.util.concurrent.locks.LockSupport.park(LockSupport.java:194)
      	at java.base/java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:885)
      	at java.base/java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(AbstractQueuedSynchronizer.java:917)
      	at java.base/java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1240)
      	at java.base/java.util.concurrent.locks.ReentrantLock.lock(ReentrantLock.java:267)
      	at java.base/java.util.concurrent.ArrayBlockingQueue.offer(ArrayBlockingQueue.java:341)
      	at java.base/java.util.AbstractQueue.add(AbstractQueue.java:95)
      	at java.base/java.util.concurrent.ArrayBlockingQueue.add(ArrayBlockingQueue.java:326)
      	at org.infinispan.server.hotrod.event.EventLogListener.onModified(EventLogListener.java:77)
      	at org.infinispan.server.hotrod.test.ClientHandler.channelRead(HotRodClient.java:1158)
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
      

      The test eventually times out waiting for the event that was not added:

      java.lang.AssertionError: 
      	at org.infinispan.server.hotrod.event.EventLogListener.expectEvent(EventLogListener.java:146)
      	at org.infinispan.server.hotrod.event.EventLogListener.expectSingleEvent(EventLogListener.java:140)
      	at org.infinispan.server.hotrod.event.EventLogListener.expectOnlyModifiedEvent(EventLogListener.java:128)
      	at org.infinispan.server.hotrod.event.HotRodEventsTest.lambda$testModifiedEvent$1(HotRodEventsTest.java:42)
      

      The same problem happens with the other test methods in HotRodEventsTest: testModifiedEvent, testRemovedEvent etc.

      Attachments

        Activity

          People

            dberinde@redhat.com Dan Berindei (Inactive)
            dberinde@redhat.com Dan Berindei (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: