I\'m really lost and I don\'t know how to face and solve my problem. I have a piece of simple Java Code, which leads to a JVM crash:
#
# A fatal error has been d
I think you should spend some time in analyzing the core.
Segmentation fault
There are several possible reasons for this. There could be a bug in the JVM itself, or in a package (some of these are written in C or C++). It could also be due to a misconfiguration where incompatible components are used together.
From experience, a JVM bug is the least likely of these. Although @Stephen thinks that is the likely case here.
If you capture the stack trace at the point of the crash, this might give you some clues as to where exactly the crash is occurring.
Firstly, I see that you need to confgure ulimit -c unlimited so that you can store the core file to disk.
Analyze Core file
Once you do that, you should analyze the core using the following method.
To convert the file use the commandline tool jmap.
jmap -dump:format=b,file=dump.hprof /usr/bin/java core_file
where:
dump.hprof is the name of the hprof file you wish to create
/usr/bin/java is the path to the version of the java binary that generated the core dump