[Mulgara-general] 'Lost phase token' messages

Paul Gearon gearon at ieee.org
Wed Nov 15 17:43:28 UTC 2006


On Nov 14, 2006, at 2:08 AM, Andrae Muys wrote:
> On 14/11/2006, at 3:44 PM, Life is hard, and then you die wrote:
>> we're seeing a fair number 'Lost phase token' messages in the logs.
>> For example, after about 80 updates and 900 queries there were over
>> 1100 lost-phase-token messages in the log. If I up the JVM's memory
>> to 500MB it goes down to about 800. (there are only a few hundred
>> statements in about 10 models in this test)
>>
>> Looking briefly at the code these seem mostly harmless, i.e soft
>> references having been cleared. But I'm just wondering if this is
>> something everybody else is seeing, or if this is indicative of some
>> problem.
>
> mmmm, it's indicative of a tuples (intermediate result) not being  
> closed somewhere and leaking through to the finalizer.  It isn't  
> going to cause any real trouble as the message is being printed as  
> the tuples is being reclaimed by the gc.  OTOH it does mean that  
> mulgara is temporarily leaking memory (and worse, possibly file  
> handles).  I'm not really surprised, this is a easy mistake to  
> make.  When Tucana was still around, one of us would generally  
> spend a week chasing down the 'lost phase tokens' just before a  
> release.  Without fulltime engineers on staff, that little piece of  
> housekeeping has been neglected of late.
>
> Anyone out there interested in getting started with Mulgara  
> internals?  This would be an excellent janitorial task that would  
> familiarise you with the code without really requiring you to  
> understand the code up front.

While it's possible that this is an internal resource leak, I am  
skeptical.  Not enough work has occurred in this code since it was  
last confirmed to be clean for new errors like this to have appeared  
(except perhaps your own code Andrae, but I expect you've been good  
at cleaning up your resources).

These messages are almost always caused by client code not closing an  
Answer object.  Answers hold Tuples, and Tuples hold Phases.  If you  
don't close your Answers, then you'll get these messages as the  
finalizers clean them up.

I'd first confirm that all Answers are being closed.  Only when that  
is confirmed is it worthwhile checking if the Mulgara code has an  
error in it.

Paul



More information about the Mulgara-general mailing list