Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Segmentation fault while running Java program on Linux

Tags:

java

linux

I am running a JAVA program on RHEL 6.4 Server. The program terminates abnormally displaying the messaeg "Segmentation fault(Core dumped)". But i do not find any file indicating the reason for termination in the current user directory from where the program was run.

How can i debug to find the error in such case?

DOUBT

As per my understandin segmentation fault occurs when program tries to access a memory address outside the programs range. I would expect to see such faults in C or C++ programs, but in Java since there are no pointers , how is segmentation fault possible.

like image 940
juan Avatar asked Oct 21 '22 22:10

juan


1 Answers

how is segmentation fault possible.

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 I've seen some).

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.

like image 159
NPE Avatar answered Nov 03 '22 21:11

NPE