#2776 closed defect (not our bug)

I2CP Connection die after approx 24 days

Reported by: Zlatin Balevsky Owned by:
Priority: minor Milestone: undecided
Component: api/i2cp Version: 0.9.47
Keywords: Cc:
Parent Tickets: Sensitive: no


My MuWire? hostcache and update server die after approximately 24 days uptime. Reproducible 100%. The router keeps running fine. I do not know if the issue is in the client side or the server side.

24 days is suspiciously close to Integer.MAX_VALUE milliseconds, so I suspect there is an int somewhere instead of a long.


Change History (2)

comment:1 Changed 10 months ago by Zlatin Balevsky

Looking through the code now, this is probably unrelated, but the _lastActivity field in I2PSession needs to be volatile:

--- a/core/java/src/net/i2p/client/impl/I2PSessionImpl.java
+++ b/core/java/src/net/i2p/client/impl/I2PSessionImpl.java
@@ -196,7 +196,7 @@ public abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2
     protected AvailabilityNotifier _availabilityNotifier;
-    private long _lastActivity;
+    private volatile long _lastActivity;
     private boolean _isReduced;
     private final boolean _fastReceive;
     private volatile boolean _routerSupportsFastReceive;

comment:2 Changed 10 months ago by Zlatin Balevsky

Resolution: not our bug
Status: newclosed

Problem was a Thread.sleep(Integer.MAX_VALUE) at the end of the main() method in both applications.

Note: See TracTickets for help on using tickets.