[
https://issues.apache.org/jira/browse/FLINK-2076?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14566148#comment-14566148
]
ASF GitHub Bot commented on FLINK-2076:
---------------------------------------
GitHub user chiwanpark opened a pull request:
https://github.com/apache/flink/pull/751
[FLINK-2076] [runtime] Fix memory leakage in MutableHashTable
Hi. This PR contains a bug fix for
[FLINK-2076](https://issues.apache.org/jira/browse/FLINK-2076).
When `prepareNextPartition` method runs with some pending partitions, the
memory leakage can occur at `memory.add(getNextBuffer())` statement (Line 515,
516). In common case, there are extra memory spaces for hash table so first and
second call of `getNextBuffer()` return memory segment.
But in extreme case such as a case described in JIRA, the second call of
`getNextBuffer()` can return null and this null makes the memory leakage.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/chiwanpark/flink FLINK-2076
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/751.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #751
----
commit e9aa4d9a1ca36178f3f860b1997d5f92ada51c3f
Author: Chiwan Park <[email protected]>
Date: 2015-05-30T18:27:17Z
[FLINK-2076] [runtime] Fix memory leakage in MutableHashTable
----
> Bug in re-openable hash join
> ----------------------------
>
> Key: FLINK-2076
> URL: https://issues.apache.org/jira/browse/FLINK-2076
> Project: Flink
> Issue Type: Bug
> Components: Local Runtime
> Affects Versions: 0.9
> Reporter: Stephan Ewen
> Assignee: Chiwan Park
>
> It happens deterministically in my machine with the following setup:
> TaskManager:
> - heap size: 512m
> - network buffers: 4096
> - slots: 32
> Job:
> - ConnectedComponents
> - 100k vertices
> - 1.2m edges
> --> this gives around 260 m Flink managed memory, across 32 slots is 8MB per
> slot, with several mem consumers in the job, makes the iterative hash join
> out-of-core
> {code}
> java.lang.RuntimeException: Hash Join bug in memory management:
> Memory buffers leaked.
> at
> org.apache.flink.runtime.operators.hash.MutableHashTable.buildTableFromSpilledPartition(MutableHashTable.java:733)
> at
> org.apache.flink.runtime.operators.hash.MutableHashTable.prepareNextPartition(MutableHashTable.java:508)
> at
> org.apache.flink.runtime.operators.hash.ReOpenableMutableHashTable.prepareNextPartition(ReOpenableMutableHashTable.java:167)
> at
> org.apache.flink.runtime.operators.hash.MutableHashTable.nextRecord(MutableHashTable.java:541)
> at
> org.apache.flink.runtime.operators.hash.NonReusingBuildSecondHashMatchIterator.callWithNextKey(NonReusingBuildSecondHashMatchIterator.java:102)
> at
> org.apache.flink.runtime.operators.AbstractCachedBuildSideMatchDriver.run(AbstractCachedBuildSideMatchDriver.java:155)
> at
> org.apache.flink.runtime.operators.RegularPactTask.run(RegularPactTask.java:496)
> at
> org.apache.flink.runtime.iterative.task.AbstractIterativePactTask.run(AbstractIterativePactTask.java:139)
> at
> org.apache.flink.runtime.iterative.task.IterationIntermediatePactTask.run(IterationIntermediatePactTask.java:92)
> at
> org.apache.flink.runtime.operators.RegularPactTask.invoke(RegularPactTask.java:362)
> at org.apache.flink.runtime.taskmanager.Task.run(Task.java:560)
> at java.lang.Thread.run(Thread.java:745)
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)