NethermindEth / nethermind

A robust execution client for Ethereum node operators.
https://nethermind.io/nethermind-client
GNU General Public License v3.0
1.19k stars 404 forks source link

`Network.DiagTracerEnabled` does not work properly on master branch #6943

Closed kamilchodola closed 2 months ago

kamilchodola commented 2 months ago

Whenever Network.DiagTracerEnabled is set to true and static peer is configured on Nethermind I'm getting following exception:

2024-04-22 16:18:09.4202|DEBUG|Network.Rlpx.NettyHandshakeHandler|108|Handshake failure in communication with [Node|172.234.229.46:30303||]: System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'ArrayPoolList'.
   at Nethermind.Core.Collections.ArrayPoolList`1.<GuardDispose>g__ThrowObjectDisposed|10_0() in /_/src/Nethermind/Nethermind.Core/Collections/ArrayPoolList.cs:line 68
   at Nethermind.Core.Collections.ArrayPoolList`1.GetEnumerator() in /_/src/Nethermind/Nethermind.Core/Collections/ArrayPoolList.cs:line 53
   at System.String.JoinCore[T](ReadOnlySpan`1 separator, IEnumerable`1 values)
   at Nethermind.Network.P2P.Messages.HelloMessage.ToString() in /_/src/Nethermind/Nethermind.Network/P2P/Messages/HelloMessage.cs:line 21
   at Nethermind.Network.P2P.ProtocolHandlers.ProtocolHandlerBase.Send[T](T message) in /_/src/Nethermind/Nethermind.Network/P2P/ProtocolHandlers/ProtocolHandlerBase.cs:line 82
   at Nethermind.Network.P2P.ProtocolHandlers.P2PProtocolHandler.SendHello() in /_/src/Nethermind/Nethermind.Network/P2P/ProtocolHandlers/P2PProtocolHandler.cs:line 329
   at Nethermind.Network.ProtocolsManager.InitProtocol(ISession session, String protocolCode, Int32 version, Boolean addCapabilities) in /_/src/Nethermind/Nethermind.Network/ProtocolsManager.cs:line 182
   at Nethermind.Network.P2P.Session.Init(Byte p2PVersion, IChannelHandlerContext context, IPacketSender packetSender) in /_/src/Nethermind/Nethermind.Network/P2P/Session.cs:line 288
   at Nethermind.Network.Rlpx.NettyHandshakeHandler.ChannelRead0(IChannelHandlerContext context, IByteBuffer input) in /_/src/Nethermind/Nethermind.Network/Rlpx/NettyHandshakeHandler.cs:line 191
   at DotNetty.Transport.Channels.SimpleChannelInboundHandler`1.ChannelRead(IChannelHandlerContext ctx, Object msg)
   at DotNetty.Transport.Channels.AbstractChannelHandlerContext.InvokeChannelRead(Object msg)

It prevents from connecting to this specific peer and in case of static config I cannot proceed with the sync.

asdacap commented 2 months ago

Fixed by #6912