Denes Arvay created NIFI-8655:
---------------------------------

             Summary: Intermittent test failures in 
TestUnpackContent#testThreadSafetyUsingAutoDetect
                 Key: NIFI-8655
                 URL: https://issues.apache.org/jira/browse/NIFI-8655
             Project: Apache NiFi
          Issue Type: Bug
            Reporter: Denes Arvay
            Assignee: Denes Arvay


TestUnpackContent#testThreadSafetyUsingAutoDetect fails intermittently with 
{{ArrayIndexOutOfBoundsException}}.

Seems to be a race condition.

Stack trace: 
{code:java}
java.lang.ArrayIndexOutOfBoundsException: Index 245 out of bounds for length 
244java.lang.ArrayIndexOutOfBoundsException: Index 245 out of bounds for length 
244 at java.base/java.util.ArrayList.add(ArrayList.java:486) at 
java.base/java.util.ArrayList.add(ArrayList.java:498) at 
org.apache.nifi.util.CapturingLogger.info(CapturingLogger.java:234) at 
org.apache.nifi.util.MockComponentLog.info(MockComponentLog.java:226) at 
org.apache.nifi.processors.standard.UnpackContent.onTrigger(UnpackContent.java:307)
 at 
org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
 at 
org.apache.nifi.util.StandardProcessorTestRunner$RunProcessor.call(StandardProcessorTestRunner.java:271)
 at 
org.apache.nifi.util.StandardProcessorTestRunner$RunProcessor.call(StandardProcessorTestRunner.java:265)
 at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at 
java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
 at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
 at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
 at java.base/java.lang.Thread.run(Thread.java:834)
java.lang.AssertionError: java.lang.IllegalStateException: 
FlowFile[244,data.tar,3584B] has already been transferred
 at 
org.apache.nifi.util.StandardProcessorTestRunner.run(StandardProcessorTestRunner.java:221)
 at 
org.apache.nifi.util.StandardProcessorTestRunner.run(StandardProcessorTestRunner.java:180)
 at 
org.apache.nifi.util.StandardProcessorTestRunner.run(StandardProcessorTestRunner.java:175)
 at 
org.apache.nifi.util.StandardProcessorTestRunner.run(StandardProcessorTestRunner.java:170)
 at 
org.apache.nifi.processors.standard.TestUnpackContent.testThreadSafetyUsingAutoDetect(TestUnpackContent.java:481)
 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native 
Method) at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
 at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.base/java.lang.reflect.Method.invoke(Method.java:566) at 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
 at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
 at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
 at 
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
 at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306) at 
org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
 at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366) at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
 at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
 at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331) at 
org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79) at 
org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329) at 
org.junit.runners.ParentRunner.access$100(ParentRunner.java:66) at 
org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293) at 
org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306) at 
org.junit.runners.ParentRunner.run(ParentRunner.java:413) at 
org.junit.runner.JUnitCore.run(JUnitCore.java:137) at 
com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
 at 
com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33)
 at 
com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:220)
 at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:53)Caused by: 
java.lang.IllegalStateException: FlowFile[244,data.tar,3584B] has already been 
transferred at 
org.apache.nifi.util.MockProcessSession.validateState(MockProcessSession.java:1058)
 at 
org.apache.nifi.util.MockProcessSession.transfer(MockProcessSession.java:832) 
at 
org.apache.nifi.processors.standard.UnpackContent.onTrigger(UnpackContent.java:310)
 at 
org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
 at 
org.apache.nifi.util.StandardProcessorTestRunner$RunProcessor.call(StandardProcessorTestRunner.java:271)
 at 
org.apache.nifi.util.StandardProcessorTestRunner$RunProcessor.call(StandardProcessorTestRunner.java:265)
 at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at 
java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
 at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
 at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
 at java.base/java.lang.Thread.run(Thread.java:834) {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to