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

flink throws `NullPointerException` when executeCheckpointing

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Invalid
    • 1.10.0, 1.10.1
    • 1.10.3, 1.11.3, 1.12.0
    • None
    • 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

              Unassigned Unassigned
              yuchuanchen Kai Chen
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: