[Mulgara-general] Exception on startup

Paul Gearon gearon at ieee.org
Thu Apr 24 19:20:26 UTC 2008

On Apr 24, 2008, at 11:34 AM, Alex Hall wrote:

> Andrae Muys wrote:
>>> What exactly do you mean by a clean shutdown?  I thought that the
>>> philosophy on shutdowns was that killing the Java process (i.e.
>>> hitting
>>> Ctrl-C) is considered a clean shutdown, as care is taken during
>>> transactions to ensure that the system can always be restored to a
>>> consistent state.  Is this not the case?
>> It is the case.  However if mulgara is given the opportunity it will
>> explicitly release any operating-system resources, including any
>> locks or open files.
> How does this happen?  Even if one invokes the shutdown hook on the
> server (using the -x option to the Mulgara jar), all this does is call
> System.exit(0).  As far as I can tell, there are no shutdown hooks
> registered with the Java runtime, so no cleanup will occur.

Actually, it has to do with transactions that had 'commit' called on  
them, but the new roots to all the trees have not yet made it into the  
meta-files. In this case we have enough information to allow the  
commit to complete, so that's what we try to do. The exceptions listed  
earlier in this thread appear to be describing just this situation.

Whether the transaction recovery works or not (it's supposed to always  
work, but the memory mapping seems to be killing it) the data  
structures on disk will be consistent.

>> I suspect what is happening here is that
>> windows is taking its time cleaning up after the process, and we are
>> conflicting with a stale lock of some description.  But that really
>> is just a wild guess.
> I wouldn't be at all surprised if this is the case.  In the past I've
> had trouble with Windows not releasing sockets in a timely fashion, I
> can certainly see something similar happening here.

You know, a slow release of locks on a file would explain some of the  
issues we've been getting in Windows.


More information about the Mulgara-general mailing list