Bug 13355

GemStone/S

6.7, 6.6.5, 6.6.4, 6.6.3.3, 6.6.3.2, 6.6.3, 6.6.2, 6.6.1, 6.6, 6.5.8, 6.5.7.5, 6.5.7, 6.5.6, 6.5.5, 6.5.4, 6.5.2, 6.5.1, 6.5, 6.3.1, 6.3, 6.2.x, 6.2, 6.1.6, 6.1.5, 6.1.x, 6.0.x, 5.1.5.1, older versions

All

listInstances results may include dead objects

The following sequence may cause instances to be committed that shouldn't
have been:

  markForCollection
  listInstances on Foo
  commit
  objectAudit

In this case, markForCollection finds instances of Foo and records them
as possibleDead. Because the markForCollection ends its operation with
an abort, the session votes on the possibleDead (and doesn't remove any
from possibleDead). The listInstances method (operating on the transaction
view at the end of the markForCollection) finds those instances of Foo
that the mark added to the possible dead and commits them. If the GcGem
had completed its sweep of the possibleDeadWsUnion, the commit would have
failed, because the object is placed in the exclusiveLock set when the
sweep completes.

Workaround

Avoid committing the result of listInstances or listReferences.

In a single user system, you can do a SystemRepository reclaimAll between
the markForCollection and the call to listInstances. This sequence guarantees
that the view of the repository doesn't contain any unreclaimed dead, meaning
that only "live" instances will be found.

In a multiuser environment, monitor the deadNotReclaimed and wait until
this goes to zero.


Last updated: 11/20/07