Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#984 closed defect (fixed)

[I2P 0.9.7-4] klomp.snark.ConnectionAcceptor: Error while accepting

Reported by: guest Owned by:
Priority: minor Milestone: 0.9.8
Component: streaming Version: 0.9.7
Keywords: Cc: zab@…
Parent Tickets:

Description (last modified by zzz)

Java version: Oracle Corporation 1.8.0-ea (Java(TM) SE Runtime Environment 1.8.0-ea-b36e)
Wrapper version: 3.5.17
Server version: 7.6.11.v20130520
Servlet version: Jasper JSP 2.1 Engine
Platform: Linux arm 3.6.11+
Processor: uninitialized (arm)
Jbigi: Locally optimized native BigInteger library loaded from file
Encoding: UTF-8
Charset: UTF-8

Above version output is post-downgrade, I was not able to get the output from -4 dev build due to the instability in my case.
I am using 0.9.7-4 (I am not running IPv6 nor is it enabled); due to the below errors, I am unable to continue running the dev build (-4).
Torrent speed dropped to "0Bps" for down/up. Not sure if related: my console keeps dying, all client tunnels drop after 10-20 minutes into router run.
No other errors are shown in /logs, I feel lucky to have gotten the Snark error below as otherwise, I'd have no evidence of my problem (it may not even be related).

Thanks.

20/07/13 23:06:46 ERROR [ark acceptor] klomp.snark.ConnectionAcceptor: Error while accepting
net.i2p.I2PException: destroyed
	at net.i2p.client.streaming.I2PSocketManagerFull.verifySession(I2PSocketManagerFull.java:207)
	at net.i2p.client.streaming.I2PSocketManagerFull.receiveSocket(I2PSocketManagerFull.java:127)
	at net.i2p.client.streaming.I2PServerSocketFull.accept(I2PServerSocketFull.java:26)
	at org.klomp.snark.ConnectionAcceptor.run(ConnectionAcceptor.java:152)
	at java.lang.Thread.run(Thread.java:722)
	at net.i2p.util.I2PThread.run(I2PThread.java:85)

Subtickets

Change History (14)

comment:1 Changed 6 years ago by guest

I was also running with the following option in wrapper.config:
wrapper.java.additional.5=-Di2p.streaming.initialRTO=9000

comment:2 follow-up: Changed 6 years ago by zzz

  • Description modified (diff)

please describe "instability" or symptoms when running -4

comment:3 Changed 6 years ago by zzz

verified snark fails to start if I2CP log level is WARN, NPE to be fixed in -5. Haven't seen error in OP, no ideas, except possible transient at shutdown.

comment:4 in reply to: ↑ 2 ; follow-up: Changed 6 years ago by guest

Replying to zzz:

please describe "instability" or symptoms when running -4

It can run for up to 20 minutes until all of the client tunnels begin to break and the CPU/RAM becomes stuck at a certain point - the whole JVM seems to die(I could be wrong on this, maybe it just is not changing much). I've no idea if this is exclusive to -4 but it has not occurred with 0.9.7 (or 0.9.6), only with dev builds.

The console also becomes unstable at this point but I am ABLE to contact the HTTPd at http://127.0.0.1:7657/ yet not able to speak to /console. It will stall. / will try redirect me to /console thus stalling the telnet connection.

I understand this is not much to go on but I hope it can be found. Thanks in advance.

comment:5 in reply to: ↑ 4 Changed 6 years ago by guest

Replying to guest:

Replying to zzz:

please describe "instability" or symptoms when running -4

It can run for up to 20 minutes until all of the client tunnels begin to break and the CPU/RAM becomes stuck at a certain point - the whole JVM seems to die(I could be wrong on this, maybe it just is not changing much). I've no idea if this is exclusive to -4 but it has not occurred with 0.9.7 (or 0.9.6), only with dev builds.

The console also becomes unstable at this point but I am ABLE to contact the HTTPd at http://127.0.0.1:7657/ yet not able to speak to /console. It will stall. / will try redirect me to /console thus stalling the telnet connection.

I understand this is not much to go on but I hope it can be found. Thanks in advance.

<sam2> zzz: Updated #984. I was unsure of -4's relativity to my problem as it happened on raw 0.9.7 once or twice.. I disabled snark startin torrents on router

start yet it still happened with both. Immediately after upgrading to -4 again. I've no idea if it is relevant but I feel it may be more than a concidence?

comment:6 follow-up: Changed 6 years ago by zzz

Pushing NPE fix in 0.9.7-5.
Your problems sound like a total overload (memory or CPU) - everything is going bad? What's the hardware? RaPi??

comment:7 in reply to: ↑ 6 Changed 6 years ago by guest

Replying to zzz:

Pushing NPE fix in 0.9.7-5.
Your problems sound like a total overload (memory or CPU) - everything is going bad? What's the hardware? RaPi??

Yes, RaPi?. Just got the same overload issues on a much more high powered server though (-4). I don't understand what's going on. I may be giving you a wild goose chase here but I'm definitely seeing a problem only with builds post-0.9.7.
Same problems as the RaPi?, can load / (to get a redirect) in telnet but /console fails.

comment:8 Changed 6 years ago by zab

I managed to reproduce this. It's a nasty deadlock introduced by me in -4.

"UDP message receiver 2/4" daemon prio=10 tid=0x00007f4b10694000 nid=0x655c waiting for monitor entry [0x00007f4aca585000]
   java.lang.Thread.State: BLOCKED (on object monitor)
        at net.i2p.router.transport.ntcp.NTCPConnection.isEstablished(NTCPConnection.java:235)
        - waiting to lock <0x00000000d70fd0f0> (a net.i2p.router.transport.ntcp.NTCPConnection)
        at net.i2p.router.transport.ntcp.NTCPTransport.isBacklogged(NTCPTransport.java:400)
        at net.i2p.router.transport.TransportManager.isBacklogged(TransportManager.java:319)
        at net.i2p.router.transport.CommSystemFacadeImpl.isBacklogged(CommSystemFacadeImpl.java:147)
        at net.i2p.router.tunnel.pool.TunnelPool.selectTunnel(TunnelPool.java:188)
        - locked <0x00000000d7138930> (a java.util.ArrayList)
        at net.i2p.router.tunnel.pool.TunnelPool.selectTunnel(TunnelPool.java:158)
        at net.i2p.router.tunnel.pool.TunnelPoolManager.selectOutboundTunnel(TunnelPoolManager.java:164)
        at net.i2p.router.tunnel.InboundMessageDistributor.distribute(InboundMessageDistributor.java:128)
        at net.i2p.router.tunnel.InboundMessageDistributor.handleClove(InboundMessageDistributor.java:243)
        at net.i2p.router.message.GarlicMessageReceiver.handleClove(GarlicMessageReceiver.java:106)
        at net.i2p.router.message.GarlicMessageReceiver.receive(GarlicMessageReceiver.java:81)
        at net.i2p.router.tunnel.InboundMessageDistributor.distribute(InboundMessageDistributor.java:106)
        at net.i2p.router.tunnel.TunnelParticipant$DefragmentedHandler.receiveComplete(TunnelParticipant.java:179)
        at net.i2p.router.tunnel.FragmentHandler.receiveComplete(FragmentHandler.java:487)
        at net.i2p.router.tunnel.FragmentHandler.receiveSubsequentFragment(FragmentHandler.java:442)
        - locked <0x00000000d76eb380> (a net.i2p.router.tunnel.FragmentedMessage)
        at net.i2p.router.tunnel.FragmentHandler.receiveFragment(FragmentHandler.java:295)
        at net.i2p.router.tunnel.FragmentHandler.receiveTunnelMessage(FragmentHandler.java:150)
        at net.i2p.router.tunnel.TunnelParticipant.dispatch(TunnelParticipant.java:128)
        at net.i2p.router.tunnel.TunnelDispatcher.dispatch(TunnelDispatcher.java:526)
        at net.i2p.router.InNetMessagePool.doShortCircuitTunnelData(InNetMessagePool.java:323)
        at net.i2p.router.InNetMessagePool.shortCircuitTunnelData(InNetMessagePool.java:308)
        at net.i2p.router.InNetMessagePool.add(InNetMessagePool.java:179)
        at net.i2p.router.transport.TransportManager.messageReceived(TransportManager.java:522)
        at net.i2p.router.transport.TransportImpl.messageReceived(TransportImpl.java:469)
        at net.i2p.router.transport.udp.UDPTransport.messageReceived(UDPTransport.java:1219)
        at net.i2p.router.transport.udp.MessageReceiver.loop(MessageReceiver.java:164)
        at net.i2p.router.transport.udp.MessageReceiver$Runner.run(MessageReceiver.java:83)
        at java.lang.Thread.run(Thread.java:724)
        at net.i2p.util.I2PThread.run(I2PThread.java:85)

