#2286 closed defect (fixed)

NPE in NTCP reader

Reported by: echelon Owned by: zzz
Priority: minor Milestone: 0.9.36
Component: router/transport Version: 0.9.35
Keywords: Cc:
Parent Tickets:

Description

7/3/18 7:52:37 PM ↓↓↓ 2 similar messages omitted ↓↓↓
7/3/18 7:52:10 PM CRIT [P reader 1/4] p.router.transport.ntcp.Reader: Error in the ntcp reader

java.lang.NullPointerException?
at net.i2p.router.transport.ntcp.NTCPConnection.sendNTCP2(NTCPConnection.java:1005)
at net.i2p.router.transport.ntcp.NTCPConnection.sendRouterInfo(NTCPConnection.java:962)
at net.i2p.router.transport.ntcp.NTCPConnection.sendOurRouterInfo(NTCPConnection.java:938)
at net.i2p.router.transport.ntcp.NTCPConnection.enqueueInfoMessage(NTCPConnection.java:618)
at net.i2p.router.transport.ntcp.NTCPConnection.finishInboundEstablishment(NTCPConnection.java:1761)
at net.i2p.router.transport.ntcp.InboundEstablishState?.setDataPhase(InboundEstablishState?.java:896)
at net.i2p.router.transport.ntcp.InboundEstablishState?.receiveInboundNTCP2(InboundEstablishState?.java:810)
at net.i2p.router.transport.ntcp.InboundEstablishState?.receiveInbound(InboundEstablishState?.java:145)
at net.i2p.router.transport.ntcp.InboundEstablishState?.receive(InboundEstablishState?.java:113)
at net.i2p.router.transport.ntcp.Reader.processRead(Reader.java:161)
at net.i2p.router.transport.ntcp.Reader.access$400(Reader.java:21)
at net.i2p.router.transport.ntcp.Reader$Runner.run(Reader.java:120)
at java.lang.Thread.run(Thread.java:748)
at net.i2p.util.I2PThread.run(I2PThread.java:103)

Subtickets

Change History (7)

comment:1 Changed 11 months ago by echelon

I2P version: 0.9.35-3-1

Java version: Oracle Corporation 1.8.0_151 (Java(TM) SE Runtime Environment 1.8.0_151-b12)
Wrapper version: 3.5.30
Server version: 9.2.21.v20170120
Servlet version: Jasper JSP 2.3 Engine
JSTL version: standard-taglib 1.2.5
Platform: Linux amd64 4.9.0-3-amd64
Processor: Ivy Bridge (coreisbr)
JBigI status: Locally optimized native BigInteger? library loaded from file
GMP version: 6.1.2
JBigI version: 4
JCpuId version: 3
Encoding: UTF-8
Charset: UTF-8
Built By: Undefined

comment:2 Changed 11 months ago by zzz

  • Status changed from new to accepted

not sure exactly what happened but I'm going to shotgun it

comment:3 Changed 11 months ago by zzz

various bulletproofing in 3ba7c5b2e24e950c83d6370df3c814fd025add81 0.9.35-6
leaving open to keep an eye on it

comment:4 Changed 10 months ago by echelon

Hi

2 more:
7/20/18 5:10:37 PM CRIT [P writer 3/4] p.router.transport.ntcp.Writer: Error in the ntcp writer on NTCP2 conn 1124 from /1.1.1.1 port 4 a~zrUP created 66h ago, last send 341ms ago, last recv 63ms ago, sent 526258, rcvd 237540

java.lang.IllegalStateException?: Unable to serialize the message TunnelGatewayMessage?
at net.i2p.data.i2np.I2NPMessageImpl.toRawByteArrayNTCP2(I2NPMessageImpl.java:419)
at net.i2p.router.transport.ntcp.NTCP2Payload$I2NPBlock.writeData(NTCP2Payload.java:252)
at net.i2p.router.transport.ntcp.NTCP2Payload$Block.write(NTCP2Payload.java:192)
at net.i2p.router.transport.ntcp.NTCP2Payload.writePayload(NTCP2Payload.java:170)
at net.i2p.router.transport.ntcp.NTCPConnection.sendNTCP2(NTCPConnection.java:1040)
at net.i2p.router.transport.ntcp.NTCPConnection.prepareNextWriteNTCP2(NTCPConnection.java:908)
at net.i2p.router.transport.ntcp.NTCPConnection.prepareNextWrite(NTCPConnection.java:703)
at net.i2p.router.transport.ntcp.Writer$Runner.run(Writer.java:129)
at java.lang.Thread.run(Thread.java:748)
at net.i2p.util.I2PThread.run(I2PThread.java:103)
Caused by: net.i2p.data.i2np.I2NPMessageException: Too much data to write out (id=1523275214 data=null)
at net.i2p.data.i2np.TunnelGatewayMessage?.writeMessageBody(TunnelGatewayMessage?.java:99)
at net.i2p.data.i2np.I2NPMessageImpl.toRawByteArrayNTCP2(I2NPMessageImpl.java:416)
... 9 more

7/20/18 5:10:37 PM CRIT [P writer 3/4] data.i2np.TunnelGatewayMessage?: Error writing

