Issue with BufferOverflowException from logstash agent

Recently during logstash pod startup I've started getting the error trace below. Could you give me a hint where to look for a solution?

ERROR][logstash.agent           ] Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:elastic.logs, :exception=>"Java::JavaNio::BufferOverflowException", :message=>"", :backtrace=>["java.base/java.nio.HeapByteBuffer.put(HeapByteBuffer.java:231)", "org.logstash.common.io.RecordIOReader.getRecord(RecordIOReader.java:267)", "org.logstash.common.io.RecordIOReader.readEvent(RecordIOReader.java:294)", "org.logstash.common.io.RecordIOReader.getSegmentStatus(RecordIOReader.java:386)", "org.logstash.common.io.DeadLetterQueueWriter.cleanupTempFile(DeadLetterQueueWriter.java:546)", "java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)", "java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762)", "org.logstash.common.io.DeadLetterQueueWriter.cleanupTempFiles(DeadLetterQueueWriter.java:533)", "org.logstash.common.io.DeadLetterQueueWriter.<init>(DeadLetterQueueWriter.java:168)", "org.logstash.common.io.DeadLetterQueueWriter$Builder.build(DeadLetterQueueWriter.java:145)", "org.logstash.common.DeadLetterQueueFactory.newWriter(DeadLetterQueueFactory.java:114)", "org.logstash.common.DeadLetterQueueFactory.lambda$getWriter$0(DeadLetterQueueFactory.java:83)", "java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708)", "org.logstash.common.DeadLetterQueueFactory.getWriter(DeadLetterQueueFactory.java:83)", "org.logstash.execution.AbstractPipelineExt.createDeadLetterQueueWriterFromSettings(AbstractPipelineExt.java:299)", "org.logstash.execution.AbstractPipelineExt.dlqWriter(AbstractPipelineExt.java:276)", "org.logstash.execution.JavaBasePipelineExt.initialize(JavaBasePipelineExt.java:82)", "org.logstash.execution.JavaBasePipelineExt$INVOKER$i$1$0$initialize.call(JavaBasePipelineExt$INVOKER$i$1$0$initialize.gen)", "org.jruby.internal.runtime.methods.JavaMethod$JavaMethodN.call(JavaMethod.java:846)", "org.jruby.ir.runtime.IRRuntimeHelpers.instanceSuper(IRRuntimeHelpers.java:1229)", "org.jruby.ir.runtime.IRRuntimeHelpers.instanceSuperSplatArgs(IRRuntimeHelpers.java:1202)", "org.jruby.ir.targets.indy.InstanceSuperInvokeSite.invoke(InstanceSuperInvokeSite.java:29)", "usr.share.logstash.logstash_minus_core.lib.logstash.java_pipeline.RUBY$method$initialize$0(/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:48)", "org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:139)", "org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:112)", "org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:329)", "org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:87)", "org.jruby.RubyClass.newInstance(RubyClass.java:911)", "org.jruby.RubyClass$INVOKER$i$newInstance.call(RubyClass$INVOKER$i$newInstance.gen)", "org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:329)", "org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:87)", "org.jruby.ir.instructions.CallBase.interpret(CallBase.java:549)", "org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361)", "org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)", "org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:128)", "org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:115)", "org.jruby.ir.targets.indy.InvokeSite.invoke(InvokeSite.java:208)", "usr.share.logstash.logstash_minus_core.lib.logstash.agent.RUBY$block$converge_state$2(/usr/share/logstash/logstash-core/lib/logstash/agent.rb:386)", "org.jruby.runtime.CompiledIRBlockBody.callDirect(CompiledIRBlockBody.java:141)", "org.jruby.runtime.IRBlockBody.call(IRBlockBody.java:64)", "org.jruby.runtime.IRBlockBody.call(IRBlockBody.java:58)", "org.jruby.runtime.Block.call(Block.java:143)", "org.jruby.RubyProc.call(RubyProc.java:309)", "org.jruby.internal.runtime.RubyRunnable.run(RubyRunnable.java:107)", "java.base/java.lang.Thread.run(Thread.java:833)"]}