... and ...

"NTCP reader 2/4" daemon prio=10 tid=0x00007f4b1062e800 nid=0x6541 waiting for monitor entry [0x00007f4acf5f4000]
   java.lang.Thread.State: BLOCKED (on object monitor)
        at net.i2p.router.tunnel.pool.TunnelPool.selectTunnel(TunnelPool.java:165)
        - waiting to lock <0x00000000d7138930> (a java.util.ArrayList)
        at net.i2p.router.tunnel.pool.TunnelPool.selectTunnel(TunnelPool.java:158)
        at net.i2p.router.tunnel.pool.TunnelPoolManager.selectOutboundTunnel(TunnelPoolManager.java:164)
        at net.i2p.router.tunnel.InboundMessageDistributor.distribute(InboundMessageDistributor.java:128)
        at net.i2p.router.tunnel.InboundMessageDistributor.handleClove(InboundMessageDistributor.java:243)
        at net.i2p.router.message.GarlicMessageReceiver.handleClove(GarlicMessageReceiver.java:106)
        at net.i2p.router.message.GarlicMessageReceiver.receive(GarlicMessageReceiver.java:81)
        at net.i2p.router.tunnel.InboundMessageDistributor.distribute(InboundMessageDistributor.java:106)
        at net.i2p.router.tunnel.TunnelParticipant$DefragmentedHandler.receiveComplete(TunnelParticipant.java:179)
        at net.i2p.router.tunnel.FragmentHandler.receiveComplete(FragmentHandler.java:487)
        at net.i2p.router.tunnel.FragmentHandler.receiveSubsequentFragment(FragmentHandler.java:442)
        - locked <0x00000000d74a5118> (a net.i2p.router.tunnel.FragmentedMessage)
        at net.i2p.router.tunnel.FragmentHandler.receiveFragment(FragmentHandler.java:295)
        at net.i2p.router.tunnel.FragmentHandler.receiveTunnelMessage(FragmentHandler.java:150)
        at net.i2p.router.tunnel.TunnelParticipant.dispatch(TunnelParticipant.java:128)
        at net.i2p.router.tunnel.TunnelDispatcher.dispatch(TunnelDispatcher.java:526)
        at net.i2p.router.InNetMessagePool.doShortCircuitTunnelData(InNetMessagePool.java:323)
        at net.i2p.router.InNetMessagePool.shortCircuitTunnelData(InNetMessagePool.java:308)
        at net.i2p.router.InNetMessagePool.add(InNetMessagePool.java:179)
        at net.i2p.router.transport.TransportManager.messageReceived(TransportManager.java:522)
        at net.i2p.router.transport.TransportImpl.messageReceived(TransportImpl.java:469)
        at net.i2p.router.transport.ntcp.NTCPConnection$ReadState.receiveLastBlock(NTCPConnection.java:1489)
        at net.i2p.router.transport.ntcp.NTCPConnection$ReadState.receiveSubsequent(NTCPConnection.java:1447)
        at net.i2p.router.transport.ntcp.NTCPConnection$ReadState.receiveBlock(NTCPConnection.java:1397)
        at net.i2p.router.transport.ntcp.NTCPConnection.recvUnencryptedI2NP(NTCPConnection.java:1223)
        at net.i2p.router.transport.ntcp.NTCPConnection.recvEncryptedFast(NTCPConnection.java:1205)
        at net.i2p.router.transport.ntcp.NTCPConnection.recvEncryptedI2NP(NTCPConnection.java:1136)
        - locked <0x00000000d70fd0f0> (a net.i2p.router.transport.ntcp.NTCPConnection)
        at net.i2p.router.transport.ntcp.Reader.processRead(Reader.java:173)
        at net.i2p.router.transport.ntcp.Reader.access$400(Reader.java:21)
        at net.i2p.router.transport.ntcp.Reader$Runner.run(Reader.java:118)
        at java.lang.Thread.run(Thread.java:724)
        at net.i2p.util.I2PThread.run(I2PThread.java:85)

