[
https://issues.apache.org/jira/browse/FLINK-15905?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Till Rohrmann updated FLINK-15905:
----------------------------------
Priority: Blocker (was: Critical)
> Fix Race Condition when releasing shared memory resource
> --------------------------------------------------------
>
> Key: FLINK-15905
> URL: https://issues.apache.org/jira/browse/FLINK-15905
> Project: Flink
> Issue Type: Bug
> Components: Runtime / Task
> Reporter: Stephan Ewen
> Assignee: Stephan Ewen
> Priority: Blocker
> Labels: pull-request-available
> Fix For: 1.10.0
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> There is a race condition around releasing an {{OpaqueMemoryResource}}
> obtained via {{MemoryManager.getSharedMemoryResourceForManagedMemory}}.
> {code}
> final boolean allDisposed = sharedResources.release(type, leaseHolder);
> if (allDisposed) {
> releaseMemory(type, MemoryType.OFF_HEAP, size);
> }
> {code}
> If another allocation occurs while the releasing thread is between the
> "sharedResources.release"and the "if block", then there is no resource to
> pick up any more and memory has not yet been returned to the memory
> bookkeeping.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)