1

I am running a jar file that copies data from oracle to destination server(ElasticSearch). link text I am running this jar on AIX box :

/oradata/slscrmit/tally> oslevel -s

7100-04-03-1642

uname -a AIX mila 1 7 00F79AB04C00.

I get this Error when I run the jar file: Command used to run: java -Xms3g -Xmx3g -Xmn1g -XX:+HeapDumpOnOutOfMemoryError -XX:+UseG1GC -XX:MetaspaceSize=500m -XX:MaxMetaspaceSize=500m -XX:SurvivorRatio=2 -jar -Dlog4j.configurationFile=file:log4j2.xml -Dfile.encoding=UTF-8 BoltESTally-1.4.3-Ver-1.0.jar initload.

====================ERROR===============

JVMDUMP039I Processing dump event "systhrow", detail "java/lang/OutOfMemoryError" at 2017/12/15 08:24:21 - please wait. JVMDUMP032I JVM requested System dump using '/oradata/slscrmit/tally/core.20171215.082421.39781194.0001.dmp' in response to an event Note: "Enable full CORE dump" in smit is set to FALSE and as a result there will be limited threading information in core file. JVMDUMP010I System dump written to /oradata/slscrmit/tally/core.20171215.082421.39781194.0001.dmp JVMDUMP032I JVM requested Heap dump using '/oradata/slscrmit/tally/heapdump.20171215.082421.39781194.0002.phd' in response to an event JVMDUMP010I Heap dump written to /oradata/slscrmit/tally/heapdump.20171215.082421.39781194.0002.phd JVMDUMP032I JVM requested Java dump using '/oradata/slscrmit/tally/javacore.20171215.082421.39781194.0003.txt' in response to an event JVMDUMP010I Java dump written to /oradata/slscrmit/tally/javacore.20171215.082421.39781194.0003.txt JVMDUMP032I JVM requested Snap dump using '/oradata/slscrmit/tally/Snap.20171215.082421.39781194.0004.trc' in response to an event JVMDUMP010I Snap dump written to /oradata/slscrmit/tally/Snap.20171215.082421.39781194.0004.trc JVMDUMP013I Processed dump event "systhrow", detail "java/lang/OutOfMemoryError". Dec 15, 2017 8:24:23 AM org.elasticsearch.transport.netty.NettyInternalESLogger warn WARNING: Unexpected exception in the selector loop. java.lang.OutOfMemoryError: native memory exhausted at sun.misc.Unsafe.allocateDBBMemory(Native Method) at java.nio.DirectByteBuffer.(DirectByteBuffer.java:127) at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:311) at org.elasticsearch.common.netty.channel.socket.nio.SocketReceiveBufferAllocator.newBuffer(SocketReceiveBufferAllocator.java:64) at org.elasticsearch.common.netty.channel.socket.nio.SocketReceiveBufferAllocator.get(SocketReceiveBufferAllocator.java:41) at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.read(NioWorker.java:62) at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108) at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:318) at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89) at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178) at org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) at org.elasticsearch.common.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1153) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.lang.Thread.run(Thread.java:785).

=============================================

SVMON OUTPUT:

Pid Command Inuse Pin Pgsp Virtual 64-bit Mthrd 16MB 24315106 java 796276 11137 0 779119 N Y N

 PageSize                Inuse        Pin       Pgsp    Virtual

 s    4 KB               18356        225          0       1199

 m   64 KB               48620        682          0      48620
 L   16 MB                   0          0          0          0
 S   16 GB                   0          0          0          0

Vsid      Esid Type Description              PSize  Inuse   Pin Pgsp Virtual

169bfe6 4 work shared memory segment m 4096 0 0 4096

84ba04 e work shared memory segment m 4096 0 0 4096

1025d8c 7 work shared memory segment m 4096 0 0 4096

13225a5 6 work shared memory segment m 4096 0 0 4096

119a981 c work shared memory segment m 4096 0 0 4096

14349c 8 work shared memory segment m 4096 0 0 4096

1c2ed4e d work shared memory segment m 4096 0 0 4096

2e9eaf 9 work shared memory segment m 4096 0 0 4096

7854f1 5 work shared memory segment m 4096 0 0 4096

f2b266 f work shared memory segment m 4095 0 0 4095

181650e a work shared memory segment m 4090 0 0 4090

1d42b52 3 work working storage m 2681 0 0 2681

20002 0 work kernel segment m 743 681 0 743

===================================================: I have enough space on my Aix box: vmstat:

System configuration: lcpu=128 mem=256512M

kthr memory page faults cpu


r b avm fre re pi po fr sr cy in sy cs us sy id wa

6 1 27345787 25280860 0 0 0 0 0 0 1747 28990 59128 8 3 89 0

NON-PROD:!:_mila:/oradata/slscrmit/tally> oslevel -s

uname -a

7100-04-03-1642

NON-PROD:!:_mila:/oradata/slscrmit/tally> uname -a

AIX mila 1 7 00F79AB04C00

There is space in filestyatem as well: /dev/slscrmit_oradt 2118.50 2024.41 94.09 96% /oradata/slscrmit

enter image description here

2
  • What is your question? Also I note the lack of source code Commented Dec 15, 2017 at 10:13
  • I want to resolve this error: java.lang.OutOfMemoryError: native memory exhausted at sun.misc.Unsafe.allocateDBBMemory(Native Method) at java.nio.DirectByteBuffer. Commented Dec 18, 2017 at 6:05

1 Answer 1

1

I was able to resolve this:::

Root Cause: 32 bit JVM has technical limitations on expanding java heap memory and native memory to more than 2GB. The setenv.sh file contained. "export JAVA_HOME=/usr/java8/bin “ , which was pointing to 32 bit JVM

Solution: Goal is to point to 64bit JVM. Also check that the kernel bit mode is 64bit? Using command getconf KERNEL_BITMODE Verify 64bit JVM version using command :

java -d64 -version

Correct setenv.sh to point to 64bit jvm on all AIX boxes, export JAVA_HOME=/usr/java8_64 Make sure other entries in this file point to this JAVA_HOME.

Now run the jar and specify command line params with desired heap size. I was able to run this with 10g heap size.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.