Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-18196

flink throws `NullPointerException` when executeCheckpointing

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Invalid
    • Affects Version/s: 1.10.0, 1.10.1
    • Fix Version/s: 1.10.3, 1.11.3, 1.12.0
    • Labels:
      None
    • Environment:

      flink version: flink-1.10.0 flink-1.10.1
      jdk version: jdk1.8.0_40

      Description

      I meet checkpoint NPE when executing wordcount example:

      java.lang.Exception: Could not perform checkpoint 5505 for operator Source: KafkaTableSource(xxx) > SourceConversion(table=[xxx, source: [KafkaTableSource(xxx)]], fields=[xxx]) > Calc(select=[xxx) AS xxx]) > SinkConversionToTuple2  --  > Sink: Elasticsearch6UpsertTableSink(xxx) (1/1).

          at org.apache.flink.streaming.runtime.tasks.StreamTask.triggerCheckpoint(StreamTask.java:802)

          at org.apache.flink.streaming.runtime.tasks.StreamTask.lambda$triggerCheckpointAsync$3(StreamTask.java:777)

          at org.apache.flink.streaming.runtime.tasks.StreamTask$$Lambda$228/1024478318.call(Unknown Source)

          at java.util.concurrent.FutureTask.run(FutureTask.java:266)

          at org.apache.flink.streaming.runtime.tasks.StreamTaskActionExecutor$SynchronizedStreamTaskActionExecutor.run(StreamTaskActionExecutor.java:87)

          at org.apache.flink.streaming.runtime.tasks.mailbox.Mail.run(Mail.java:78)

          at org.apache.flink.streaming.runtime.tasks.mailbox.MailboxProcessor.processMail(MailboxProcessor.java:261)

          at org.apache.flink.streaming.runtime.tasks.mailbox.MailboxProcessor.runMailboxLoop(MailboxProcessor.java:186)

          at org.apache.flink.streaming.runtime.tasks.StreamTask.runMailboxLoop(StreamTask.java:487)

          at org.apache.flink.streaming.runtime.tasks.StreamTask.invoke(StreamTask.java:470)

          at org.apache.flink.runtime.taskmanager.Task.doRun(Task.java:707)

          at org.apache.flink.runtime.taskmanager.Task.run(Task.java:532)

          at java.lang.Thread.run(Thread.java:745)

      Caused by: java.lang.NullPointerException

          at org.apache.flink.streaming.runtime.tasks.StreamTask$CheckpointingOperation.executeCheckpointing(StreamTask.java:1411)

          at org.apache.flink.streaming.runtime.tasks.StreamTask.checkpointState(StreamTask.java:991)

          at org.apache.flink.streaming.runtime.tasks.StreamTask.lambda$performCheckpoint$5(StreamTask.java:887)

          at org.apache.flink.streaming.runtime.tasks.StreamTask$$Lambda$229/1010499540.run(Unknown Source)

          at org.apache.flink.streaming.runtime.tasks.StreamTaskActionExecutor$SynchronizedStreamTaskActionExecutor.runThrowing(StreamTaskActionExecutor.java:94)

          at org.apache.flink.streaming.runtime.tasks.StreamTask.performCheckpoint(StreamTask.java:860)

          at org.apache.flink.streaming.runtime.tasks.StreamTask.triggerCheckpoint(StreamTask.java:793)

          ... 12 more

       

      checkpoint configuration

      Checkpointing Mode Exactly Once
      Interval 5s
      Timeout 10m 0s
      Minimum Pause Between Checkpoints 0ms
      Maximum Concurrent Checkpoints 1

      With debug enabled, I found `checkpointMetaData`  is null at

       https://github.com/apache/flink/blob/release-1.10.0/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTask.java#L1421

       

      I fixed this with this patch: https://github.com/yuchuanchen/flink/commit/e5122d9787be1fee9bce141887e0d70c9b0a4f19

        Attachments

        Issue Links

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              yuchuanchen Kai Chen

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment