-The unprecedented network growth starting October 5th -has dramatically increased network congestion, especially on evenings (UTC) -and weekends. The last two releases contained a few changes that we hoped -would relieve the pressure, but unfortunately these measures have been only -modest successes. The primary issue is to limit the number of direct router -to-router connections in the network. This isn't a new problem; we've been -working on it for several years, usually with good results. However, the recent -growth pushed us over the edge once again. -
-Release 0.8.11 includes several more changes to reduce the number of router-to-router -connections and increase connection and tunnel build capacity. The goal, of course, -is to improve tunnel build success rates and general reliability. As always, there's -a few bug fixes and translation updates. -
-We welcome all our new users. Please be patient as we work to improve network -performance. Debugging congestion problems in a distributed anonymous network -is a continuing challenge. Please help improve the network -by restarting your router once the upgrade is downloaded. - +The 0.8.12 release fixes several serious message corruption bugs. +It also contains a redesign of the router's congestion control, and continued +optimization of CPU and memory usage. We are hopeful that these changes will +improve network performance. Upgrading is recommended.
Say hello to the volunteers on the #i2p-help IRC channel. Get involved, diff --git a/installer/resources/wrapper.config b/installer/resources/wrapper.config index 6f36414617..9eee7dda21 100644 --- a/installer/resources/wrapper.config +++ b/installer/resources/wrapper.config @@ -168,6 +168,10 @@ wrapper.logfile.maxfiles=2 # Log Level for sys/event log output. (See docs for log levels) wrapper.syslog.loglevel=NONE +# these will shut down or crash the JVM +wrapper.signal.mode.usr1=IGNORE +wrapper.signal.mode.usr2=IGNORE + # choose what to do if the JVM kills itself based on the exit code wrapper.on_exit.default=SHUTDOWN wrapper.on_exit.0=SHUTDOWN diff --git a/router/java/src/net/i2p/router/Router.java b/router/java/src/net/i2p/router/Router.java index e7172550f8..0e95d8c6eb 100644 --- a/router/java/src/net/i2p/router/Router.java +++ b/router/java/src/net/i2p/router/Router.java @@ -241,6 +241,8 @@ public class Router implements RouterClock.ClockShiftListener { String now = Long.toString(System.currentTimeMillis()); _config.put("router.firstInstalled", now); _config.put("router.updateLastInstalled", now); + // only compatible with new i2prouter script + _config.put("router.gracefulHUP", "true"); saveConfig(); } // ********* Start no threads before here ********* // @@ -393,7 +395,7 @@ public class Router implements RouterClock.ClockShiftListener { _isAlive = true; _started = _context.clock().now(); try { - Runtime.getRuntime().removeShutdownHook(_shutdownHook); + Runtime.getRuntime().addShutdownHook(_shutdownHook); } catch (IllegalStateException ise) {} I2PThread.addOOMEventListener(_oomListener); @@ -1004,9 +1006,12 @@ public class Router implements RouterClock.ClockShiftListener { /** * Cancel the JVM runtime hook before calling this. + * Called by the ShutdownHook. * NOT to be called by others, use shutdown(). */ public void shutdown2(int exitCode) { + _shutdownInProgress = true; + _log.log(Log.CRIT, "Starting final shutdown(" + exitCode + ')'); // So we can get all the way to the end // No, you can't do Thread.currentThread.setDaemon(false) if (_killVMOnEnd) { @@ -1021,6 +1026,7 @@ public class Router implements RouterClock.ClockShiftListener { // Run the shutdown hooks first in case they want to send some goodbye messages // Maybe we need a delay after this too? for (Runnable task : _context.getShutdownTasks()) { + //System.err.println("Running shutdown task " + task.getClass()); if (_log.shouldLog(Log.WARN)) _log.warn("Running shutdown task " + task.getClass()); try { @@ -1115,7 +1121,7 @@ public class Router implements RouterClock.ClockShiftListener { //Runtime.getRuntime().halt(exitCode); // allow the Runtime shutdown hooks to execute Runtime.getRuntime().exit(exitCode); - } else { + } else if (System.getProperty("java.vendor").contains("Android")) { Runtime.getRuntime().gc(); } } diff --git a/router/java/src/net/i2p/router/RouterVersion.java b/router/java/src/net/i2p/router/RouterVersion.java index 33006bcb1f..a411b00998 100644 --- a/router/java/src/net/i2p/router/RouterVersion.java +++ b/router/java/src/net/i2p/router/RouterVersion.java @@ -18,10 +18,10 @@ public class RouterVersion { /** deprecated */ public final static String ID = "Monotone"; public final static String VERSION = CoreVersion.VERSION; - public final static long BUILD = 27; + public final static long BUILD = 0; /** for example "-test" */ - public final static String EXTRA = "-rc"; + public final static String EXTRA = ""; public final static String FULL_VERSION = VERSION + "-" + BUILD + EXTRA; public static void main(String args[]) { System.out.println("I2P Router version: " + FULL_VERSION); diff --git a/router/java/src/net/i2p/router/tasks/ShutdownHook.java b/router/java/src/net/i2p/router/tasks/ShutdownHook.java index 9bc57d6435..ae8e38d7a4 100644 --- a/router/java/src/net/i2p/router/tasks/ShutdownHook.java +++ b/router/java/src/net/i2p/router/tasks/ShutdownHook.java @@ -32,6 +32,10 @@ public class ShutdownHook extends Thread { setName("Router " + _id + " shutdown"); Log l = _context.logManager().getLog(Router.class); l.log(Log.CRIT, "Shutting down the router..."); + // Needed to make the wrapper happy, otherwise it gets confused + // and thinks we haven't shut down, possibly because it + // prevents other shutdown hooks from running + _context.router().setKillVMOnEnd(false); _context.router().shutdown2(Router.EXIT_HARD); } }