File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Linux / UNIX and the fly likes Core Dump Solaris Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Core Dump Solaris" Watch "Core Dump Solaris" New topic

Core Dump Solaris

Trisha Murphy

Joined: Sep 19, 2002
Posts: 13
Hi my Java app is crashing on solaris and causing a Core Dump.
Is there anyway I can analyze the dump?
Adrian Yan
Ranch Hand

Joined: Oct 02, 2000
Posts: 688
hehehee... what did u have for lunch, that's the content of your dump .
Sorry, core dump is just a snapshot of the process state when u ran the jvm. I'm not quite sure how you can debug that, can you try to veried you have right version install? Does it output anything at all besides the core dump?
Michael Ernest
High Plains Drifter

Joined: Oct 25, 2000
Posts: 7292

Hi Trish -
The good news is yes, you can analyze the dump. The bad news is you probably won't get much useful information.
First, you want to run the file command on the core file to find out which application it spawned from. You should then run the file command in the exectuable itself to find out it is has been stripped. This will show up in the description line.
If it has been stripped it means there is no symbol table available to convert the memory addresses stored in the dump to function names. If it hasn't been stripped, you're in luck, but you'll need to learn how to use adb to assist you with the analysis.

Make visible what, without you, might perhaps never have been seen.
- Robert Bresson
Leslie Chaim
Ranch Hand

Joined: May 22, 2002
Posts: 336
but you'll need to learn how to use adb to assist you with the analysis.

Would you know of any good link?
Also, let me share that I also had a core dump on an HP-UX box. To me, it appeared to be random. And like any obnoxious I was sure that my code was fine :roll:
Oddly enough, I was right
I wrote some logic so I can control whether my application should do it's work in thread mode and found that the core dump happened only when running in threaded mode and like a said before it was random.
So what did I do? I upgraded to 1.4 from 1.3 and all problems were gone

Normal is in the eye of the beholder
Michael Ernest
High Plains Drifter

Joined: Oct 25, 2000
Posts: 7292

Good links on source-level debugging -- can't say that I do. Like a few other things I'd like to write some day, this project's on the back burner until I find the time.
I've wanted to update this book for quite some time, but haven't drawn a great deal of interest.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17410

No Java app should EVER cause a core dump. That's what Java Exceptions are for. If you get a core dump, you either are calling a JNI routine with a bug in it or you've triggered a bug in the JVM. And the JVM is a sufficiently complex multithreaded environment that I don't give good odds on tracking down the problem to user code. Which, since user code isn't supposed to cause coredumps, would be more hacking around the problem than actually fixing it.
In cases like this, the best line is to look for known problems with the JVM (for example, under certain brands and versions of web appservers, you had to limit the stack size under Linux or they'd fail). Sometimes tweaking JVM run parameters helps. Often switching to a different version of the JVM will help.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: Core Dump Solaris
It's not a secret anymore!