Opened 5 years ago

Last modified 2 years ago

#1021 new defect

i2p does not work with IKVM

Reported by: guest Owned by:
Priority: maintenance Milestone: eventually
Component: unspecified Version: 0.9.7.1
Keywords: JVM Cc:
Parent Tickets:

Description (last modified by zzz)

I2P does not seem to work with IKVM on Mono. It appears to be a networking problem that cascades into a Jetty one.

Host OS: OpenBSD 5.3 i386

ikvm -version output:

IKVM.NET Launcher version 7.2.4630.5
Copyright (C) 2002-2012 Jeroen Frijters
http://www.ikvm.net/

CLR version: 2.0.50727.1433 (32 bit)
Mono version: 2.10.9 (tarball Mon Feb 25 20:04:32 MST 2013)
System.Xml: 2.0.0.0
System.Configuration: 2.0.0.0
System: 2.0.0.0
IKVM.OpenJDK.Core: 7.2.4630.5
IKVM.Runtime: 7.2.4630.5
ikvm: 7.2.4630.5
mscorlib: 2.0.0.0
OpenJDK version: OpenJDK 7u6 b24

Error output:

9/12/13 7:19:58 PM WARN  [JobQueue 1/1] p.router.transport.UPnPManager: UPnP start failed - no network connection?
9/12/13 7:19:59 PM WARN  [JobQueue 2/4] networkdb.reseed.ReseedChecker: Cannot reseed, no network connection
9/12/13 7:20:22 PM CRIT  [JobQueue 1/1] net.i2p.router.JobQueueRunner : Error processing job [Boot Communication System] on thread 0: Could not load type 'net.i2p.router.transport.udp.PacketHandler$Handler[]' from assembly 'ikvm_dynamic_assembly__25773532, Version=2013.912.1917.10384, Culture=neutral, PublicKeyToken=null'.
cli.System.TypeLoadException: Could not load type 'net.i2p.router.transport.udp.PacketHandler$Handler[]' from assembly 'ikvm_dynamic_assembly__25773532, Version=2013.912.1917.10384, Culture=neutral, PublicKeyToken=null'.
	at net.i2p.router.transport.udp.UDPTransport.startup(UDPTransport.java:264)
	at net.i2p.router.transport.udp.UDPTransport.startListening(UDPTransport.java:1461)
	at net.i2p.router.transport.TransportManager.startListening(TransportManager.java:140)
	at net.i2p.router.transport.CommSystemFacadeImpl.startup(CommSystemFacadeImpl.java:60)
	at net.i2p.router.startup.BootCommSystemJob.runJob(BootCommSystemJob.java:38)
	at net.i2p.router.JobQueueRunner.runCurrentJob(JobQueueRunner.java:133)
	at net.i2p.router.JobQueueRunner.run(JobQueueRunner.java:37)
	at java.lang.Thread.run(Thread.java:934)
	at net.i2p.util.I2PThread.run(I2PThread.java:85)
9/12/13 7:20:51 PM CRIT  [JettyStarter] outer.startup.RouterAppManager: Client Jetty [eepsite/jetty.xml] START_FAILED 
MultiException[cli.System.TypeLoadException: Could not load type 'org.eclipse.jetty.io.nio.SelectorManager$SelectSet[]' from assembly 'ikvm_dynamic_assembly__25773532, Version=2013.912.1917.10384, Culture=neutral, PublicKeyToken=null'.]
	at org.eclipse.jetty.server.Server.doStart(Server.java:264)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:57)
	at net.i2p.jetty.JettyStart$Starter.run(JettyStart.java:111)
cli.System.TypeLoadException: Could not load type 'org.eclipse.jetty.io.nio.SelectorManager$SelectSet[]' from assembly 'ikvm_dynamic_assembly__25773532, Version=2013.912.1917.10384, Culture=neutral, PublicKeyToken=null'.
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:57)
	at org.eclipse.jetty.server.Server.doStart(Server.java:264)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:57)
	at net.i2p.jetty.JettyStart$Starter.run(JettyStart.java:111)
