Opened 9 years ago

Closed 9 years ago

#38 closed defect (fixed)

OutOfMemoryError, NullPointerException for normal install

Reported by: anonymous Owned by: zzz
Priority: major Milestone: 0.8
Component: router/general Version:
Keywords: Cc:
Parent Tickets:

Description

I found a java.lang.OutOfMemoryError? and more following that one in the logfile of my router version 0.7.11-0.

The JVM was started using the default commandline:

java
-DloggerFilenameOverride?=logs/log-router-@.txt
-Dorg.mortbay.http.Version.paranoid=true
-Dorg.mortbay.util.FileResource?.checkAliases=false
-Dorg.mortbay.xml.XmlParser?.NotValidating?=true
-Di2p.dir.base=/REMOVED/i2p
-Xmx128m
-Djava.library.path=/REMOVED/i2p:/REMOVED/i2p/lib
-classpath
/REMOVED/i2p/lib/i2psnark.jar:/REMOVED/i2p/lib/router.jar:/REMOVED/i2p/lib/jasper-runtime.jar:/REMOVED/i2p/lib/i2ptunnel.jar:/REMOVED/i2p/lib/javax.servlet.jar:/REMOVED/i2p/lib/routerconsole.jar:/REMOVED/i2p/lib/jbigi.jar:/REMOVED/i2p/lib/jasper-compiler.jar:/REMOVED/i2p/lib/BOB.jar:/REMOVED/i2p/lib/mstreaming.jar:/REMOVED/i2p/lib/systray.jar:/REMOVED/i2p/lib/i2p.jar:/REMOVED/i2p/lib/commons-logging.jar:/REMOVED/i2p/lib/systray4j.jar:/REMOVED/i2p/lib/org.mortbay.jetty.jar:/REMOVED/i2p/lib/sam.jar:/REMOVED/i2p/lib/commons-el.jar:/REMOVED/i2p/lib/streaming.jar:/REMOVED/i2p/lib/wrapper.jar
-Dwrapper.key=REMOVED
-Dwrapper.port=32000
-Dwrapper.version=3.1.1
-Dwrapper.native_library=wrapper
-Dwrapper.service=TRUE
-Dwrapper.cpu.timeout=10
-Dwrapper.jvmid=2
org.tanukisoftware.wrapper.WrapperSimpleApp?
net.i2p.router.Router

The logfile shows a couple of OutOfMemoryError? s and NullPointerException? s leading to an unexpected shutdown:

INFO | jvm 1 | 2010/02/20 00:50:55 | 23:50:55.776 CRIT [NTCP read 0 ] net.i2p.util.I2PThread : Killing thread NTCP read 0
INFO | jvm 1 | 2010/02/20 00:50:55 | java.lang.OutOfMemoryError?: Java heap space
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.transport.ntcp.NTCPConnection$PrepBuffer?.<init>(NTCPConnection.java:775)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.transport.ntcp.NTCPConnection.acquireBuf(NTCPConnection.java:726)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.transport.ntcp.NTCPConnection.bufferedPrepare(NTCPConnection.java:674)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.transport.ntcp.NTCPConnection.send(NTCPConnection.java:293)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.transport.ntcp.NTCPTransport.outboundMessageReady(NTCPTransport.java:200)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.transport.TransportImpl?.send(TransportImpl?.java:357)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.transport.GetBidsJob?.getBids(GetBidsJob?.java:80)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.transport.CommSystemFacadeImpl?.processMessage(CommSystemFacadeImpl?.java:132)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.OutNetMessagePool?.add(OutNetMessagePool?.java:61)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.tunnel.TunnelParticipant?.send(TunnelParticipant?.java:175)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.tunnel.TunnelParticipant?.dispatch(TunnelParticipant?.java:89)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.tunnel.TunnelDispatcher?.dispatch(TunnelDispatcher?.java:351)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.InNetMessagePool?.doShortCircuitTunnelData(InNetMessagePool?.java:306)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.InNetMessagePool?.shortCircuitTunnelData(InNetMessagePool?.java:291)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.InNetMessagePool?.add(InNetMessagePool?.java:160)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.transport.TransportManager?.messageReceived(TransportManager?.java:462)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.transport.TransportImpl?.messageReceived(TransportImpl?.java:416)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.transport.ntcp.NTCPConnection$ReadState?.receiveLastBlock(NTCPConnection.java:1282)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.transport.ntcp.NTCPConnection$ReadState?.receiveSubsequent(NTCPConnection.java:1241)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.transport.ntcp.NTCPConnection$ReadState?.receiveBlock(NTCPConnection.java:1198)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.transport.ntcp.NTCPConnection.recvUnencryptedI2NP(NTCPConnection.java:1035)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.transport.ntcp.NTCPConnection.recvEncryptedI2NP(NTCPConnection.java:1018)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.transport.ntcp.Reader.processRead(Reader.java:167)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.transport.ntcp.Reader.access$400(Reader.java:17)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.transport.ntcp.Reader$Runner.run(Reader.java:106)
INFO | jvm 1 | 2010/02/20 00:50:55 | at java.lang.Thread.run(Thread.java:636)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.util.I2PThread.run(I2PThread.java:71)
INFO | jvm 1 | 2010/02/20 00:50:55 | 23:50:55.776 CRIT [NTCP read 0 ] net.i2p.router.Router : Thread ran out of memory
INFO | jvm 1 | 2010/02/20 00:50:55 | java.lang.OutOfMemoryError?: Java heap space
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.transport.ntcp.NTCPConnection$PrepBuffer?.<init>(NTCPConnection.java:775)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.transport.ntcp.NTCPConnection.acquireBuf(NTCPConnection.java:726)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.transport.ntcp.NTCPConnection.bufferedPrepare(NTCPConnection.java:674)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.transport.ntcp.NTCPConnection.send(NTCPConnection.java:293)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.transport.ntcp.NTCPTransport.outboundMessageReady(NTCPTransport.java:200)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.transport.TransportImpl?.send(TransportImpl?.java:357)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.transport.GetBidsJob?.getBids(GetBidsJob?.java:80)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.transport.CommSystemFacadeImpl?.processMessage(CommSystemFacadeImpl?.java:132)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.OutNetMessagePool?.add(OutNetMessagePool?.java:61)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.tunnel.TunnelParticipant?.send(TunnelParticipant?.java:175)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.tunnel.TunnelParticipant?.dispatch(TunnelParticipant?.java:89)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.tunnel.TunnelDispatcher?.dispatch(TunnelDispatcher?.java:351)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.InNetMessagePool?.doShortCircuitTunnelData(InNetMessagePool?.java:306)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.InNetMessagePool?.shortCircuitTunnelData(InNetMessagePool?.java:291)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.InNetMessagePool?.add(InNetMessagePool?.java:160)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.transport.TransportManager?.messageReceived(TransportManager?.java:462)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.transport.TransportImpl?.messageReceived(TransportImpl?.java:416)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.transport.ntcp.NTCPConnection$ReadState?.receiveLastBlock(NTCPConnection.java:1282)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.transport.ntcp.NTCPConnection$ReadState?.receiveSubsequent(NTCPConnection.java:1241)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.transport.ntcp.NTCPConnection$ReadState?.receiveBlock(NTCPConnection.java:1198)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.transport.ntcp.NTCPConnection.recvUnencryptedI2NP(NTCPConnection.java:1035)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.transport.ntcp.NTCPConnection.recvEncryptedI2NP(NTCPConnection.java:1018)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.transport.ntcp.Reader.processRead(Reader.java:167)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.transport.ntcp.Reader.access$400(Reader.java:17)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.transport.ntcp.Reader$Runner.run(Reader.java:106)
INFO | jvm 1 | 2010/02/20 00:50:55 | at java.lang.Thread.run(Thread.java:636)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.util.I2PThread.run(I2PThread.java:71)
INFO | jvm 1 | 2010/02/20 00:50:55 | 23:50:55.777 CRIT [NTCP read 0 ] net.i2p.router.Router : free mem: 16112 total mem: 133234688
INFO | jvm 1 | 2010/02/20 00:50:55 | 23:51:04.416 CRIT [NTCP read 2 ] net.i2p.util.I2PThread : Killing thread NTCP read 2
INFO | jvm 1 | 2010/02/20 00:50:55 | java.lang.OutOfMemoryError?: Java heap space
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.data.i2np.I2NPMessageImpl.toByteArray(I2NPMessageImpl.java:208)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.tunnel.TunnelGateway?$Pending.<init>(TunnelGateway?.java:204)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.tunnel.TunnelGateway?$PendingImpl?.<init>(TunnelGateway?.java:255)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.tunnel.PumpedTunnelGateway?.add(PumpedTunnelGateway?.java:66)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.tunnel.ThrottledPumpedTunnelGateway?.add(ThrottledPumpedTunnelGateway?.java:48)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.tunnel.TunnelGateway?.add(TunnelGateway?.java:77)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.tunnel.TunnelDispatcher?.dispatch(TunnelDispatcher?.java:409)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.InNetMessagePool?.doShortCircuitTunnelGateway(InNetMessagePool?.java:284)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.InNetMessagePool?.shortCircuitTunnelGateway(InNetMessagePool?.java:270)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.InNetMessagePool?.add(InNetMessagePool?.java:157)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.transport.TransportManager?.messageReceived(TransportManager?.java:462)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.transport.TransportImpl?.messageReceived(TransportImpl?.java:416)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.transport.ntcp.NTCPConnection$ReadState?.receiveLastBlock(NTCPConnection.java:1282)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.transport.ntcp.NTCPConnection$ReadState?.receiveSubsequent(NTCPConnection.java:1241)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.transport.ntcp.NTCPConnection$ReadState?.receiveBlock(NTCPConnection.java:1198)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.transport.ntcp.NTCPConnection.recvUnencryptedI2NP(NTCPConnection.java:1035)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.transport.ntcp.NTCPConnection.recvEncryptedI2NP(NTCPConnection.java:1018)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.transport.ntcp.Reader.processRead(Reader.java:167)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.transport.ntcp.Reader.access$400(Reader.java:17)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.transport.ntcp.Reader$Runner.run(Reader.java:106)
INFO | jvm 1 | 2010/02/20 00:50:55 | at java.lang.Thread.run(Thread.java:636)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.util.I2PThread.run(I2PThread.java:71)
INFO | jvm 1 | 2010/02/20 00:50:55 | 23:51:08.665 CRIT [erExecutor 2] net.i2p.util.SimpleTimer? : wtf, event borked: net.i2p.router.tunnel.TunnelGateway?$DelayedFlush?@1d4a66a
INFO | jvm 1 | 2010/02/20 00:50:55 | java.lang.OutOfMemoryError?: Java heap space
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.transport.ntcp.NTCPConnection.bufferedPrepare(NTCPConnection.java:704)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.transport.ntcp.NTCPConnection.send(NTCPConnection.java:293)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.transport.ntcp.NTCPTransport.outboundMessageReady(NTCPTransport.java:200)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.transport.TransportImpl?.send(TransportImpl?.java:357)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.transport.GetBidsJob?.getBids(GetBidsJob?.java:80)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.transport.CommSystemFacadeImpl?.processMessage(CommSystemFacadeImpl?.java:132)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.OutNetMessagePool?.add(OutNetMessagePool?.java:61)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.tunnel.InboundGatewayReceiver?.receiveEncrypted(InboundGatewayReceiver?.java:51)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.tunnel.InboundGatewayReceiver?.receiveEncrypted(InboundGatewayReceiver?.java:22)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.tunnel.InboundSender?.sendPreprocessed(InboundSender?.java:22)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.tunnel.BatchedPreprocessor?.send(BatchedPreprocessor?.java:398)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.tunnel.BatchedPreprocessor?.preprocessQueue(BatchedPreprocessor?.java:240)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.router.tunnel.TunnelGateway?$DelayedFlush?.timeReached(TunnelGateway?.java:300)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.util.Executor.run(Executor.java:32)
INFO | jvm 1 | 2010/02/20 00:50:55 | at java.lang.Thread.run(Thread.java:636)
INFO | jvm 1 | 2010/02/20 00:50:55 | at net.i2p.util.I2PThread.run(I2PThread.java:71)
INFO | jvm 1 | 2010/02/20 00:51:05 | 23:51:10.674 CRIT [uildExecutor] uter.tunnel.pool.BuildExecutor?: B0rked in the tunnel builder
INFO | jvm 1 | 2010/02/20 00:51:05 | java.lang.NullPointerException?
INFO | jvm 1 | 2010/02/20 00:51:05 | at net.i2p.router.networkdb.kademlia.FloodfillNetworkDatabaseFacade?.getKnownRouterData(FloodfillNetworkDatabaseFacade?.java:248)
INFO | jvm 1 | 2010/02/20 00:51:05 | at net.i2p.router.peermanager.PeerManager?.getPeersByCapability(PeerManager?.java:240)
INFO | jvm 1 | 2010/02/20 00:51:05 | at net.i2p.router.peermanager.PeerManagerFacadeImpl?.getPeersByCapability(PeerManagerFacadeImpl?.java:78)
INFO | jvm 1 | 2010/02/20 00:51:05 | at net.i2p.router.tunnel.pool.TunnelPeerSelector?.getExclude(TunnelPeerSelector?.java:183)
INFO | jvm 1 | 2010/02/20 00:51:05 | at net.i2p.router.tunnel.pool.ExploratoryPeerSelector?.selectPeers(ExploratoryPeerSelector?.java:36)
INFO | jvm 1 | 2010/02/20 00:51:05 | at net.i2p.router.tunnel.pool.TunnelPool?.configureNewTunnel(TunnelPool?.java:860)
INFO | jvm 1 | 2010/02/20 00:51:05 | at net.i2p.router.tunnel.pool.TunnelPool?.configureNewTunnel(TunnelPool?.java:853)
INFO | jvm 1 | 2010/02/20 00:51:05 | at net.i2p.router.tunnel.pool.BuildExecutor?.run(BuildExecutor?.java:294)
INFO | jvm 1 | 2010/02/20 00:51:05 | at java.lang.Thread.run(Thread.java:636)
INFO | jvm 1 | 2010/02/20 00:51:05 | at net.i2p.util.I2PThread.run(I2PThread.java:71)
INFO | jvm 1 | 2010/02/20 00:51:11 | 23:51:26.087 CRIT [NTCP read 0 ] net.i2p.router.Router : Shutdown(10) complete
INFO | jvm 1 | 2010/02/20 00:51:11 | java.lang.Exception: Shutdown
INFO | jvm 1 | 2010/02/20 00:51:11 | at net.i2p.router.Router.finalShutdown(Router.java:926)
INFO | jvm 1 | 2010/02/20 00:51:11 | at net.i2p.router.Router.shutdown(Router.java:916)
INFO | jvm 1 | 2010/02/20 00:51:11 | at net.i2p.router.Router$1.outOfMemory(Router.java:237)
INFO | jvm 1 | 2010/02/20 00:51:11 | at net.i2p.util.I2PThread.fireOOM(I2PThread.java:94)
INFO | jvm 1 | 2010/02/20 00:51:11 | at net.i2p.util.I2PThread.run(I2PThread.java:80)
ERROR | wrapper | 2010/02/20 00:51:12 | JVM exited unexpectedly.

Subtickets

Change History (5)

comment:1 Changed 9 years ago by anonymous

  • Component changed from api/data to router/general

comment:2 Changed 9 years ago by anonymous

I should add JVM info:

$ java -version
java version "1.6.0_0"
OpenJDK Runtime Environment (build 1.6.0_0-b11)
OpenJDK Client VM (build 1.6.0_0-b11, mixed mode, sharing)

Linux 32 bit, TCP and UDP ports open
SAM and BOB plugins were both running i think, and no other plugin

comment:3 Changed 9 years ago by anonymous

and the other info from http://127.0.0.1:7657/logs.jsp

I2P version: 0.7.11-0
 Java version: Sun Microsystems Inc. 1.6.0_0
 Platform: Linux i386 2.6.26-2-686
 Processor: Pentium IV (130 nm) (pentium4)
 Jbigi: Locally optimized native BigInteger library loaded from the library path
 Encoding: ANSI_X3.4-1968

comment:4 Changed 9 years ago by anonymous

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

I'll fix the NPE, but there's nothing to do for the OOM except increase the memory limit in wrapper.config.

net.i2p.router.Router : free mem: 16112 total mem: 133234688

One cause of high memory usage is running a lot of torrents in i2psnark, or running SAM - SAM uses a lot of memory and may have some memory leaks too.

comment:5 Changed 9 years ago by zzz

  • Resolution set to fixed
  • Status changed from assigned to closed

NPE was fixed in 0.7.12.

Note: See TracTickets for help on using tickets.