comment:9 Changed 6 years ago by zab

  • Cc zab@… added

Fix should be in 0.9.7-6 , revision ebe8340dfef1604883dee87b219008ecb0f29c68

Please test and get back to us. Thanks!

comment:10 Changed 6 years ago by guest

Hi again!

<zylo_> topiltzin, zzz: negatory on the fix
<zylo_> no more "deadlock", now I'm getting NPEs and then various issues with building my cilent tunnels
<zylo_> I'll put them into a ticket shortly
<zylo_> (same one)
<zylo_> very angry messages about data length and signing/verification

A few like this (I assume one for each of my client tunnels):

21/07/13 19:25:17 CRIT [rtup tunnels] .i2p.i2ptunnel.I2PTunnelServer: Unable to connect to the router at 127.0.0.1:7654 and build tunnels for the server at 127.0.0.1:6668, giving up
     net.i2p.client.I2PSessionException: Unable to sign the session config
     at net.i2p.client.I2CPMessageProducer.connect(I2CPMessageProducer.java:97)
     at net.i2p.client.I2PSessionImpl.connect(I2PSessionImpl.java:472)
     at net.i2p.i2ptunnel.I2PTunnelServer.connectManager(I2PTunnelServer.java:223)
     at net.i2p.i2ptunnel.I2PTunnelServer.startRunning(I2PTunnelServer.java:277)
     at net.i2p.i2ptunnel.I2PTunnel.runServer(I2PTunnel.java:428)
     at net.i2p.i2ptunnel.TunnelController.startServer(TunnelController.java:372)
     at net.i2p.i2ptunnel.TunnelController.doStartTunnel(TunnelController.java:202)
     at net.i2p.i2ptunnel.TunnelController.startTunnel(TunnelController.java:149)
     at net.i2p.i2ptunnel.TunnelControllerGroup$StartControllers.run(TunnelControllerGroup.java:249)
     at java.lang.Thread.run(Thread.java:722)
     at net.i2p.util.I2PThread.run(I2PThread.java:85)
     Caused by: net.i2p.data.DataFormatException: Unable to retrieve bytes for signing
     at net.i2p.data.i2cp.SessionConfig.signSessionConfig(SessionConfig.java:116)
     at net.i2p.client.I2CPMessageProducer.connect(I2CPMessageProducer.java:95)
     ... 10 more

..followed by below errors (removed the destination, it seemed like one. I have non redacted copies.)

21/07/13 19:22:37 ERROR [rtup tunnels] et.i2p.data.i2cp.SessionConfig: Error writing out the bytes for signing/verification
     net.i2p.data.DataFormatException: The I2P data spec limits strings to 255 bytes or less, but this is 516 [XXX...AAAA]
    at net.i2p.data.DataHelper.writeStringUTF8(DataHelper.java:847)
     at net.i2p.data.DataHelper.writeProperties(DataHelper.java:238)
     at net.i2p.data.DataHelper.writeProperties(DataHelper.java:195)
     at net.i2p.data.i2cp.SessionConfig.getBytes(SessionConfig.java:176)
     at net.i2p.data.i2cp.SessionConfig.signSessionConfig(SessionConfig.java:115)
     at net.i2p.client.I2CPMessageProducer.connect(I2CPMessageProducer.java:95)
     at net.i2p.client.I2PSessionImpl.connect(I2PSessionImpl.java:472)
     at net.i2p.i2ptunnel.I2PTunnelServer.connectManager(I2PTunnelServer.java:223)
     at net.i2p.i2ptunnel.I2PTunnelServer.startRunning(I2PTunnelServer.java:277)
     at net.i2p.i2ptunnel.I2PTunnel.runServer(I2PTunnel.java:428)
     at net.i2p.i2ptunnel.TunnelController.startServer(TunnelController.java:372)
     at net.i2p.i2ptunnel.TunnelController.doStartTunnel(TunnelController.java:202)
     at net.i2p.i2ptunnel.TunnelController.startTunnel(TunnelController.java:149)
     at net.i2p.i2ptunnel.TunnelControllerGroup$StartControllers.run(TunnelControllerGroup.java:249)
     at java.lang.Thread.run(Thread.java:722)
     at net.i2p.util.I2PThread.run(I2PThread.java:85)
