Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

io.libp2p.core.Libp2pException: Overflowed send buffer for connection (Yamux) #311

Open
StefanBratanov opened this issue Aug 23, 2023 · 1 comment

Comments

@StefanBratanov
Copy link
Collaborator

StefanBratanov commented Aug 23, 2023

Testing yamux functionality in Teku and getting errors such as below. Also attached the whole log file: teku-yamux.log

2023-08-23T07:51:34,235 ERROR - Failed to process blocks by range request
 java.util.concurrent.CompletionException: io.libp2p.core.Libp2pException: Overflowed send buffer for connection
	at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:332)
	at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:347)
	at java.base/java.util.concurrent.CompletableFuture$UniRun.tryFire(CompletableFuture.java:781)
	at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510)
	at java.base/java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:2162)
	at tech.pegasys.teku.networking.p2p.libp2p.rpc.LibP2PRpcStream.lambda$toSafeFuture$1(LibP2PRpcStream.java:72)
	at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:590)
	at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:557)
	at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:492)
	at io.netty.util.concurrent.DefaultPromise.setValue0(DefaultPromise.java:636)
	at io.netty.util.concurrent.DefaultPromise.setFailure0(DefaultPromise.java:629)
	at io.netty.util.concurrent.DefaultPromise.tryFailure(DefaultPromise.java:118)
	at io.netty.util.internal.PromiseNotificationUtil.tryFailure(PromiseNotificationUtil.java:64)
	at io.netty.channel.ChannelOutboundBuffer.safeFail(ChannelOutboundBuffer.java:733)
	at io.netty.channel.ChannelOutboundBuffer.remove0(ChannelOutboundBuffer.java:318)
	at io.netty.channel.ChannelOutboundBuffer.remove(ChannelOutboundBuffer.java:298)
	at io.libp2p.etc.util.netty.mux.MuxChannel.doWrite(MuxChannel.kt:49)
	at io.netty.channel.AbstractChannel$AbstractUnsafe.flush0(AbstractChannel.java:931)
	at io.netty.channel.AbstractChannel$AbstractUnsafe.flush(AbstractChannel.java:895)
	at io.netty.channel.DefaultChannelPipeline$HeadContext.flush(DefaultChannelPipeline.java:1372)
	at io.netty.channel.AbstractChannelHandlerContext.invokeFlush0(AbstractChannelHandlerContext.java:921)
	at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:941)
	at io.netty.channel.AbstractChannelHandlerContext$WriteTask.run(AbstractChannelHandlerContext.java:1247)
	at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174)
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167)
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569)
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: io.libp2p.core.Libp2pException: Overflowed send buffer for connection
	at io.libp2p.mux.yamux.YamuxHandler.onChildWrite(YamuxHandler.kt:157)
	at io.libp2p.mux.yamux.YamuxHandler.onChildWrite(YamuxHandler.kt:23)
	at io.libp2p.etc.util.netty.mux.MuxChannel.doWrite(MuxChannel.kt:46)
	... 14 more
