flink-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Yao (JIRA)" <j...@apache.org>
Subject [jira] [Created] (FLINK-8040) Test instability ResourceGuard#testCloseBlockIfAcquired
Date Thu, 09 Nov 2017 13:37:00 GMT
Gary Yao created FLINK-8040:
-------------------------------

             Summary: Test instability ResourceGuard#testCloseBlockIfAcquired
                 Key: FLINK-8040
                 URL: https://issues.apache.org/jira/browse/FLINK-8040
             Project: Flink
          Issue Type: Bug
          Components: Core, Tests
    Affects Versions: 1.4.0, 1.5.0
            Reporter: Gary Yao
             Fix For: 1.4.0, 1.5.0


Test {{ResourceGuard#testCloseBlockIfAcquired()}} fails sporadically with 
{noformat}
java.io.IOException: Resource guard was already closed.

	at org.apache.flink.util.ResourceGuard.acquireResource(ResourceGuard.java:72)
	at org.apache.flink.util.ResourceGuardTest.testCloseBlockIfAcquired(ResourceGuardTest.java:74)
	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:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
{noformat}

*How to reproduce*
Run the test with a high number of iterations.
To further provoke the failure, add {{Thread.sleep(100)}} before the following line
{code}
ResourceGuard.Lease lease_2 = resourceGuard.acquireResource();
{code}

This will more likely result in {{closed}} being {{true}} at the time the 2nd lease is acquired,
and and exception is thrown:
{code}
	if (closed) {
		throw new IOException("Resource guard was already closed.");
	}
{code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message