Opened 3 years ago

Last modified 3 years ago

#2097 open defect

ANR in

Reported by: str4d Owned by:
Priority: minor Milestone: undecided
Component: router/general Version: 0.9.31
Keywords: I2P Android, hang, time Cc:
Parent Tickets: Sensitive: no


Spotted on an LGE LG Magna (my90ds), 1024MB RAM, Android 5.0 (two reports from the same user):

"main" prio=5 tid=1 Waiting
  | group="main" sCount=1 dsCount=0 obj=0x7442a2c8 self=0xb738df48
  | sysTid=5377 nice=-6 cgrp=apps sched=0/0 handle=0xb6fa5ec8
  | state=S schedstat=( 0 0 0 ) utm=1938 stm=538 core=2 HZ=100
  | stack=0xbe749000-0xbe74b000 stackSize=8MB
  | held mutexes=
  at java.lang.Object.wait! (Native method)
- waiting on <0x1f078bb8> (a java.lang.Object)
  at java.lang.Thread.parkFor (
- locked <0x1f078bb8> (a java.lang.Object)
  at sun.misc.Unsafe.park (
  at java.util.concurrent.locks.LockSupport.park (
  at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await (
  at java.util.concurrent.LinkedBlockingQueue.put (
  at net.i2p.util.LogManager.addRecord (
  at net.i2p.util.Log.log (
  at net.i2p.router.RouterClock.notifyMassive (
- locked <@addr=0x12c0d080> (a net.i2p.router.RouterClock)
  at (
  at (
  at (

I don't think we ever want to block on logging.


Change History (1)

comment:1 Changed 3 years ago by zzz

Status: newopen

Can't figured out why it blocked there, unless just bad luck.

We could pull the logging out of the lock, but, notifyMassive is about to soft-restart the whole router, so the wait is just beginning.

This is a side-effect of our clock management scheme, where we don't have a separate thread doing the slewing and shift detection (that would be a lot harder). So anybody could get stuck in now(), but it hardly ever happens.

We did confirm that the log LBQ is 1024, so it's almost impossible that it filled up, especially on Android with default settings.

Note: See TracTickets for help on using tickets.