Uploaded image for project: 'Ratis'
  1. Ratis
  2. RATIS-1931 Support Zero-Copy in ratis-grpc
  3. RATIS-2184

Improve TestRaftWithGrpc test stability

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: In Progress
    • Major
    • Resolution: Unresolved
    • 3.0.1
    • None
    • None
    • None

    Description

      When running TestRaftWithGrpc, it seems to have poor stability.
      https://github.com/apache/ratis/actions/runs/11591023635/job/32294387846
      The log of the failed run:

      Error:  org.apache.ratis.grpc.TestRaftWithGrpc.testWithLoad(Boolean)[2]  Time elapsed: 87.315 s  <<< ERROR!
      java.lang.IllegalStateException: #leaks = 4 > 0, #leaks == set.size = 4
      	at org.apache.ratis.util.Preconditions.assertTrue(Preconditions.java:77)
      	at org.apache.ratis.util.LeakDetector$LeakTrackerSet.assertNoLeaks(LeakDetector.java:100)
      	at org.apache.ratis.util.LeakDetector$LeakTrackerSet.getNumLeaks(LeakDetector.java:94)
      	at org.apache.ratis.util.LeakDetector.assertNoLeaks(LeakDetector.java:174)
      	at org.apache.ratis.server.impl.MiniRaftCluster.shutdown(MiniRaftCluster.java:894)
      	at org.apache.ratis.grpc.MiniRaftClusterWithGrpc.shutdown(MiniRaftClusterWithGrpc.java:97)
      	at org.apache.ratis.server.impl.MiniRaftCluster$Factory$Get.runWithNewCluster(MiniRaftCluster.java:152)
      	at org.apache.ratis.server.impl.MiniRaftCluster$Factory$Get.runWithNewCluster(MiniRaftCluster.java:121)
      	at org.apache.ratis.RaftBasicTests.testWithLoad(RaftBasicTests.java:338)
      	at org.apache.ratis.grpc.TestRaftWithGrpc.testWithLoad(TestRaftWithGrpc.java:61)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
      	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
      	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
      	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
      	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
      	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
      	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
      	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
      	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
      	at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
      	at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:647)
      	at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:272)
      	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
      	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
      	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
      	at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
      	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
      	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
      	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
      	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
      	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:485)
      	at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:272)
      	at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1384)
      	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
      	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
      	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
      	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
      	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:485)
      	at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:272)
      	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
      	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
      	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
      	at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1384)
      	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
      	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
      	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
      	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
      	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:485)
      	at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:272)
      	at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1384)
      	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
      	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
      	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
      	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
      	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:485)
      	at java.util.ArrayList.forEach(ArrayList.java:1259)
      	at java.util.ArrayList.forEach(ArrayList.java:1259)
      
      Error:  org.apache.ratis.grpc.TestRaftWithGrpc.testRequestTimeout(Boolean)[1]  Time elapsed: 38.266 s  <<< ERROR!
      java.lang.IllegalStateException: #leaks = 4 > 0, #leaks == set.size = 4
      	at org.apache.ratis.util.Preconditions.assertTrue(Preconditions.java:77)
      	at org.apache.ratis.util.LeakDetector$LeakTrackerSet.assertNoLeaks(LeakDetector.java:100)
      	at org.apache.ratis.util.LeakDetector$LeakTrackerSet.getNumLeaks(LeakDetector.java:94)
      	at org.apache.ratis.util.LeakDetector.assertNoLeaks(LeakDetector.java:174)
      	at org.apache.ratis.server.impl.MiniRaftCluster.shutdown(MiniRaftCluster.java:894)
      	at org.apache.ratis.grpc.MiniRaftClusterWithGrpc.shutdown(MiniRaftClusterWithGrpc.java:97)
      	at org.apache.ratis.server.impl.MiniRaftCluster$Factory$Get.runWithNewCluster(MiniRaftCluster.java:152)
      	at org.apache.ratis.server.impl.MiniRaftCluster$Factory$Get.runWithNewCluster(MiniRaftCluster.java:121)
      	at org.apache.ratis.grpc.TestRaftWithGrpc.testRequestTimeout(TestRaftWithGrpc.java:69)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
      	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
      	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
      	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
      	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
      	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
      	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
      	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
      	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
      	at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
      	at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:647)
      	at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:272)
      	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
      	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
      	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
      	at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
      	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
      	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
      	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
      	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
      	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:485)
      	at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:272)
      	at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1384)
      	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
      	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
      	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
      	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
      	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:485)
      	at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:272)
      	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
      	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
      	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
      	at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1384)
      	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
      	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
      	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
      	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
      	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:485)
      	at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:272)
      	at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1384)
      	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
      	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
      	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
      	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
      	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:485)
      	at java.util.ArrayList.forEach(ArrayList.java:1259)
      	at java.util.ArrayList.forEach(ArrayList.java:1259)
      

      Attachments

        1. image-2024-11-07-15-05-25-681.png
          121 kB
          JiangHua Zhu
        2. org.apache.ratis.grpc.TestRaftWithGrpc-output_01.txt
          16.66 MB
          JiangHua Zhu
        3. org.apache.ratis.grpc.TestRaftWithGrpc-output_02.txt
          12.37 MB
          JiangHua Zhu
        4. org.apache.ratis.grpc.TestRaftWithGrpc-output_03.txt
          19.22 MB
          JiangHua Zhu
        5. org.apache.ratis.grpc.TestRaftWithGrpc-output_04.txt
          28.19 MB
          JiangHua Zhu
        6. screenshot-1.png
          133 kB
          JiangHua Zhu

        Issue Links

          Activity

            People

              jianghuazhu JiangHua Zhu
              jianghuazhu JiangHua Zhu
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 40m
                  40m