Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Virtual Machine / July 2003

Tip: Looking for answers? Try searching our database.

Abnormal JVM Shutdown

Thread view: 
Nikolaos Giannopoulos - 09 Jul 2003 22:20 GMT
Hi,

Does anyone know how to track down java processes simply dissappearing
on Solaris 8 (Java patches installed) with 1.4.1_01 and 1.4.2?

Should we setup shutdown hooks, or try to trap signals, etc?????

The problem appears after the app is running for quite some time - its a
multi-threaded app that does a lot of I/O (it's a video server).

Ironically the problem does not seem to occur on WinNT or RedHat Linux
6.1/6.2 so we are thinking that this may be a Solaris OS "thread
library" stability thingy or something.

The problem is in getting a snapshot "before" things go down OR at least
a log of what happened.  We see no core dumps.

Any ideas??? Comments??? Resources to track down the problem???

Very much appreciated.  Thanks,

--Nikolaos
Joseph Millar - 10 Jul 2003 01:00 GMT
> Does anyone know how to track down java processes simply dissappearing
> on Solaris 8 (Java patches installed) with 1.4.1_01 and 1.4.2?
[quoted text clipped - 12 lines]
>
> Any ideas??? Comments??? Resources to track down the problem???

There are a couple things you can try.  The Sun JVM is pretty
good about not crashing without letting you know what's going
on.  It might be your app is ending normally due to a logic error
you did not anticipate.  I'd try the following:

1. Run the JVM in -verbose mode, see if it spits out anything
  unexpected or interesting.
2. Run the app in a java debugger and trace the method calls on
  the various threads to see where the app is going.  How you
  do this varies greatly from one debugger to another.  jdb
  will work, see the "trace methods [threadid]" command.
3. Add a shutdown hook to your code to see if it gets called.
  If not, the JVM likely exited abnormally.  See
  java.lang.Runtime.addShutdownHook() for details.
4. if the shutdown hook is NOT getting called, run your app
  inside the Sun workshop debugger, dbg.  It does a better job
  of informing you of unexpected signals.  Just be aware here,
  the JVM will normally throw signals around during normal
  operation, so this may not be as helpful as you might expect.
5. Use the profiler to try and see what the app is doing.

I'm sure folks with have other ideas.

--Joe
Thomas Maslen - 11 Jul 2003 18:44 GMT
>Does anyone know how to track down java processes simply dissappearing
>on Solaris 8 (Java patches installed) with 1.4.1_01 and 1.4.2?
[quoted text clipped - 10 lines]
>The problem is in getting a snapshot "before" things go down OR at least
>a log of what happened.  We see no core dumps.

Maybe run it under a small watchdog process that forks and execs the
Java program, then uses wait() or waitpid() or waitid() or whatever
to keep an eye on it?

Thomas Maslen
maslen@pobox.com


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.