[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Ozone should exit cleanly upon control-C



On Mon, 26 Mar 2001, Jan van Oort wrote:
> Falko Braeutigam wrote:
> 
> > On Mon, 26 Mar 2001, Jan van Oort wrote:
> > > I have noticed that datafile corruption may occur when an ozone Server
> > > instance is aborted brutally (for example, by doing control-C, or by
> > > doing kill -STOP <ozone_process_number> on Unix).
> >
> > A server abort (regardless of its level of brutality) should not cause any
> > datafile corruption. The small timeframe between begin and end of commit of
> > update transactions (excluding prepare-commit) is to only real dangorous spot.
> > What did you do to corrupt files? Can you recreate this?
> >
> 
> Yes, I can recreate this. With ozone-0.6.1 On Solaris for x86/Intel:
> - build with ant
> - run ozoneInst -d/test/data (test is a mountpoint for a newly created filesystem
> on a very recently formatted, brand-new Fujitsu disk); everything goes fine
> - run ozone with the "&" sign at the end of the bash command line (as I want to
> re-use that terminal for occasional things like sar or vmstat to see system
> health) on this newly created database
> - run the AdminClient in order to create a user, and exit cleanly from AdminClient
> 
> - with ps -ef get the ozone process number (e.g. 10014)
> - then "kill -STOP 10014"
> - then re-start ozone; I get a message (forgot the exact trace, it happened last
> nigth, I can send you the exact trace tomorrow morning) something like 'data file
> not found' or 'bad data file', and ozone exits.

-STOP does not actually kill the process and so the port is not released which
will cause the next ozone server that starts to throw an "unable to bind"
exception. However, -SIGSEGV is for sure the most brutal abort. But it causes
no problems on my linux based ozone server.


Falko

> 
> 
> >
> > >
> > > Is it possible to implement Runtime.addShutdownHook( Thread _hook) ?
> > > This method is available in the JDK1.3 only. It enables the JVM to exit
> > > cleanly in case of such "unclean"  process abortion.
> >
> > Not all users have a 1.3 JVM. Some time ago some users tried to come up with a
> > JVM independent solution. Unfortunately they did not get too far.
> >
> 
> We tried the same thing for our piece of software under JDK 1.2.x; we never got
> something like a ShutdownHook working before JDK 1.3
> 
> Anyway, I'll create a shutdown hook, test it thoroughly, then send it to you. You
> see what you do with it. I will use it anyway, as my installer also installs the
> JVM.
> 
> >
> > Falko
> >
> > >
> > > I will fist try it on my own machine (Solaris 8 on Intel), will then
> > > report back.
> > >
> > > --
> > > Jan van Oort
> > >
> > >
> > > Database Fire Fighter
> > --
> > ______________________________________________________________________
> > Falko Braeutigam                              mailto:falko@smb-tec.com
> > SMB GmbH                                        http://www.smb-tec.com
> 
> --
> Jan van Oort
> 
> 
> Database Fire Fighter
-- 
______________________________________________________________________
Falko Braeutigam                              mailto:falko@smb-tec.com
SMB GmbH                                        http://www.smb-tec.com