You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Andrey Zagrebin (Jira)" <ji...@apache.org> on 2019/11/26 13:57:00 UTC

[jira] [Commented] (FLINK-14894) HybridOffHeapUnsafeMemorySegmentTest#testByteBufferWrap failed on Travis

    [ https://issues.apache.org/jira/browse/FLINK-14894?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16982499#comment-16982499 ] 

Andrey Zagrebin commented on FLINK-14894:
-----------------------------------------

I think this is due to [FLINK-13985|https://jira.apache.org/jira/browse/FLINK-13985], where we decided that we will explicitly release underlying unsafe memory in HybridMemorySegment#free for new unsafe allocations. It looks like 

MemorySegmentTestBase#testByteBufferWrapping explicitly tests the contract that the underlying memory wrapped into a nio ByteBuffer is usable after the segment freeing. This is true for the nio DirectByteBuffer as the wrapping ByteBuffer keeps a strong link to it. So the original memory is not released both explicitly and during GC in this case but this does not hold for the new unsafe allocation after the explicit release.
[~sewen] do you remember why would we need the wraps to be valid after freeing the main segment? do we still need this?

> HybridOffHeapUnsafeMemorySegmentTest#testByteBufferWrap failed on Travis
> ------------------------------------------------------------------------
>
>                 Key: FLINK-14894
>                 URL: https://issues.apache.org/jira/browse/FLINK-14894
>             Project: Flink
>          Issue Type: Bug
>          Components: Tests
>    Affects Versions: 1.10.0
>            Reporter: Gary Yao
>            Priority: Critical
>
> {noformat}
> HybridOffHeapUnsafeMemorySegmentTest>MemorySegmentTestBase.testByteBufferWrapping:2465 expected:<992288337> but was:<196608>
> {noformat}
> https://api.travis-ci.com/v3/job/258950527/log.txt



--
This message was sent by Atlassian Jira
(v8.3.4#803005)