views:

414

answers:

1

Hi,

My Java (Eclipse) application is spawning a child process, monitoring its stdout stream and exit value. When the child process is crashing with SIGABRT, there is no core dump file created. If I start the child process manually and kill it, the core dump is there alright.

I couldn't find any info about whether the JVM prepares somehow the child process (for example setting the core dump file size to 0).

Does anybody know what might be going on and what settings to change so that the core dumps are created?

This is on Suse 10 and Ubuntu 9.04, with Java 5 and 6, if it makes any difference.

best regards, Vlad

+2  A: 

Normally, the (non-)creation of core files is controlled by the ulimit command (specifically ulimit -c). See help ulimit (in bash) for details.

This setting should be inherited from shell to subshell, so Java should use the setting in the shell it was started from. Java might mess with ulimit, but I've never heard of it doing this.

Try setting ulimit in a shell, then starting your Java process from there. If that does not help, you could invoke a wrapper script from Java which sets ulimit, then starts your program.

sleske
Thanks, I'll try with wrapper, didn't think about that.
Vlad Dumitrescu
This worked, thanks a lot!
Vlad Dumitrescu