Persistit crash method can cause hang

Bug #1069900 reported by Nathan Williams
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Akiban Persistit
Confirmed
Low
Unassigned

Bug Description

Persistit r382

The Akiban Server build job hung last week in what seemed to be well exercised Persistit code:
http://172.16.20.104:8080/job/server-build/3211/console

Slightly snipped thread dump of interest:
"main" prio=10 tid=0x0000000040234000 nid=0x4d0e waiting on condition [0x00007f097a572000]
   java.lang.Thread.State: WAITING (parking)
 at sun.misc.Unsafe.park(Native Method)
 - parking to wait for <0x00000000e087ac08> (a java.util.concurrent.locks.ReentrantLock$NonfairSync)
 at java.util.concurrent.locks.LockSupport.park(LockSupport.java:156)
 at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:811)
 at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(AbstractQueuedSynchronizer.java:842)
 at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1178)
 at java.util.concurrent.locks.ReentrantLock$NonfairSync.lock(ReentrantLock.java:186)
 at java.util.concurrent.locks.ReentrantLock.lock(ReentrantLock.java:262)
 at java.util.concurrent.ArrayBlockingQueue.clear(ArrayBlockingQueue.java:572)
 at com.persistit.CleanupManager.clear(CleanupManager.java:194)
 - locked <0x00000000e087ac60> (a com.persistit.CleanupManager)
 at com.persistit.Persistit.releaseAllResources(Persistit.java:1843)
 at com.persistit.Persistit.crash(Persistit.java:1795)
 at com.akiban.server.service.tree.TreeServiceImpl.crash(TreeServiceImpl.java:280)

Comments from Peter:
Well the IOTaskRunnable#crash method calls deprecated Thread#stop(). It's deprecated because it can leave monitors in inconsistent states. I suspect that's what happened here. Perhaps we can modify that crash method to try interrupting the Thread a few times before calling stop it, so yes, I guess we should file a low-priority bug.

And I believe this is the only time this type of hang as been observed. As such, marking as low priority.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.