Opened 2 years ago

Last modified 21 months ago

#1915 open defect

I2PPacketDispatcher: Invalid datagram received

Reported by: anonymous maybe Owned by:
Priority: minor Milestone: undecided
Component: api/utils Version: 0.9.28
Keywords: Cc: str4d, orignal
Parent Tickets: Sensitive: no

Description (last modified by zzz)

  • I2P Version and Running Environment
I2P version: 0.9.28-0-1ubuntu1
Java version: Oracle Corporation 1.7.0_111 (OpenJDK Runtime Environment 1.7.0_111-b01)
Wrapper version: 3.5.25
Server version: 8.1.16.v20140903
Servlet version: Jasper JSP 2.1 Engine
JSTL version: standard-taglib 1.2.0
Platform: Linux amd64 4.4.31-11.pvops.qubes.x86_64
Jcpuid version: 3
Processor: Haswell Core i3/i5/i7 model 60 (coreihwl)
Jbigi: Locally optimized native BigInteger library loaded from file
Jbigi version: 4
GMP version: 6.0.0
Encoding: UTF-8
Charset: UTF-8

  • Router Logs
1/6/17 12:42:06 AM ERROR [te #10145]: ] te.network.I2PPacketDispatcher: Invalid datagram received.
     net.i2p.data.DataFormatException: Error loading datagram
     at net.i2p.client.datagram.I2PDatagramDissector.loadI2PDatagram(I2PDatagramDissector.java:101)
     at i2p.bote.network.I2PPacketDispatcher.messageAvailable(I2PPacketDispatcher.java:100)
     at i2p.bote.network.I2PPacketDispatcher.messageAvailable(I2PPacketDispatcher.java:82)
     at net.i2p.client.impl.I2PSessionDemultiplexer.messageAvailable(I2PSessionDemultiplexer.java:43)
     at net.i2p.client.impl.I2PSessionMuxedImpl$MuxedAvailabilityNotifier.run(I2PSessionMuxedImpl.java:400)
     at java.lang.Thread.run(Thread.java:745)
     at net.i2p.util.I2PThread.run(I2PThread.java:103)
     Caused by: java.io.EOFException: EOF after reading 0 bytes of 256 byte value
     at net.i2p.data.DataHelper.read(DataHelper.java:1300)
     at net.i2p.data.DataHelper.read(DataHelper.java:1280)
     at net.i2p.data.SDSCache.get(SDSCache.java:175)
     at net.i2p.data.PublicKey.create(PublicKey.java:44)
     at net.i2p.data.Destination.create(Destination.java:57)
     at net.i2p.client.datagram.I2PDatagramDissector.loadI2PDatagram(I2PDatagramDissector.java:77)
     ... 6 more
1/6/17 12:42:06 AM ERROR [te #10145]: ] .datagram.I2PDatagramDissector: Error loading datagram
     java.io.EOFException: EOF after reading 0 bytes of 256 byte value
     at net.i2p.data.DataHelper.read(DataHelper.java:1300)
     at net.i2p.data.DataHelper.read(DataHelper.java:1280)
     at net.i2p.data.SDSCache.get(SDSCache.java:175)
     at net.i2p.data.PublicKey.create(PublicKey.java:44)
     at net.i2p.data.Destination.create(Destination.java:57)
     at net.i2p.client.datagram.I2PDatagramDissector.loadI2PDatagram(I2PDatagramDissector.java:77)
     at i2p.bote.network.I2PPacketDispatcher.messageAvailable(I2PPacketDispatcher.java:100)
     at i2p.bote.network.I2PPacketDispatcher.messageAvailable(I2PPacketDispatcher.java:82)
     at net.i2p.client.impl.I2PSessionDemultiplexer.messageAvailable(I2PSessionDemultiplexer.java:43)
     at net.i2p.client.impl.I2PSessionMuxedImpl$MuxedAvailabilityNotifier.run(I2PSessionMuxedImpl.java:400)
     at java.lang.Thread.run(Thread.java:745)
     at net.i2p.util.I2PThread.run(I2PThread.java:103)
1/6/17 12:42:06 AM ERROR [te #10145]: ] te.network.I2PPacketDispatcher: Can't get new message from I2PSession.
     net.i2p.client.I2PSessionException: Error decompressing message
     at net.i2p.client.impl.I2PSessionImpl2.receiveMessage(I2PSessionImpl2.java:326)
     at i2p.bote.network.I2PPacketDispatcher.messageAvailable(I2PPacketDispatcher.java:89)
     at i2p.bote.network.I2PPacketDispatcher.messageAvailable(I2PPacketDispatcher.java:82)
     at net.i2p.client.impl.I2PSessionDemultiplexer.messageAvailable(I2PSessionDemultiplexer.java:43)
     at net.i2p.client.impl.I2PSessionMuxedImpl$MuxedAvailabilityNotifier.run(I2PSessionMuxedImpl.java:400)
     at java.lang.Thread.run(Thread.java:745)
     at net.i2p.util.I2PThread.run(I2PThread.java:103)
     Caused by: java.io.IOException: gunzip expected 8152 bytes, got 507
     at net.i2p.util.ResettableGZIPInputStream.verifyFooter(ResettableGZIPInputStream.java:201)
     at net.i2p.util.ResettableGZIPInputStream.read(ResettableGZIPInputStream.java:112)
     at net.i2p.data.DataHelper.decompress(DataHelper.java:1703)
     at net.i2p.data.DataHelper.decompress(DataHelper.java:1683)
     at net.i2p.client.impl.I2PSessionImpl2.receiveMessage(I2PSessionImpl2.java:324)
     ... 6 more
1/6/17 12:33:35 AM ERROR [te #10145]: ] te.network.I2PPacketDispatcher: Invalid datagram received.
     net.i2p.data.DataFormatException: Error loading datagram
     at net.i2p.client.datagram.I2PDatagramDissector.loadI2PDatagram(I2PDatagramDissector.java:101)
     at i2p.bote.network.I2PPacketDispatcher.messageAvailable(I2PPacketDispatcher.java:100)
     at i2p.bote.network.I2PPacketDispatcher.messageAvailable(I2PPacketDispatcher.java:82)
     at net.i2p.client.impl.I2PSessionDemultiplexer.messageAvailable(I2PSessionDemultiplexer.java:43)
     at net.i2p.client.impl.I2PSessionMuxedImpl$MuxedAvailabilityNotifier.run(I2PSessionMuxedImpl.java:400)
     at java.lang.Thread.run(Thread.java:745)
     at net.i2p.util.I2PThread.run(I2PThread.java:103)
     Caused by: java.io.EOFException: EOF after reading 0 bytes of 256 byte value
     at net.i2p.data.DataHelper.read(DataHelper.java:1300)
     at net.i2p.data.DataHelper.read(DataHelper.java:1280)
     at net.i2p.data.SDSCache.get(SDSCache.java:175)
     at net.i2p.data.PublicKey.create(PublicKey.java:44)
     at net.i2p.data.Destination.create(Destination.java:57)
     at net.i2p.client.datagram.I2PDatagramDissector.loadI2PDatagram(I2PDatagramDissector.java:77)
     ... 6 more
1/6/17 12:33:35 AM ERROR [te #10145]: ] .datagram.I2PDatagramDissector: Error loading datagram
     java.io.EOFException: EOF after reading 0 bytes of 256 byte value
     at net.i2p.data.DataHelper.read(DataHelper.java:1300)
     at net.i2p.data.DataHelper.read(DataHelper.java:1280)
     at net.i2p.data.SDSCache.get(SDSCache.java:175)
     at net.i2p.data.PublicKey.create(PublicKey.java:44)
     at net.i2p.data.Destination.create(Destination.java:57)
     at net.i2p.client.datagram.I2PDatagramDissector.loadI2PDatagram(I2PDatagramDissector.java:77)
     at i2p.bote.network.I2PPacketDispatcher.messageAvailable(I2PPacketDispatcher.java:100)
     at i2p.bote.network.I2PPacketDispatcher.messageAvailable(I2PPacketDispatcher.java:82)
     at net.i2p.client.impl.I2PSessionDemultiplexer.messageAvailable(I2PSessionDemultiplexer.java:43)
     at net.i2p.client.impl.I2PSessionMuxedImpl$MuxedAvailabilityNotifier.run(I2PSessionMuxedImpl.java:400)
     at java.lang.Thread.run(Thread.java:745)
     at net.i2p.util.I2PThread.run(I2PThread.java:103)
1/6/17 12:33:35 AM ERROR [te #10145]: ] te.network.I2PPacketDispatcher: Can't get new message from I2PSession.
     net.i2p.client.I2PSessionException: Error decompressing message
     at net.i2p.client.impl.I2PSessionImpl2.receiveMessage(I2PSessionImpl2.java:326)
     at i2p.bote.network.I2PPacketDispatcher.messageAvailable(I2PPacketDispatcher.java:89)
     at i2p.bote.network.I2PPacketDispatcher.messageAvailable(I2PPacketDispatcher.java:82)
     at net.i2p.client.impl.I2PSessionDemultiplexer.messageAvailable(I2PSessionDemultiplexer.java:43)
     at net.i2p.client.impl.I2PSessionMuxedImpl$MuxedAvailabilityNotifier.run(I2PSessionMuxedImpl.java:400)
     at java.lang.Thread.run(Thread.java:745)
     at net.i2p.util.I2PThread.run(I2PThread.java:103)
     Caused by: java.io.IOException: gunzip expected 833 bytes, got 507
     at net.i2p.util.ResettableGZIPInputStream.verifyFooter(ResettableGZIPInputStream.java:201)
     at net.i2p.util.ResettableGZIPInputStream.read(ResettableGZIPInputStream.java:112)
     at net.i2p.data.DataHelper.decompress(DataHelper.java:1703)
     at net.i2p.data.DataHelper.decompress(DataHelper.java:1683)
     at net.i2p.client.impl.I2PSessionImpl2.receiveMessage(I2PSessionImpl2.java:324)
     ... 6 more
1/6/17 12:25:32 AM ERROR [te #10145]: ] te.network.I2PPacketDispatcher: Invalid datagram received.
     net.i2p.data.DataFormatException: Error loading datagram
     at net.i2p.client.datagram.I2PDatagramDissector.loadI2PDatagram(I2PDatagramDissector.java:101)
     at i2p.bote.network.I2PPacketDispatcher.messageAvailable(I2PPacketDispatcher.java:100)
     at i2p.bote.network.I2PPacketDispatcher.messageAvailable(I2PPacketDispatcher.java:82)
     at net.i2p.client.impl.I2PSessionDemultiplexer.messageAvailable(I2PSessionDemultiplexer.java:43)
     at net.i2p.client.impl.I2PSessionMuxedImpl$MuxedAvailabilityNotifier.run(I2PSessionMuxedImpl.java:400)
     at java.lang.Thread.run(Thread.java:745)
     at net.i2p.util.I2PThread.run(I2PThread.java:103)
     Caused by: java.io.EOFException: EOF after reading 0 bytes of 256 byte value
     at net.i2p.data.DataHelper.read(DataHelper.java:1300)
     at net.i2p.data.DataHelper.read(DataHelper.java:1280)
     at net.i2p.data.SDSCache.get(SDSCache.java:175)
     at net.i2p.data.PublicKey.create(PublicKey.java:44)
     at net.i2p.data.Destination.create(Destination.java:57)
     at net.i2p.client.datagram.I2PDatagramDissector.loadI2PDatagram(I2PDatagramDissector.java:77)
     ... 6 more
1/6/17 12:25:32 AM ERROR [te #10145]: ] .datagram.I2PDatagramDissector: Error loading datagram
     java.io.EOFException: EOF after reading 0 bytes of 256 byte value
     at net.i2p.data.DataHelper.read(DataHelper.java:1300)
     at net.i2p.data.DataHelper.read(DataHelper.java:1280)
     at net.i2p.data.SDSCache.get(SDSCache.java:175)
     at net.i2p.data.PublicKey.create(PublicKey.java:44)
     at net.i2p.data.Destination.create(Destination.java:57)
     at net.i2p.client.datagram.I2PDatagramDissector.loadI2PDatagram(I2PDatagramDissector.java:77)
     at i2p.bote.network.I2PPacketDispatcher.messageAvailable(I2PPacketDispatcher.java:100)
     at i2p.bote.network.I2PPacketDispatcher.messageAvailable(I2PPacketDispatcher.java:82)
     at net.i2p.client.impl.I2PSessionDemultiplexer.messageAvailable(I2PSessionDemultiplexer.java:43)
     at net.i2p.client.impl.I2PSessionMuxedImpl$MuxedAvailabilityNotifier.run(I2PSessionMuxedImpl.java:400)
     at java.lang.Thread.run(Thread.java:745)
     at net.i2p.util.I2PThread.run(I2PThread.java:103)
1/6/17 12:25:32 AM ERROR [te #10145]: ] te.network.I2PPacketDispatcher: Can't get new message from I2PSession.
     net.i2p.client.I2PSessionException: Error decompressing message
     at net.i2p.client.impl.I2PSessionImpl2.receiveMessage(I2PSessionImpl2.java:326)
     at i2p.bote.network.I2PPacketDispatcher.messageAvailable(I2PPacketDispatcher.java:89)
     at i2p.bote.network.I2PPacketDispatcher.messageAvailable(I2PPacketDispatcher.java:82)
     at net.i2p.client.impl.I2PSessionDemultiplexer.messageAvailable(I2PSessionDemultiplexer.java:43)
     at net.i2p.client.impl.I2PSessionMuxedImpl$MuxedAvailabilityNotifier.run(I2PSessionMuxedImpl.java:400)
     at java.lang.Thread.run(Thread.java:745)
     at net.i2p.util.I2PThread.run(I2PThread.java:103)
     Caused by: java.io.IOException: gunzip expected 8152 bytes, got 507
     at net.i2p.util.ResettableGZIPInputStream.verifyFooter(ResettableGZIPInputStream.java:201)
     at net.i2p.util.ResettableGZIPInputStream.read(ResettableGZIPInputStream.java:112)
     at net.i2p.data.DataHelper.decompress(DataHelper.java:1703)
     at net.i2p.data.DataHelper.decompress(DataHelper.java:1683)
     at net.i2p.client.impl.I2PSessionImpl2.receiveMessage(I2PSessionImpl2.java:324)
     ... 6 more
1/5/17 10:02:51 PM ↓↓↓ 7 similar messages omitted ↓↓↓
1/5/17 10:02:47 PM WARN [uter Console] rg.eclipse.jetty.server.Server: Couldn't initialize the InstanceManager required by Tomcat Jasper: java.lang.ClassNotFoundException: org.apache.tomcat.SimpleInstanceManager
1/5/17 10:02:47 PM INFO [uter Console] rg.eclipse.jetty.server.Server: Please ignore any Instan
  • Service (Wrapper) Logs

(removed zzz, indicates bote user, no other useful info)

Subtickets

#2029: te.network.I2PPacketDispatcher , Session: svfk[OPEN I2P-Bote #45322]closed
#2030: te.network.I2PPacketDispatcher , Session: svfk[OPEN I2P-Bote #45322]closed
#2031: te.network.I2PPacketDispatcher , Session: svfk[OPEN I2P-Bote #45322]closed

Change History (20)

comment:1 Changed 2 years ago by zzz

Component: unspecifiedapi/i2cp
Description: modified (diff)
Status: newopen
Summary: ERROR [te #10145]: ] te.network.I2PPacketDispatcher: Invalid datagram receivedI2PPacketDispatcher: Invalid datagram received

I received a similar report from a Vuze user:

net.i2p.client.I2PSessionException: Error decompressing message
    at
net.i2p.client.impl.I2PSessionImpl2.receiveMessage(I2PSessionImpl2.java:326)
    at
org.parg.azureus.plugins.networks.i2p.vuzedht.DHTTransportI2P.messageAvailable(DHTTransportI2P.java:2226)
    at
net.i2p.client.impl.I2PSessionDemultiplexer.messageAvailable(I2PSessionDemultiplexer.java:43)
    at
net.i2p.client.impl.I2PSessionMuxedImpl$MuxedAvailabilityNotifier.run(I2PSessionMuxedImpl.java:400)
    at java.lang.Thread.run(Unknown Source)
    at net.i2p.util.I2PThread.run(I2PThread.java:103)
Caused by: java.io.IOException: gunzip expected 846598654 bytes, got 507
    at
net.i2p.util.ResettableGZIPInputStream.verifyFooter(ResettableGZIPInputStream.java:201)
    at
net.i2p.util.ResettableGZIPInputStream.read(ResettableGZIPInputStream.java:112)
    at net.i2p.data.DataHelper.decompress(DataHelper.java:1703)
    at net.i2p.data.DataHelper.decompress(DataHelper.java:1683)
    at
net.i2p.client.impl.I2PSessionImpl2.receiveMessage(I2PSessionImpl2.java:324)
    ... 5 more

No ideas atm, can't think of any recent changes that would cause this. Could also be malformed datagrams being sent (possibly from a non-java impl)

comment:2 Changed 2 years ago by anonimal

Have these errors only been since the latest point release? Nothing related to these logs has changed recently Kovri-side in terms of transports/I2NP/datagram.

comment:3 Changed 2 years ago by zzz

Milestone: undecided0.9.29

Seems to be roughly coincident with 0.9.28. Could also be a new bote bug.

I may change the log level to WARN for this one.

comment:4 Changed 2 years ago by zzz

Cc: str4d added

This is already a WARN in streaming, with stat stream.packetReceiveFailure which I have 4 in 24 hours.

I will set net.i2p.client.streaming.impl.MessageHandler?=WARN on one of my routers to log them.

The SessionException? is thrown from receiveMessage() and so handling and logging is application-specific. Bote is logging it as an ERROR.

comment:5 Changed 2 years ago by zzz

Example from streaming:

 WARN  [2p #23841]: ] .streaming.impl.MessageHandler: Error receiving the message
net.i2p.client.I2PSessionException: Error decompressing message
	at net.i2p.client.impl.I2PSessionImpl2.receiveMessage(I2PSessionImpl2.java:326)
	at net.i2p.client.streaming.impl.MessageHandler.messageAvailable(MessageHandler.java:55)
	at net.i2p.client.impl.I2PSessionDemultiplexer.messageAvailable(I2PSessionDemultiplexer.java:43)
	at net.i2p.client.impl.I2PSessionMuxedImpl$MuxedAvailabilityNotifier.run(I2PSessionMuxedImpl.java:400)
	at java.lang.Thread.run(Thread.java:745)
	at net.i2p.util.I2PThread.run(I2PThread.java:103)
Caused by: java.io.IOException: gunzip expected 815 bytes, got 507
	at net.i2p.util.ResettableGZIPInputStream.verifyFooter(ResettableGZIPInputStream.java:201)
	at net.i2p.util.ResettableGZIPInputStream.read(ResettableGZIPInputStream.java:112)
	at net.i2p.data.DataHelper.decompress(DataHelper.java:1703)
	at net.i2p.data.DataHelper.decompress(DataHelper.java:1683)
	at net.i2p.client.impl.I2PSessionImpl2.receiveMessage(I2PSessionImpl2.java:324)
	... 5 more

comment:6 Changed 2 years ago by zzz

More examples: http://zzz.i2p/topics/2220
I'm removing the error logging from the dissector in d60c3c6274131898a0e8d6f9cdabcdbba261f06a to be 0.9.28-4, since we throw anyway, let the client do the logging.
Still no idea about root cause.

comment:7 Changed 2 years ago by zzz

Now that I am logging streaming issues, I'm seeing a LOT of errors where the received data size was 507. This sounds to me like the gzip problem with the underlying library where the size was 512. Anonimal, didn't you have an issue in some library with this recently?

log-router-1.txt:Caused by: java.io.IOException: gunzip expected 787 bytes, got 507
log-router-1.txt:Caused by: java.io.IOException: gunzip expected 787 bytes, got 507
log-router-1.txt:Caused by: java.io.IOException: gunzip expected 815 bytes, got 507
log-router-1.txt:Caused by: java.io.IOException: gunzip expected 815 bytes, got 507
log-router-1.txt:Caused by: java.io.IOException: gunzip expected 753 bytes, got 507
log-router-1.txt:Caused by: java.io.IOException: gunzip expected 742 bytes, got 507
log-router-1.txt:Caused by: java.io.IOException: gunzip expected 762 bytes, got 507
log-router-1.txt:Caused by: java.io.IOException: gunzip expected 815 bytes, got 507
log-router-1.txt:Caused by: java.io.IOException: gunzip expected 734 bytes, got 507
log-router-1.txt:Caused by: java.io.IOException: gunzip expected 785 bytes, got 507
log-router-1.txt:Caused by: java.io.IOException: gunzip expected 785 bytes, got 507
log-router-1.txt:Caused by: java.io.IOException: gunzip expected 785 bytes, got 507
log-router-1.txt:Caused by: java.io.IOException: gunzip expected 815 bytes, got 507
log-router-1.txt:Caused by: java.io.IOException: gunzip expected 815 bytes, got 507
log-router-1.txt:Caused by: java.io.IOException: gunzip expected 815 bytes, got 507
log-router-1.txt:Caused by: java.io.IOException: gunzip expected 757 bytes, got 507
log-router-1.txt:Caused by: java.io.IOException: gunzip expected 742 bytes, got 507
log-router-1.txt:Caused by: java.io.IOException: gunzip expected 742 bytes, got 507
log-router-1.txt:Caused by: java.io.IOException: gunzip expected 742 bytes, got 507
log-router-1.txt:Caused by: java.io.IOException: gunzip expected 768 bytes, got 507
log-router-1.txt:Caused by: java.io.IOException: gunzip expected 768 bytes, got 507
log-router-1.txt:Caused by: java.io.IOException: gunzip expected 768 bytes, got 507
log-router-1.txt:Caused by: java.io.IOException: gunzip expected 742 bytes, got 507
log-router-1.txt:Caused by: java.io.IOException: gunzip expected 742 bytes, got 507
log-router-1.txt:Caused by: java.io.IOException: gunzip expected 815 bytes, got 507
log-router-1.txt:Caused by: java.io.IOException: gunzip expected 757 bytes, got 507
log-router-1.txt:Caused by: java.io.IOException: gunzip expected 768 bytes, got 507
log-router-1.txt:Caused by: java.io.IOException: gunzip expected 768 bytes, got 507
log-router-1.txt:Caused by: java.io.IOException: gunzip expected 768 bytes, got 507
log-router-1.txt:Caused by: java.io.IOException: gunzip expected 768 bytes, got 507
log-router-1.txt:Caused by: java.io.IOException: gunzip expected 768 bytes, got 507
log-router-1.txt:Caused by: java.io.IOException: gunzip expected 754 bytes, got 507
log-router-1.txt:Caused by: java.io.IOException: gunzip expected 742 bytes, got 507
log-router-1.txt:Caused by: java.io.IOException: gunzip expected 762 bytes, got 507
log-router-1.txt:Caused by: java.io.IOException: gunzip expected 815 bytes, got 507
log-router-1.txt:Caused by: java.io.IOException: gunzip expected 787 bytes, got 507
log-router-1.txt:Caused by: java.io.IOException: gunzip expected 815 bytes, got 507
log-router-1.txt:Caused by: java.io.IOException: gunzip expected 815 bytes, got 507
log-router-1.txt:Caused by: java.io.IOException: gunzip expected 787 bytes, got 507
log-router-1.txt:Caused by: java.io.IOException: gunzip expected 815 bytes, got 507
log-router-1.txt:Caused by: java.io.IOException: gunzip expected 815 bytes, got 507
log-router-1.txt:Caused by: java.io.IOException: gunzip expected 791 bytes, got 507
log-router-1.txt:Caused by: java.io.IOException: gunzip expected 725 bytes, got 507
log-router-1.txt:Caused by: java.io.IOException: gunzip expected 751 bytes, got 507
log-router-1.txt:Caused by: java.io.IOException: gunzip expected 751 bytes, got 507
log-router-1.txt:Caused by: java.io.IOException: gunzip expected 815 bytes, got 507
log-router-1.txt:Caused by: java.io.IOException: gunzip expected 751 bytes, got 507
log-router-1.txt:Caused by: java.io.IOException: gunzip expected 815 bytes, got 507
log-router-1.txt:Caused by: java.io.IOException: gunzip expected 815 bytes, got 507
log-router-1.txt:Caused by: java.io.IOException: gunzip expected 815 bytes, got 507
log-router-1.txt:Caused by: java.io.IOException: gunzip expected 815 bytes, got 507
log-router-1.txt:Caused by: java.io.IOException: gunzip expected 815 bytes, got 507
log-router-1.txt:Caused by: java.io.IOException: gunzip expected 815 bytes, got 507
log-router-1.txt:Caused by: java.io.IOException: gunzip expected 787 bytes, got 507
log-router-1.txt:Caused by: java.io.IOException: gunzip expected 815 bytes, got 507
log-router-1.txt:Caused by: java.io.IOException: gunzip expected 815 bytes, got 507
log-router-1.txt:Caused by: java.io.IOException: gunzip expected 815 bytes, got 507
log-router-1.txt:Caused by: java.io.IOException: gunzip expected 815 bytes, got 507
log-router-1.txt:Caused by: java.io.IOException: gunzip expected 815 bytes, got 507

comment:8 Changed 2 years ago by anonimal

No, I patched cryptopp long ago and they ultimately fixed the issue several point releases ago. Our repo (and our static bins) build against cryptopp's latest release but that doesn't stop someone from building against an older cryptopp though.

Like I said, nothing has recently changed kovri-side in this area - at least not since java i2p's latest point release. If something catches my eye though then I'll drop a note.

JFTR: I've never seen these error messages on my java i2p router which runs 24/7, and I also don't run bote

comment:9 Changed 2 years ago by anonimal

The following came up several days after my last comment and I think it's quite possibly related: https://github.com/monero-project/kovri/issues/538

comment:10 Changed 2 years ago by zzz

Cc: orignal added

i2pd is now seeing similar errors. I believe orignal said that cryptopp was replaced with openssl long ago. Could the buggy version of cryptopp be causing this, either from:

  • old statically built i2pd or kovri
  • old (or current?) i2pd or kovri, dynamically linked to the buggy version of cryptopp

If dynamic linking to cryptopp is a build option, is there a runtime check for the buggy version in kovri, with an error message or exception thrown?

In i2pd, what version has the switch from cryptopp to openssl? Are there any cryptopp versions out there in the network?

comment:11 Changed 2 years ago by zzz

Milestone: 0.9.29undecided

Orignal presented some data the other day in IRC #i2p-dev, I asked that include it here and answer the above questions, but he declined. I'm not going to compensate with a bunch of copy and paste, he can participate here or not. But in summary, he sees RI decompression failures also, and hypothesizes that it's cryptopp. At this rate, this isn't going to be tracked down anytime soon. I'm out of ideas and don't have the energy to relay info between people.

comment:12 Changed 2 years ago by zzz

Component: api/i2cpapi/utils

Some conclusions and theories:

  • As decompression errors are now being seen in 3 implementations, the bug is on the compression side.
  • Since the problem is not in decompression, it's not the 'null byte required for decompression' issue
  • It's happening in datagram, streaming, and RI DatabaseStoreMessage? decompression, pointing to a compression library issue
  • First report I received was Jan. 3, or approximately 3 weeks after our 0.9.28 release
  • I don't see any relevant changes in 0.9.28
  • Relevant changes by me in 0.9.28-x dev builds are for debugging the problem and postdate the initial reports
  • The frequency of occurrence, and the fact that it's appearing a lot in bote, would appear to point to the non-Android Java router, but that's just a theory
  • This could correspond with a JRE or zlib library release
  • There's changes in Java 7 Deflater and DeflaterOutputStream? (SYNC_FLUSH) that we don't use, don't think we need them, if we did it would bump min Android requirement to API 19, or require source changes in the Android build. Don't see how to do it with reflection because it's a different constructor and we call super()

comment:13 Changed 2 years ago by zzz

Current thinking is that caching of the compressor is broken for some OS or distro. We already disable it for Android and Apache libs, because of previous issues, but perhaps there's some other one out there we don't detect. This is just a guess.

Disable caching of ResettableGZIPOutputStreams, add more checks for compression failure, fix output for zero-length input, in 8c40c23a8fbd1fff40f14f52f788f6eb23d3a613 0.9.28-7

comment:14 Changed 2 years ago by zzz

Return null instead of throwing exception on decompression failure, to reduce the impact, for example in clients that close the session on exception (iMule?) in adfb31152e7b4d7cb34cf2927becec0d26bda3dc 0.9.28-8

comment:15 Changed 2 years ago by zzz

Confirmed that it's SAM, not iMule (of course) that's disconnecting on exception, so the above fix will work for iMule (and other SAM/BOB apps).

comment:16 Changed 23 months ago by anonymous maybe

Add a subticket #2029.

comment:17 Changed 23 months ago by anonymous maybe

Add a subticket #2030.

comment:18 Changed 23 months ago by anonymous maybe

Add a subticket #2031.

comment:19 in reply to:  15 Changed 21 months ago by anonymous maybe

Replying to zzz:

Confirmed that it's SAM, not iMule (of course) that's disconnecting on exception, so the above fix will work for iMule (and other SAM/BOB apps).

so its complete fix ? or u need to check ?

comment:20 Changed 21 months ago by zzz

We're pretty sure the bug is on the sender side, and we still haven't found where or who or why. The sender-side change listed in comment 13 is just a guess. That's why the ticket is still open.

The fixes we have so far listed in comment 14 are on the receiver side, to not spam the logs, and not throw an exception. These changes reduce the impact. Some applications such as i2p-bote are still spamming the logs anyway, there's another ticket for that somewhere.

Even if you have upgraded, you could still be getting bad datagrams from somebody who hasn't. That's why it's hard to declare that it's fixed.

Note: See TracTickets for help on using tickets.