BufferUnderflowException in Streams application and shuts down

73 views
Skip to first unread message

Ranjith ramachandran

unread,
Mar 11, 2021, 12:04:59 AM3/11/21
to Confluent Platform
Our streams are occasionally getting closed with an exception like
:[-StreamThread-1] org.apache.kafka.streams.KafkaStreams : stream-client [alarms-HIGH] All stream threads have died. The instance will be in error state and should be closed.
Exception in thread "alarms-HIGH-StreamThread-1" java.nio.BufferUnderflowException
at java.base/java.nio.HeapByteBuffer.get(Unknown Source)
at java.base/java.nio.ByteBuffer.get(Unknown Source)
at org.apache.kafka.streams.state.internals.BufferValue.extractValue(BufferValue.java:94)
at org.apache.kafka.streams.state.internals.BufferValue.deserialize(BufferValue.java:83)
at org.apache.kafka.streams.state.internals.InMemoryTimeOrderedKeyValueBuffer.restoreBatch(InMemoryTimeOrderedKeyValueBuffer.java:347)
at org.apache.kafka.streams.processor.internals.CompositeRestoreListener.restoreBatch(CompositeRestoreListener.java:89)
at org.apache.kafka.streams.processor.internals.StateRestorer.restore(StateRestorer.java:92)
at org.apache.kafka.streams.processor.internals.StoreChangelogReader.processNext(StoreChangelogReader.java:349)
at org.apache.kafka.streams.processor.internals.StoreChangelogReader.restore(StoreChangelogReader.java:93)
at org.apache.kafka.streams.processor.internals.TaskManager.updateNewAndRestoringTasks(TaskManager.java:389)
at org.apache.kafka.streams.processor.internals.StreamThread.runOnce(StreamThread.java:769)
at org.apache.kafka.streams.processor.internals.StreamThread.runLoop(StreamThread.java:698)
at org.apache.kafka.streams.processor.internals.StreamThread.run(StreamThread.java:671)

(This is Spring boot 2.2.5, Spring kafka 2.3.6)Is this a memory related error ?Anyone aware if there is a way to recover from this error?

Matthias J. Sax

unread,
Mar 11, 2021, 7:44:39 PM3/11/21
to confluent...@googlegroups.com
Sounds like https://issues.apache.org/jira/browse/KAFKA-10173 that is
already fixed in newer versions.


-Matthias
> --
> You received this message because you are subscribed to the Google
> Groups "Confluent Platform" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to confluent-platf...@googlegroups.com
> <mailto:confluent-platf...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/confluent-platform/66a96960-316b-4b12-a751-596a0174088cn%40googlegroups.com
> <https://groups.google.com/d/msgid/confluent-platform/66a96960-316b-4b12-a751-596a0174088cn%40googlegroups.com?utm_medium=email&utm_source=footer>.
Reply all
Reply to author
Forward
0 new messages