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

Yun Tang commented on FLINK-18204:
----------------------------------

[~shengsheng]

After digging into the code and I think [this 
line|https://github.com/apache/flink/blob/b8647b1ca019003ae939b7494bba4e54de167b6f/flink-runtime/src/main/java/org/apache/flink/runtime/state/heap/AbstractHeapPriorityQueue.java#L117]
 called by 
[HeapPriorityQueueSnapshotRestoreWrapper|https://github.com/apache/flink/blob/b8647b1ca019003ae939b7494bba4e54de167b6f/flink-runtime/src/main/java/org/apache/flink/runtime/state/heap/HeapPriorityQueueSnapshotRestoreWrapper.java#L70]
 might be the only place to lead this bug (although should not happen).
 If this bug could be reproduced in your scenario, would you please modify 
Flink related code to add more logs (e.g. {{out.length}}, {{size}} and 
{{queue}} content}) to see why this could happen.

> NullPointerException when  materialize checkpoint
> -------------------------------------------------
>
>                 Key: FLINK-18204
>                 URL: https://issues.apache.org/jira/browse/FLINK-18204
>             Project: Flink
>          Issue Type: Bug
>          Components: Runtime / State Backends
>    Affects Versions: 1.6.3
>            Reporter: shengsheng lin
>            Priority: Major
>
> Caused by: java.lang.Exception: Could not materialize checkpoint 3398 for 
> operator SelectCepOperator -> Map -> Sink: Unnamed (1/12).
>  at 
> org.apache.flink.streaming.runtime.tasks.StreamTask$AsyncCheckpointRunnable.handleExecutionException(StreamTask.java:942)
>  ... 6 more
> Caused by: java.util.concurrent.ExecutionException: 
> java.lang.NullPointerException
>  at java.util.concurrent.FutureTask.report(FutureTask.java:122)
>  at java.util.concurrent.FutureTask.get(FutureTask.java:192)
>  at org.apache.flink.util.FutureUtil.runIfNotDoneAndGet(FutureUtil.java:53)
>  at 
> org.apache.flink.streaming.api.operators.OperatorSnapshotFinalizer.<init>(OperatorSnapshotFinalizer.java:47)
>  at 
> org.apache.flink.streaming.runtime.tasks.StreamTask$AsyncCheckpointRunnable.run(StreamTask.java:853)
>  ... 5 more
> Caused by: java.lang.NullPointerException
>  at 
> org.apache.flink.runtime.state.KeyExtractorFunction$1.extractKeyFromElement(KeyExtractorFunction.java:35)
>  at 
> org.apache.flink.runtime.state.KeyExtractorFunction$1.extractKeyFromElement(KeyExtractorFunction.java:31)
>  at 
> org.apache.flink.runtime.state.KeyGroupPartitioner.reportAllElementKeyGroups(KeyGroupPartitioner.java:153)
>  at 
> org.apache.flink.runtime.state.KeyGroupPartitioner.partitionByKeyGroup(KeyGroupPartitioner.java:137)
>  at 
> org.apache.flink.runtime.state.heap.HeapPriorityQueueStateSnapshot.getKeyGroupWriter(HeapPriorityQueueStateSnapshot.java:103)
>  at 
> org.apache.flink.runtime.state.heap.HeapKeyedStateBackend$HeapSnapshotStrategy$1.performOperation(HeapKeyedStateBackend.java:814)
>  at 
> org.apache.flink.runtime.state.heap.HeapKeyedStateBackend$HeapSnapshotStrategy$1.performOperation(HeapKeyedStateBackend.java:759)
>  at 
> org.apache.flink.runtime.io.async.AbstractAsyncCallableWithResources.call(AbstractAsyncCallableWithResources.java:75)
>  at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>  at org.apache.flink.util.FutureUtil.runIfNotDoneAndGet(FutureUtil.java:50)
>  ... 7 more



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

Reply via email to