Opened 4 years ago

Closed 4 years ago

#1403 closed defect (fixed)

NPE while building GarlicMessage

Reported by: str4d Owned by: zzz
Priority: minor Milestone: 0.9.16
Component: router/general Version: 0.9.15
Keywords: NPE Cc:
Parent Tickets:

Description

09:02:39 | Thread terminated unexpectedly: I2CP Internal Reader 3
09:02:39 | java.lang.NullPointerException
09:02:39 | 	at net.i2p.data.i2np.GarlicClove.estimateSize(GarlicClove.java:204)
09:02:39 | 	at net.i2p.data.i2np.GarlicClove.toByteArray(GarlicClove.java:180)
09:02:39 | 	at net.i2p.router.message.GarlicMessageBuilder.buildCommonClove(GarlicMessageBuilder.java:319)
09:02:39 | 	at net.i2p.router.message.GarlicMessageBuilder.buildClove(GarlicMessageBuilder.java:286)
09:02:39 | 	at net.i2p.router.message.GarlicMessageBuilder.buildCloveSet(GarlicMessageBuilder.java:254)
09:02:39 | 	at net.i2p.router.message.GarlicMessageBuilder.buildMessage(GarlicMessageBuilder.java:198)
09:02:39 | 	at net.i2p.router.message.GarlicMessageBuilder.buildMessage(GarlicMessageBuilder.java:170)
09:02:39 | 	at net.i2p.router.message.OutboundClientMessageJobHelper.createGarlicMessage(OutboundClientMessageJobHelper.java:126)
09:02:39 | 	at net.i2p.router.message.OutboundClientMessageOneShotJob.send(OutboundClientMessageOneShotJob.java:528)
09:02:39 | 	at net.i2p.router.message.OutboundClientMessageOneShotJob.access$300(OutboundClientMessageOneShotJob.java:46)
09:02:39 | 	at net.i2p.router.message.OutboundClientMessageOneShotJob$SendJob.runJob(OutboundClientMessageOneShotJob.java:287)
09:02:39 | 	at net.i2p.router.message.OutboundClientMessageOneShotJob.runJob(OutboundClientMessageOneShotJob.java:227)
09:02:39 | 	at net.i2p.router.ClientMessagePool.add(ClientMessagePool.java:77)
09:02:39 | 	at net.i2p.router.client.ClientManager.distributeMessage(ClientManager.java:316)
09:02:39 | 	at net.i2p.router.client.ClientConnectionRunner.distributeMessage(ClientConnectionRunner.java:435)
09:02:39 | 	at net.i2p.router.client.ClientMessageEventListener.handleSendMessage(ClientMessageEventListener.java:309)
09:02:39 | 	at net.i2p.router.client.ClientMessageEventListener.messageReceived(ClientMessageEventListener.java:110)
09:02:39 | 	at net.i2p.internal.QueuedI2CPMessageReader$QueuedI2CPMessageReaderRunner.run(QueuedI2CPMessageReader.java:56)
09:02:39 | 	at java.lang.Thread.run(Thread.java:745)
09:02:39 | 	at net.i2p.util.I2PThread.run(I2PThread.java:84)
I2P version: 0.9.15-0
Java version: Oracle Corporation 1.7.0_65 (OpenJDK Runtime Environment 1.7.0_65-b32)
Wrapper version: 3.1.1
Server version: 8.1.15.v20140411
Servlet version: Jasper JSP 2.1 Engine
Platform: Linux i386 3.15.4-x86_64-linode45
Processor: uninitialized (unrecognized)
Jbigi: Locally optimized native BigInteger library loaded from file
Encoding: ANSI_X3.4-1968
Charset: US-ASCII

Subtickets

Change History (3)

comment:1 Changed 4 years ago by zzz

  • Owner set to zzz
  • Status changed from new to accepted

Never seen this before.

So the instructions, the message, or the certificate in one of the cloves is null; all come from the config.

It could be the ACK clove, the LS clove, or the data clove. Hard to tell. But my guess would be the ACK clove, as there's relatively (0.9.12) recent changes in there to wrap the ACK in another garlic. See OCMJobHelper. I see that wrapDSM() can return null but that isn't checked at line 222; that could be it.

comment:2 Changed 4 years ago by zzz

  • Milestone changed from 0.9.17 to 0.9.16
  • Status changed from accepted to testing

Hopefully fixed in feed7db1184a2b8a06ddf35d45dc0e993895e2be 0.9.15-17-rc. Best guess. Leaving open to review for other possible cases.

comment:3 Changed 4 years ago by zzz

  • Resolution set to fixed
  • Status changed from testing to closed
Note: See TracTickets for help on using tickets.