[
https://issues.apache.org/jira/browse/FLINK-10524?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16646097#comment-16646097
]
ASF GitHub Bot commented on FLINK-10524:
----------------------------------------
tillrohrmann opened a new pull request #6821: [FLINK-10524] Retry
MemoryManager#release if NoSuchElementException
URL: https://github.com/apache/flink/pull/6821
## What is the purpose of the change
The MemoryManager#release method retries in case of
ConcurrentModificationExceptions because
memory can be released concurrently. In case of concurrent releases we can
also see a
NoSuchElementException if we are in the ArrayList.Itr#next call past the
concurrent modification
check and try to access, for example, an index which is exceeding the
ArrayList's size. Thus,
we should also retry on seeing a NoSuchElementException because it indicates
a concurrent
modification.
## Verifying this change
- Covered by
`MemoryManagerConcurrentModReleaseTest.testConcurrentModificationWhileReleasing`
## Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): (no)
- The public API, i.e., is any changed class annotated with
`@Public(Evolving)`: (no)
- The serializers: (no)
- The runtime per-record code paths (performance sensitive): (no)
- Anything that affects deployment or recovery: JobManager (and its
components), Checkpointing, Yarn/Mesos, ZooKeeper: (no)
- The S3 file system connector: (no)
## Documentation
- Does this pull request introduce a new feature? (no)
- If yes, how is the feature documented? (not applicable)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> MemoryManagerConcurrentModReleaseTest.testConcurrentModificationWhileReleasing
> failed on travis
> -----------------------------------------------------------------------------------------------
>
> Key: FLINK-10524
> URL: https://issues.apache.org/jira/browse/FLINK-10524
> Project: Flink
> Issue Type: Bug
> Components: Distributed Coordination, Tests
> Affects Versions: 1.6.1
> Reporter: Chesnay Schepler
> Assignee: Till Rohrmann
> Priority: Critical
> Labels: pull-request-available, test-stability
> Fix For: 1.7.0, 1.6.2, 1.5.5
>
>
> {{MemoryManagerConcurrentModReleaseTest.testConcurrentModificationWhileReleasing}}
> failed on Travis.
> [https://travis-ci.org/zentol/flink/jobs/439591249]
>
> {code:java}
> Running org.apache.flink.runtime.heartbeat.HeartbeatManagerTest
> java.util.NoSuchElementException
> at java.util.ArrayList$Itr.next(ArrayList.java:860)
> at
> org.apache.flink.runtime.memory.MemoryManager.release(MemoryManager.java:415)
> at
> org.apache.flink.runtime.memory.MemoryManagerConcurrentModReleaseTest.testConcurrentModificationWhileReleasing(MemoryManagerConcurrentModReleaseTest.java:76)
> 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.runners.ParentRunner.runLeaf(ParentRunner.java:325)
> at
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
> at
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
> at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
> at
> org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:283)
> at
> org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:173)
> at
> org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
> at
> org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:128)
> at
> org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)
> at
> org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
> at
> org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
> Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.065 sec <<<
> FAILURE! - in
> org.apache.flink.runtime.memory.MemoryManagerConcurrentModReleaseTest
> testConcurrentModificationWhileReleasing(org.apache.flink.runtime.memory.MemoryManagerConcurrentModReleaseTest)
> Time elapsed: 0.977 sec <<< FAILURE!
> java.lang.AssertionError: null
> at org.junit.Assert.fail(Assert.java:86)
> at
> org.apache.flink.runtime.memory.MemoryManagerConcurrentModReleaseTest.testConcurrentModificationWhileReleasing(MemoryManagerConcurrentModReleaseTest.java:86){code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)