dataengref errors

Home / Flink / Network and heartbeats

Flink: IllegalStateException: Buffer pool is destroyed

java.lang.IllegalStateExceptionBuffer pool is destroyed.

A task tried to request a network buffer after its buffer pool was released, which happens while the task is being cancelled. This exception is almost always a follow-up error: look for the first exception that made the job fail or restart.

Causes · Fixes · Source

Common causes

  1. Another task failed and the job is cancelling all tasks; operators still emitting records hit the released pool.How to confirm: Sort the exceptions in the Web UI "Exceptions" tab by time; the root cause appears before this one.
  2. A user function keeps emitting records from a separate thread after the task was cancelled.How to confirm: The stack trace shows a user thread, not the task thread, calling collect().

How to fix it

Fix the root-cause exception that triggered the cancellation. This message itself needs no change.

If you emit records from your own threads, stop those threads in close() or cancel() before the task finishes.

Where the message comes from

References

Related errors

Last checked: