Ticket #63 (closed defect: fixed)

Opened 2 years ago

Last modified 2 months ago

AVLNode being released multiple times

Reported by: pag Assigned to: pag
Priority: major Milestone:
Component: Mulgara Version:
Keywords: Cc:

Description (Last modified by pag)

During backups the following exception may be thrown:

Caused by: java.lang.AssertionError
at org.mulgara.store.xa.Block.dispose(Block.java:524)
at org.mulgara.store.xa.Block.release(Block.java:512)
at org.mulgara.store.xa.AVLNode.release(AVLNode.java:1030)
at org.mulgara.store.stringpool.xa.XAStringPoolImpl$Phase$GNodeTuplesImpl.close(XAStringPoolImpl.java:2728)
at org.mulgara.resolver.BackupOperation.backupDatabase(BackupOperation.java:196)
at org.mulgara.resolver.BackupOperation.execute(BackupOperation.java:145)
at org.mulgara.resolver.MulgaraTransaction.execute(MulgaraTransaction.java:547)
... 15 more

This is happening as an AVLNode is being released twice. The stack trace here shows the second release.

The AVLNode that is being closed here is a member of XAStringPoolImpl called avlNode. But this class appears to manage the avlNode member correctly. The intermittent nature of the problem is unlikely to come from this class anyway.

An alternative source of the problem could be in the ObjectPool. The XAStringPoolImpl class uses a member called writerObjectPool for managing all reusable objects for both reading and writing. It may be that a simultaneous read/write could lead the object pool to passing out the same AVLNode to different phases. Access to writerObjectPool is properly synchronized, so this is not a problem. However, it is usually valid (and desirable) to reuse the same AVLNode when reading and writing on the same phase, and this optimization may be leading to re-use between phases. If true, then this would also explain the intermittent nature of the problem.

Change History

10/14/08 21:12:25 changed by pag

  • status changed from new to closed.
  • resolution set to fixed.
  • description changed.