9/12/13 7:22:01 PM WARN  [JobQueue 4/4] networkdb.reseed.ReseedChecker: Cannot reseed, no network connection
9/12/13 7:22:02 PM ERROR [rtup tunnels] eaming.I2PSocketManagerFactory: Error creating session for socket manager
net.i2p.client.I2PSessionException: No manager yet
	at net.i2p.router.client.ClientManagerFacadeImpl.connect(ClientManagerFacadeImpl.java:251)
	at net.i2p.client.I2PSessionImpl.connect(I2PSessionImpl.java:385)
	at net.i2p.client.streaming.I2PSocketManagerFactory.createManager(I2PSocketManagerFactory.java:140)
	at net.i2p.client.streaming.I2PSocketManagerFactory.createManager(I2PSocketManagerFactory.java:83)
	at net.i2p.i2ptunnel.I2PTunnelClientBase.buildSocketManager(I2PTunnelClientBase.java:383)
	at net.i2p.i2ptunnel.I2PTunnelClientBase.buildSocketManager(I2PTunnelClientBase.java:370)
	at net.i2p.i2ptunnel.I2PTunnelClientBase.getSocketManager(I2PTunnelClientBase.java)
	at net.i2p.i2ptunnel.I2PTunnelClientBase.getSocketManager(I2PTunnelClientBase.java:290)
	at net.i2p.i2ptunnel.I2PTunnelClientBase.verifySocketManager(I2PTunnelClientBase.java:252)
	at net.i2p.i2ptunnel.I2PTunnelClientBase.<init>(I2PTunnelClientBase.java)
	at net.i2p.i2ptunnel.I2PTunnelClientBase.<init>(I2PTunnelClientBase.java)
	at net.i2p.i2ptunnel.I2PTunnelHTTPClientBase.<init>(I2PTunnelHTTPClientBase.java)
	at net.i2p.i2ptunnel.I2PTunnelHTTPClient.<init>(I2PTunnelHTTPClient.java)
	at net.i2p.i2ptunnel.I2PTunnel.runHttpClient(I2PTunnel.java:754)
	at net.i2p.i2ptunnel.TunnelController.startHttpClient(TunnelController.java:221)
	at net.i2p.i2ptunnel.TunnelController.doStartTunnel(TunnelController.java:164)
	at net.i2p.i2ptunnel.TunnelController.startTunnel(TunnelController.java:147)
	at net.i2p.i2ptunnel.TunnelControllerGroup$StartControllers.run(TunnelControllerGroup.java:245)
	at java.lang.Thread.run(Thread.java:934)
	at net.i2p.util.I2PThread.run(I2PThread.java:85)
9/12/13 7:22:02 PM ERROR [rtup tunnels] .i2ptunnel.I2PTunnelClientBase: Unable to connect to the router at 127.0.0.1:7654 and build tunnels for the client, retrying in 20 seconds


A lot of that is redundant.

Subtickets (add)

Change History (5)

comment:1 Changed 5 years ago by zzz

  • Description modified (diff)

cut out redundant msgs

I loaded ikvm on Ubuntu and got 7.0.4335.0 and it wouldn't start at all.

This looks like a problem with the JRE loading private array classes. That's the only thing I see in common with the two exceptions, one in our transport code and one in Jetty.

comment:2 Changed 5 years ago by guest

I modified runplain.sh so it's something like this:

