Web Hosting Talk







View Full Version : what is Segmentation fault(core dumped)


jolly
09-28-2001, 10:00 AM
I installed JDK in linux 7.0 and exported classpath from profile.sh
And now whenever I run any command like javac or whereis java I get

Segmentation fault (core dumped)

What does it means? what should I do?

:(

mithilesh
09-28-2001, 02:01 PM
I think it is related to memory area.

ffeingol
09-28-2001, 03:59 PM
Segmentation fault's normally mean that the program is accessing memory that it should not. The (core dumped) part means that linux created a file called "core" that is an image of the programs memory when things went bad.

I can't tell you how to fix it, but you should find the core file and remove it. They can be huge.

Frank

ckpeter
09-28-2001, 04:47 PM
I recommend that you search the support/readme files, because I remember installing JDK a few weeks ago, and there are workarounds to this problem.

Peter

Lawrence
09-28-2001, 09:45 PM
I can't help you fix it, but from programming in C I can tell you what causes it. The most common cause is if you create an array with say, "X" items, and then commit the heinous crime of trying to add X + 1 items to it. C doesn't normally check such things, and would quite happily overwrite whatever is in memory beyond the end of the array - perhaps memory being used by another application.

If Linux detects that happening, it will terminate the program with a Segmentation fault. It wouldn't only be restricted to C programs of course.

As for the JDK having segmentation faults, don't ask me!

Craig
09-28-2001, 09:58 PM
we had this problem on a server, the error was coming up due to faulty memory.
Once changed, it was all well.

Check our your /var/log/messages

see if there are any kernal errors.

thanks

Craig

jolly
09-29-2001, 10:35 AM
Originally posted by ffeingol
Segmentation fault's normally mean that the program is accessing memory that it should not. The (core dumped) part means that linux created a file called "core" that is an image of the programs memory when things went bad.

I can't tell you how to fix it, but you should find the core file and remove it. They can be huge.

Frank

I deleted the core files but when I write javac same thing happens.
What should I do?

ckpeter
09-29-2001, 12:21 PM
I deleted the core files but when I write javac same thing happens.

Jolly,
Please see my post, I already told you that problem is reported on the JDK page. (in fact, I think it is related to Redhat 7.1 and the C library)

Peter