5

I'm working with java OpenMPI on a server (64GB memory) to sort a big integer array (the length is 1 billion). But when I increase the length of the array, I get this error:

A fatal error has been detected by the Java Runtime Environment:

...

Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again

what is core dump? and what could be the error which causes this error? and how to resolve this error?

Community
  • 1
  • 1
user3625605
  • 323
  • 1
  • 5
  • 16
  • JVM is written in C. This seems like a native function written in C has had a problem and the OS hasn't been configured to save the dump... – Boris Pavlović Feb 25 '16 at 09:21
  • This could mean that memory the JVM thought was reserved for it wasn't actually available. Are you sure you need to sort BigIntegers as these are far slower and using far more memory than using `long` or `int`. I would try reducing the size of the JVM's heap. – Peter Lawrey Feb 25 '16 at 09:26
  • I don't mean BigInteger array, but a big array of the type integer. @PeterLawrey – user3625605 Feb 25 '16 at 10:37
  • @user3625605 in that case you need a a minimum of 4 GB, ideally 8 or 12 GB. If you create a heap which is close to the limit to what your OS will let you do, but later something changes you might have a heap which is too big. Try making the heap no more than 80% of your main memory, esp if you don't have a large swap fspace. – Peter Lawrey Feb 25 '16 at 11:08
  • BTW, if you don't need the number of occurrences you can use a couple/few of BitSet to sort all the int values. i.e. only 1/2 GB and it will be pre sorted. i.e. `O(N)` sort time instead of `O(N log N)` – Peter Lawrey Feb 25 '16 at 11:10

1 Answers1

4

A core dump (in Unix parlance), memory dump, or system dump consists of the recorded state of the working memory of a computer program at a specific time, generally when the program has crashed or otherwise terminated abnormally.
Pls refer Core dump .

I think this exception occurs because of java run out of memory

.
pls refer java run out of memory issue .

v8-E
  • 1,077
  • 2
  • 14
  • 21
New
  • 675
  • 1
  • 11
  • 21