Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-35438

SourceCoordinatorTest.testErrorThrownFromSplitEnumerator fails on wrong error

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • 1.18.2
    • None
    • None

    Description

      We expect to see an artificial Error("Test Error") being reported in the test as the cause of a job failure, but the reported job failure is null:

      Error: 02:32:31 02:32:31.950 [ERROR] Tests run: 18, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.187 s <<< FAILURE! - in org.apache.flink.runtime.source.coordinator.SourceCoordinatorTest
      Error: 02:32:31 02:32:31.950 [ERROR] org.apache.flink.runtime.source.coordinator.SourceCoordinatorTest.testErrorThrownFromSplitEnumerator  Time elapsed: 0.01 s  <<< FAILURE!
      May 23 02:32:31 org.opentest4j.AssertionFailedError: 
      May 23 02:32:31 
      May 23 02:32:31 expected: 
      May 23 02:32:31   java.lang.Error: Test Error
      May 23 02:32:31   	at org.apache.flink.runtime.source.coordinator.SourceCoordinatorTest.testErrorThrownFromSplitEnumerator(SourceCoordinatorTest.java:296)
      May 23 02:32:31   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      May 23 02:32:31   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      May 23 02:32:31   	...(57 remaining lines not displayed - this can be changed with Assertions.setMaxStackTraceElementsDisplayed)
      May 23 02:32:31  but was: 
      May 23 02:32:31   null
      May 23 02:32:31 	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      May 23 02:32:31 	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      May 23 02:32:31 	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      May 23 02:32:31 	at org.apache.flink.runtime.source.coordinator.SourceCoordinatorTest.testErrorThrownFromSplitEnumerator(SourceCoordinatorTest.java:322)
      May 23 02:32:31 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      May 23 02:32:31 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      May 23 02:32:31 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      May 23 02:32:31 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
      May 23 02:32:31 	at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:727)
      May 23 02:32:31 	at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
      May 23 02:32:31 	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
      May 23 02:32:31 	at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:156)
      May 23 02:32:31 	at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:147)
      May 23 02:32:31 	at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:86)
      May 23 02:32:31 	at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:103)
      May 23 02:32:31 	at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:93)
      May 23 02:32:31 	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
      May 23 02:32:31 	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
      May 23 02:32:31 	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
      May 23 02:32:31 	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
      May 23 02:32:31 	at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:92)
      May 23 02:32:31 	at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:86)
      

      This looks like it's a multithreading error with the test MockOperatorCoordinatorContext, perhaps where isJobFailure can return true before the reason has been populated. I couldn't reproduce it after running it 1M times.

      Attachments

        Activity

          People

            Unassigned Unassigned
            rskraba Ryan Skraba
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: