Opened 11 years ago

Last modified 10 years ago

#46 closed defect

i2p jvm taking up 100% of cpu — at Version 3

Reported by: anonymous Owned by: zzz
Priority: major Milestone: 0.8.12
Component: router/transport Version: 0.7.13
Keywords: Cc:
Parent Tickets: Sensitive: no

Description (last modified by welterde)

After i2p 0.7.13-0 was up for several hours without problems, I now noticed the i2p java process taking up 100% of the cpu. The number of participating tunnels was around the normal 200. Usually the cpu never exceeds 35% for 200 tunnels.

Unfortunately I shut the router down when I noticed the cpu usage, so I don't know whether the cpu usage would have gone down again. I'm also not quite sure for how long the cpu was at 100%, but it must have been a couple of minutes since the cpu fan came up.

Also, when i pressed the shutdown button, it said "Shutdown in 6m" instead of the usual "Shutdown in 11m".

The following clients were enabled (as configured on

  • Application tunnels: True
  • Running webapps: addressbook, i2psnark, i2ptunnel, susidns, susimail
  • No plugins were running

i2psnark was running, but all up- and downloads had been stopped several hours before (is there a way to terminate running webapps?).

$ 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)

The log states 2 errors, but i don't know if they are related to the cpu usage.
Sorry about the vague bug report, next time it happens I'll try to find out more.

The error log is:

Please include this information in bug reports: 
I2P version: 0.7.13-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


19:31:56.954 ERROR [acket pusher] ter.transport.udp.PacketPusher: SSU Output Queue Error
java.lang.IllegalStateException: Already written
	at net.i2p.router.transport.ntcp.NTCPConnection.bufferedPrepare(
	at net.i2p.router.transport.ntcp.NTCPConnection.send(
	at net.i2p.router.transport.ntcp.NTCPTransport.outboundMessageReady(
	at net.i2p.router.transport.TransportImpl.send(
	at net.i2p.router.transport.GetBidsJob.getBids(
	at net.i2p.router.transport.CommSystemFacadeImpl.processMessage(
	at net.i2p.router.OutNetMessagePool.add(
	at net.i2p.router.transport.TransportImpl.afterSend(
	at net.i2p.router.transport.TransportImpl.afterSend(
	at net.i2p.router.transport.udp.UDPTransport.failed(
	at net.i2p.router.transport.udp.PeerState.dropOutbound(
	at net.i2p.router.transport.udp.UDPTransport.dropPeer(
	at net.i2p.router.transport.udp.UDPTransport.failed(
	at net.i2p.router.transport.udp.UDPTransport.failed(
	at net.i2p.router.transport.udp.PeerState.finishMessages(
	at net.i2p.router.transport.udp.OutboundMessageFragments.finishMessages(
	at net.i2p.router.transport.udp.OutboundMessageFragments.getNextVolley(
17:33:28.530 ERROR [NTCP read 0 ] t.i2p.router.OutNetMessagePool: Already expired!  wtf: [OutNetMessage contains a 50 byte expiring on Tue May 04 17:33:20 GMT 2010 targetting 4TqVEQUSTjgkTw5z~~AAMSRFOAROACdHeESMapY2F3I= {timestamps: 
java.lang.Exception: Expired message
	at net.i2p.router.OutNetMessagePool.validate(
	at net.i2p.router.OutNetMessagePool.add(
	at net.i2p.router.tunnel.OutboundMessageDistributor.distribute(
	at net.i2p.router.tunnel.OutboundMessageDistributor.distribute(
	at net.i2p.router.tunnel.OutboundTunnelEndpoint$DefragmentedHandler.receiveComplete(
	at net.i2p.router.tunnel.FragmentHandler.receiveComplete(
	at net.i2p.router.tunnel.FragmentHandler.receiveInitialFragment(
	at net.i2p.router.tunnel.FragmentHandler.receiveFragment(
	at net.i2p.router.tunnel.FragmentHandler.receiveTunnelMessage(
	at net.i2p.router.tunnel.OutboundTunnelEndpoint.dispatch(
	at net.i2p.router.tunnel.TunnelDispatcher.dispatch(
	at net.i2p.router.InNetMessagePool.doShortCircuitTunnelData(
	at net.i2p.router.InNetMessagePool.shortCircuitTunnelData(
	at net.i2p.router.InNetMessagePool.add(
	at net.i2p.router.transport.TransportManager.messageReceived(
	at net.i2p.router.transport.TransportImpl.messageReceived(
	at net.i2p.router.transport.ntcp.NTCPConnection$ReadState.receiveLastBlock(
	at net.i2p.router.transport.ntcp.NTCPConnection$ReadState.receiveSubsequent(
	at net.i2p.router.transport.ntcp.NTCPConnection$ReadState.receiveBlock(
	at net.i2p.router.transport.ntcp.NTCPConnection.recvUnencryptedI2NP(
	at net.i2p.router.transport.ntcp.NTCPConnection.recvEncryptedI2NP(
	at net.i2p.router.transport.ntcp.Reader.processRead(
	at net.i2p.router.transport.ntcp.Reader.access$400(
	at net.i2p.router.transport.ntcp.Reader$
17:44:28.680 CRIT  [hutdown hook] net.i2p.router.Router         : Graceful shutdown progress - no more tunnels, safe to die
17:44:38.156 CRIT  [hutdown hook] net.i2p.router.Router         : Shutdown(2) complete
java.lang.Exception: Shutdown
	at net.i2p.router.Router.finalShutdown(
	at net.i2p.router.Router.shutdown(
	at net.i2p.router.Router$


Change History (3)

comment:1 Changed 11 years ago by zzz

Owner: set to zzz
Status: newassigned

Thanks for the detailed report.

Unfortunately the first error is a known issue unrelated to your problem, and the 2nd error is a symptom of the 100% CPU and not a cause.

So that leaves us with no clues at all. If it happens again, please take a thread dump.

comment:2 Changed 11 years ago by zzz

Component: router/generalrouter/transport
Priority: minormajor
Summary: i2p jvm taking up 100% of cpu, and [NTCP read 0] Already expired! errori2p jvm taking up 100% of cpu
Version: 0.7.13

Bug isolated by postman, patch delivered to him for testing in September, awaiting test report.

comment:3 Changed 11 years ago by welterde

Description: modified (diff)
Note: See TracTickets for help on using tickets.