2023-08-23T07:51:34,236 WARN - Spec failed for nioEventLoopGroup-3-8: java.lang.IllegalArgumentException: minimumReadableBytes : -52227 (expected: >= 0)
 java.lang.IllegalArgumentException: minimumReadableBytes : -52227 (expected: >= 0)
	at io.netty.util.internal.ObjectUtil.checkPositiveOrZero(ObjectUtil.java:144)
	at io.netty.buffer.AbstractByteBuf.checkReadableBytes(AbstractByteBuf.java:1428)
	at io.netty.buffer.AbstractByteBuf.readSlice(AbstractByteBuf.java:879)
	at io.libp2p.mux.yamux.YamuxHandler$SendBuffer.flush(YamuxHandler.kt:56)
	at io.libp2p.mux.yamux.YamuxHandler.onLocalDisconnect(YamuxHandler.kt:194)
	at io.libp2p.etc.util.netty.mux.AbstractMuxHandler.localDisconnect(AbstractMuxHandler.kt:109)
	at io.libp2p.etc.util.netty.mux.MuxChannel.doDisconnect(MuxChannel.kt:56)
	at io.netty.channel.AbstractChannel$AbstractUnsafe.disconnect(AbstractChannel.java:591)
	at io.netty.channel.DefaultChannelPipeline$HeadContext.disconnect(DefaultChannelPipeline.java:1347)
	at io.netty.channel.AbstractChannelHandlerContext.invokeDisconnect(AbstractChannelHandlerContext.java:703)
	at io.netty.channel.AbstractChannelHandlerContext.disconnect(AbstractChannelHandlerContext.java:682)
	at io.netty.channel.AbstractChannelHandlerContext.disconnect(AbstractChannelHandlerContext.java:555)
	at io.netty.channel.DefaultChannelPipeline.disconnect(DefaultChannelPipeline.java:952)
	at io.netty.channel.AbstractChannel.disconnect(AbstractChannel.java:239)
	at tech.pegasys.teku.networking.p2p.libp2p.rpc.LibP2PRpcStream.closeWriteStream(LibP2PRpcStream.java:62)
	at tech.pegasys.teku.networking.eth2.rpc.core.RpcResponseCallback.completeWithErrorResponse(RpcResponseCallback.java:73)
	at tech.pegasys.teku.networking.eth2.rpc.core.RpcResponseCallback.completeWithUnexpectedError(RpcResponseCallback.java:83)
	at tech.pegasys.teku.networking.eth2.rpc.beaconchain.methods.BeaconBlocksByRangeMessageHandler.lambda$onIncomingMessage$1(BeaconBlocksByRangeMessageHandler.java:157)
	at tech.pegasys.teku.infrastructure.async.SafeFuture.lambda$finish$29(SafeFuture.java:363)
	at java.base/java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:934)
	at java.base/java.util.concurrent.CompletableFuture$UniHandle.tryFire(CompletableFuture.java:911)
	at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510)
	at java.base/java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:2162)
	at tech.pegasys.teku.networking.p2p.libp2p.rpc.LibP2PRpcStream.lambda$toSafeFuture$1(LibP2PRpcStream.java:72)
	at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:590)
	at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:557)
	at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:492)
	at io.netty.util.concurrent.DefaultPromise.setValue0(DefaultPromise.java:636)
	at io.netty.util.concurrent.DefaultPromise.setFailure0(DefaultPromise.java:629)
	at io.netty.util.concurrent.DefaultPromise.tryFailure(DefaultPromise.java:118)
	at io.netty.util.internal.PromiseNotificationUtil.tryFailure(PromiseNotificationUtil.java:64)
	at io.netty.channel.ChannelOutboundBuffer.safeFail(ChannelOutboundBuffer.java:733)
	at io.netty.channel.ChannelOutboundBuffer.remove0(ChannelOutboundBuffer.java:318)
	at io.netty.channel.ChannelOutboundBuffer.remove(ChannelOutboundBuffer.java:298)
	at io.libp2p.etc.util.netty.mux.MuxChannel.doWrite(MuxChannel.kt:49)
	at io.netty.channel.AbstractChannel$AbstractUnsafe.flush0(AbstractChannel.java:931)
	at io.netty.channel.AbstractChannel$AbstractUnsafe.flush(AbstractChannel.java:895)
	at io.netty.channel.DefaultChannelPipeline$HeadContext.flush(DefaultChannelPipeline.java:1372)
	at io.netty.channel.AbstractChannelHandlerContext.invokeFlush0(AbstractChannelHandlerContext.java:921)
	at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:941)
	at io.netty.channel.AbstractChannelHandlerContext$WriteTask.run(AbstractChannelHandlerContext.java:1247)
	at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174)
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167)
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569)
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:833)
2023-08-23T07:51:34,236 ERROR - PLEASE FIX OR REPORT | Unexpected exception thrown for nioEventLoopGroup-3-8
 io.libp2p.core.ConnectionClosedException: The stream was closed for writing locally: 02424efffe0a7c8a-0013f6e8-0000006b-e41ac50f19ec4b88-e15df745/9/false
	at io.libp2p.etc.util.netty.mux.MuxChannel.doWrite(MuxChannel.kt:40)
	at io.netty.channel.AbstractChannel$AbstractUnsafe.flush0(AbstractChannel.java:931)
	at io.netty.channel.AbstractChannel$AbstractUnsafe.flush(AbstractChannel.java:895)
	at io.netty.channel.DefaultChannelPipeline$HeadContext.flush(DefaultChannelPipeline.java:1372)
	at io.netty.channel.AbstractChannelHandlerContext.invokeFlush0(AbstractChannelHandlerContext.java:921)
	at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:941)
	at io.netty.channel.AbstractChannelHandlerContext$WriteTask.run(AbstractChannelHandlerContext.java:1247)
	at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174)
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167)
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569)
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:833)
@StefanBratanov
Copy link
Collaborator Author

StefanBratanov commented Aug 30, 2023

teku-yamux-debug.log
Debug logs enabled also with --Xlog-wire-mux-enabled. Error is on line 7564.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant