Project

General

Profile

Bug #63

AVLNode being released multiple times

Added by Paula Gearon over 15 years ago. Updated about 14 years ago.

Status:
Closed
Priority:
High
Assignee:
Category:
Mulgara
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
fixed

Description

During backups the following exception may be thrown:
<br/>

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

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

<br/>
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.
<br/>

<br/>
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.
#1

Updated by Paula Gearon about 14 years ago

  • Status changed from New to Closed
  • Resolution set to fixed

Also available in: Atom PDF