21/07/13 19:22:17 ERROR [rtup tunnels] et.i2p.data.i2cp.SessionConfig: Error writing out the bytes for signing/verification
     net.i2p.data.DataFormatException: The I2P data spec limits strings to 255 bytes or less, but this is 516 [XXX...AAAA]
     at net.i2p.data.DataHelper.writeStringUTF8(DataHelper.java:847)
     at net.i2p.data.DataHelper.writeProperties(DataHelper.java:238)
     at net.i2p.data.DataHelper.writeProperties(DataHelper.java:195)
     at net.i2p.data.i2cp.SessionConfig.getBytes(SessionConfig.java:176)
     at net.i2p.data.i2cp.SessionConfig.signSessionConfig(SessionConfig.java:115)
     at net.i2p.client.I2CPMessageProducer.connect(I2CPMessageProducer.java:95)
     at net.i2p.client.I2PSessionImpl.connect(I2PSessionImpl.java:472)
     at net.i2p.i2ptunnel.I2PTunnelServer.connectManager(I2PTunnelServer.java:223)
     at net.i2p.i2ptunnel.I2PTunnelServer.startRunning(I2PTunnelServer.java:277)
     at net.i2p.i2ptunnel.I2PTunnel.runServer(I2PTunnel.java:428)
     at net.i2p.i2ptunnel.TunnelController.startServer(TunnelController.java:372)
     at net.i2p.i2ptunnel.TunnelController.doStartTunnel(TunnelController.java:202)
     at net.i2p.i2ptunnel.TunnelController.startTunnel(TunnelController.java:149)
     at net.i2p.i2ptunnel.TunnelControllerGroup$StartControllers.run(TunnelControllerGroup.java:249)
     at java.lang.Thread.run(Thread.java:722)
     at net.i2p.util.I2PThread.run(I2PThread.java:85)

.. Finally (this was first, the rest followed a few minutes later):

21/07/13 19:20:43 ↓↓↓ 137 similar messages omitted ↓↓↓
21/07/13 19:20:42 ERROR [NTCP Pumper ] ter.transport.ntcp.EventPumper: Error in the event pumper
     java.lang.NullPointerException
     at net.i2p.router.transport.ntcp.NTCPConnection.isEstablished(NTCPConnection.java:235)
     at net.i2p.router.transport.ntcp.NTCPTransport.expireTimedOut(NTCPTransport.java:729)
     at net.i2p.router.transport.ntcp.EventPumper.expireTimedOut(EventPumper.java:851)
     at net.i2p.router.transport.ntcp.EventPumper.runDelayedEvents(EventPumper.java:828)
     at net.i2p.router.transport.ntcp.EventPumper.run(EventPumper.java:171)
     at java.lang.Thread.run(Thread.java:722)
     at net.i2p.util.I2PThread.run(I2PThread.java:85)

comment:11 Changed 6 years ago by zab

Fix for the NPE in 0.9.7-7 revision 2399127a73cbb3d57c1aca7eb1cc46d79c19579f
No idea about the other exceptions

comment:12 Changed 6 years ago by zzz

SessionConfig? long props I broke in -5 when fixing the first NPE (thought I could let them thru in router context but nay), should be fixed in -8 bbfb5ca030c6f6b533960dafa5dd8b4f3ca95a3a

comment:13 follow-up: Changed 6 years ago by zzz

  • Component changed from unspecified to streaming
  • Resolution set to fixed
  • Status changed from new to closed

I think OP confirmed fixed on IRC. Please reopen if I'm wrong.

comment:14 in reply to: ↑ 13 Changed 6 years ago by guest

Replying to zzz:

I think OP confirmed fixed on IRC. Please reopen if I'm wrong.

Right. It's all good now, thank you!

Note: See TracTickets for help on using tickets.