(it's cut down options for I2P wise)

I2P="/home/calvin/.i2p"
I2PTEMP="/tmp/"

CP=
for jars in `ls ${I2P}/lib/*.jar`; do CP=${CP}:${jars}; done

JAVAOPTS="-Djava.net.preferIPv4Stack=true -Djava.library.path=${I2P}:${I2P}/lib -Di2p.dir.base=${I2P} -Di2p.dir.base=${I2P} -DloggerFilenameOverride=logs/log-router-@.txt"
mono ikvm.exe -cp "${CP}" ${JAVAOPTS} net.i2p.router.RouterLaunch
echo $! > "${I2PTEMP}/router.pid"

Classloading in Java and the CLR is different, the IKVM wiki seems to have ideas on how to resolve it. I also tried compiling it into a single .exe, as one of the recommendations, but that just got me JobQueue? errors and lots of warning regarding jetty and Ant (?) when compiling it.

comment:3 Changed 5 years ago by zzz

  • Keywords JVM added
  • Milestone 0.9.8 deleted
  • Priority changed from minor to maintenance

I searched again and couldn't find a particular IKVM bug referencing arrays, but I do see some references to array accessors on http://weblog.ikvm.net/allentries.aspx .

The 7.2.4630.5 release is almost a year old. At this point it's best to put this ticket aside until a new IKVM release comes out, then retest.

comment:4 Changed 3 years ago by dg

  • Milestone set to eventually

related: #1655.

comment:5 Changed 2 years ago by zzz

Ubuntu 16.04
ikvm:

IKVM.NET Launcher version 8.1.5717.0
Copyright (C) 2002-2015 Jeroen Frijters
http://www.ikvm.net/

CLR version: 4.0.30319.17020 (64 bit)
Mono version: 4.2.1 (Debian 4.2.1.102+dfsg2-7ubuntu4)
mscorlib: 4.0.0.0
ikvm: 8.1.5717.0
IKVM.Runtime: 8.1.5717.0
IKVM.OpenJDK.Core: 8.1.5717.0
System: 4.0.0.0
IKVM.OpenJDK.Util: 8.1.5717.0
System.Configuration: 4.0.0.0
System.Xml: 4.0.0.0
Mono.Security: 4.0.0.0
OpenJDK version: OpenJDK 8u45 b14

Set JAVA=/usr/bin/ikvm in runplain.sh

Complete fail:

Exception in thread "main" java.lang.NullPointerException

Unhandled Exception:
System.NullReferenceException: Object reference not set to an instance of an object
  at IKVM.Internal.ClassLoaderWrapper.GetGenericClassLoader (IKVM.Internal.TypeWrapper wrapper) <0x41d94690 + 0x000e7> in <filename unknown>:0 
  at IKVM.Internal.DotNetTypeWrapper.GetClassLoader () <0x41d94630 + 0x00027> in <filename unknown>:0 
  at IKVM.Internal.AssemblyClassLoader.GetWrapperFromAssemblyType (System.Type type) <0x41caff10 + 0x00080> in <filename unknown>:0 
  at IKVM.Internal.ClassLoaderWrapper.GetWrapperFromType (System.Type type) <0x41cacf90 + 0x004b6> in <filename unknown>:0 
  at IKVM.Internal.ExceptionHelper.GetFileName (System.Diagnostics.StackFrame frame) <0x41d94300 + 0x0008f> in <filename unknown>:0 
  at IKVM.Internal.ExceptionHelper+ExceptionInfoHelper.Append (System.Collections.Generic.List`1 stackTrace, System.Diagnostics.StackTrace st, Int32 skip, Boolean isLast) <0x41d93a50 + 0x0039b> in <filename unknown>:0 
  at IKVM.Internal.ExceptionHelper+ExceptionInfoHelper.get_StackTrace (System.Exception t) <0x41d933c0 + 0x00197> in <filename unknown>:0 
  at IKVM.Internal.ExceptionHelper.getOurStackTrace (System.Exception x) <0x41d92f50 + 0x002a7> in <filename unknown>:0 
  at java.lang.ThrowableHelper.getOurStackTrace (System.Exception ) <0x41d92f30 + 0x0000f> in <filename unknown>:0 
  at java.lang.ThrowableHelper.printStackTrace (System.Exception , java.lang.PrintStreamOrWriter ) <0x41d92050 + 0x000b7> in <filename unknown>:0 
  at java.lang.ThrowableHelper.printStackTrace (System.Exception , java.io.PrintStream ) <0x41d91f30 + 0x00047> in <filename unknown>:0 
  at java.lang.Throwable.printStackTrace (java.io.PrintStream s) <0x41d91f10 + 0x00013> in <filename unknown>:0 
  at java.lang.Throwable.instancehelper_printStackTrace (System.Exception this, java.io.PrintStream s) <0x41d91e70 + 0x00064> in <filename unknown>:0 
  at java.lang.ThreadGroup.uncaughtException (java.lang.Thread t, System.Exception e) <0x41d8fbf0 + 0x00167> in <filename unknown>:0 
  at java.lang.ThreadGroup.uncaughtException (java.lang.Thread t, System.Exception e) <0x41d8fbf0 + 0x00043> in <filename unknown>:0 
  at Starter.Main (System.String[] args) <0x41c75d70 + 0x01518> in <filename unknown>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.NullReferenceException: Object reference not set to an instance of an object
  at IKVM.Internal.ClassLoaderWrapper.GetGenericClassLoader (IKVM.Internal.TypeWrapper wrapper) <0x41d94690 + 0x000e7> in <filename unknown>:0 
  at IKVM.Internal.DotNetTypeWrapper.GetClassLoader () <0x41d94630 + 0x00027> in <filename unknown>:0 
  at IKVM.Internal.AssemblyClassLoader.GetWrapperFromAssemblyType (System.Type type) <0x41caff10 + 0x00080> in <filename unknown>:0 
  at IKVM.Internal.ClassLoaderWrapper.GetWrapperFromType (System.Type type) <0x41cacf90 + 0x004b6> in <filename unknown>:0 
  at IKVM.Internal.ExceptionHelper.GetFileName (System.Diagnostics.StackFrame frame) <0x41d94300 + 0x0008f> in <filename unknown>:0 
  at IKVM.Internal.ExceptionHelper+ExceptionInfoHelper.Append (System.Collections.Generic.List`1 stackTrace, System.Diagnostics.StackTrace st, Int32 skip, Boolean isLast) <0x41d93a50 + 0x0039b> in <filename unknown>:0 
  at IKVM.Internal.ExceptionHelper+ExceptionInfoHelper.get_StackTrace (System.Exception t) <0x41d933c0 + 0x00197> in <filename unknown>:0 
  at IKVM.Internal.ExceptionHelper.getOurStackTrace (System.Exception x) <0x41d92f50 + 0x002a7> in <filename unknown>:0 
  at java.lang.ThrowableHelper.getOurStackTrace (System.Exception ) <0x41d92f30 + 0x0000f> in <filename unknown>:0 
  at java.lang.ThrowableHelper.printStackTrace (System.Exception , java.lang.PrintStreamOrWriter ) <0x41d92050 + 0x000b7> in <filename unknown>:0 
  at java.lang.ThrowableHelper.printStackTrace (System.Exception , java.io.PrintStream ) <0x41d91f30 + 0x00047> in <filename unknown>:0 
  at java.lang.Throwable.printStackTrace (java.io.PrintStream s) <0x41d91f10 + 0x00013> in <filename unknown>:0 
  at java.lang.Throwable.instancehelper_printStackTrace (System.Exception this, java.io.PrintStream s) <0x41d91e70 + 0x00064> in <filename unknown>:0 
  at java.lang.ThreadGroup.uncaughtException (java.lang.Thread t, System.Exception e) <0x41d8fbf0 + 0x00167> in <filename unknown>:0 
  at java.lang.ThreadGroup.uncaughtException (java.lang.Thread t, System.Exception e) <0x41d8fbf0 + 0x00043> in <filename unknown>:0 
  at Starter.Main (System.String[] args) <0x41c75d70 + 0x01518> in <filename unknown>:0 

Ticket #1655 reports success on Windows here http://forum.i2p/viewtopic.php?t=12155 but total fail on Ubuntu, presumably a Mono thing. Leaving ticket open.

Note: See TracTickets for help on using tickets.