net.i2p.data.i2np.I2NPMessageException: Too much data to write out (id=1523275214 data=null)
at net.i2p.data.i2np.TunnelGatewayMessage?.writeMessageBody(TunnelGatewayMessage?.java:99)
at net.i2p.data.i2np.I2NPMessageImpl.toRawByteArrayNTCP2(I2NPMessageImpl.java:416)
at net.i2p.router.transport.ntcp.NTCP2Payload$I2NPBlock.writeData(NTCP2Payload.java:252)
at net.i2p.router.transport.ntcp.NTCP2Payload$Block.write(NTCP2Payload.java:192)
at net.i2p.router.transport.ntcp.NTCP2Payload.writePayload(NTCP2Payload.java:170)
at net.i2p.router.transport.ntcp.NTCPConnection.sendNTCP2(NTCPConnection.java:1040)
at net.i2p.router.transport.ntcp.NTCPConnection.prepareNextWriteNTCP2(NTCPConnection.java:908)
at net.i2p.router.transport.ntcp.NTCPConnection.prepareNextWrite(NTCPConnection.java:703)
at net.i2p.router.transport.ntcp.Writer$Runner.run(Writer.java:129)
at java.lang.Thread.run(Thread.java:748)
at net.i2p.util.I2PThread.run(I2PThread.java:103)

Now on 0.9.35-14-1

comment:5 Changed 10 months ago by echelon

And another system on 0.9.35-14-1

7/20/18 10:43:25 AM KRITISCH [P reader 3/4] p.router.transport.ntcp.Reader: Error in the ntcp reader

java.lang.NullPointerException?
at net.i2p.router.transport.ntcp.NTCPConnection.getPaddingSize(NTCPConnection.java:922)
at net.i2p.router.transport.ntcp.NTCPConnection.sendTermination(NTCPConnection.java:1011)
at net.i2p.router.transport.ntcp.NTCPConnection.failInboundEstablishment(NTCPConnection.java:1825)
at net.i2p.router.transport.ntcp.InboundEstablishState?.setDataPhase(InboundEstablishState?.java:886)
at net.i2p.router.transport.ntcp.InboundEstablishState?.receiveInboundNTCP2(InboundEstablishState?.java:810)
at net.i2p.router.transport.ntcp.InboundEstablishState?.receiveInbound(InboundEstablishState?.java:145)
at net.i2p.router.transport.ntcp.InboundEstablishState?.receive(InboundEstablishState?.java:113)
at net.i2p.router.transport.ntcp.Reader.processRead(Reader.java:161)
at net.i2p.router.transport.ntcp.Reader.access$400(Reader.java:21)
at net.i2p.router.transport.ntcp.Reader$Runner.run(Reader.java:120)
at java.lang.Thread.run(Thread.java:748)
at net.i2p.util.I2PThread.run(I2PThread.java:103)

7/20/18 10:31:50 AM KRITISCH [P reader 4/4] p.router.transport.ntcp.Reader: Error in the ntcp reader

java.lang.NullPointerException?
at net.i2p.router.transport.ntcp.NTCPConnection.getPaddingSize(NTCPConnection.java:922)
at net.i2p.router.transport.ntcp.NTCPConnection.sendTermination(NTCPConnection.java:1011)
at net.i2p.router.transport.ntcp.NTCPConnection.failInboundEstablishment(NTCPConnection.java:1825)
at net.i2p.router.transport.ntcp.InboundEstablishState?.setDataPhase(InboundEstablishState?.java:886)
at net.i2p.router.transport.ntcp.InboundEstablishState?.receiveInboundNTCP2(InboundEstablishState?.java:810)
at net.i2p.router.transport.ntcp.InboundEstablishState?.receiveInbound(InboundEstablishState?.java:145)
at net.i2p.router.transport.ntcp.InboundEstablishState?.receive(InboundEstablishState?.java:113)
at net.i2p.router.transport.ntcp.Reader.processRead(Reader.java:161)
at net.i2p.router.transport.ntcp.Reader.access$400(Reader.java:21)
at net.i2p.router.transport.ntcp.Reader$Runner.run(Reader.java:120)
at java.lang.Thread.run(Thread.java:748)
at net.i2p.util.I2PThread.run(I2PThread.java:103)

7/20/18 10:11:06 AM KRITISCH [P reader 4/4] p.router.transport.ntcp.Reader: Error in the ntcp reader

java.lang.NullPointerException?
at net.i2p.router.transport.ntcp.NTCPConnection.getPaddingSize(NTCPConnection.java:922)
at net.i2p.router.transport.ntcp.NTCPConnection.sendTermination(NTCPConnection.java:1011)
at net.i2p.router.transport.ntcp.NTCPConnection.failInboundEstablishment(NTCPConnection.java:1825)
at net.i2p.router.transport.ntcp.InboundEstablishState?.setDataPhase(InboundEstablishState?.java:886)
at net.i2p.router.transport.ntcp.InboundEstablishState?.receiveInboundNTCP2(InboundEstablishState?.java:810)
at net.i2p.router.transport.ntcp.InboundEstablishState?.receiveInbound(InboundEstablishState?.java:145)
at net.i2p.router.transport.ntcp.InboundEstablishState?.receive(InboundEstablishState?.java:113)
at net.i2p.router.transport.ntcp.Reader.processRead(Reader.java:161)
at net.i2p.router.transport.ntcp.Reader.access$400(Reader.java:21)
at net.i2p.router.transport.ntcp.Reader$Runner.run(Reader.java:120)
at java.lang.Thread.run(Thread.java:748)
at net.i2p.util.I2PThread.run(I2PThread.java:103)

comment:6 Changed 10 months ago by zzz

The ones in comment 5, I have a couple of also, easy fix.
The ones in comment 4... investigating...

comment:7 Changed 10 months ago by zzz

  • Resolution set to fixed
  • Status changed from accepted to closed

Fixed both 4 and 5 in 11a0eb837672964e8606b5ba682c57c632f831e7 0.9.35-16

Note: See TracTickets for help on using tickets.