[ https://issues.apache.org/jira/browse/FLINK-13702?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16962953#comment-16962953 ]
Jark Wu commented on FLINK-13702: --------------------------------- Hi [~dwysakowicz], thanks for looking into this. However, I think they will be called by different threads. I think the root cause is the same with FLINK-13740. The reason is that the async snapshot thread (e.g. snapshot the heap CopyOnWriteStateMap to disk) and the process element thread are concurrent. The former one will call {{TypeSerializer#serialize()}}, and the latter one will call {{TypeSerializer#duplicate()}} (when the state entry is in snapshoting) on the same object. I think that's why {{SerializerTestBase#testDuplicate()}} is added, and that's why {{LazyBinaryFormat#ensureMaterialized}} will be called concurrently. So a simple way to fix this is adding synchronize to {{ensureMaterialized}}, but I'm not sure how much the performance impact is. > BaseMapSerializerTest.testDuplicate fails on Travis > --------------------------------------------------- > > Key: FLINK-13702 > URL: https://issues.apache.org/jira/browse/FLINK-13702 > Project: Flink > Issue Type: Bug > Components: Table SQL / Planner > Affects Versions: 1.10.0 > Reporter: Till Rohrmann > Assignee: Dawid Wysakowicz > Priority: Critical > Labels: test-stability > > The {{BaseMapSerializerTest.testDuplicate}} fails on Travis with an > {{java.lang.IndexOutOfBoundsException}}. > https://api.travis-ci.org/v3/job/570973199/log.txt -- This message was sent by Atlassian Jira (v8.3.4#803005)