RHEL jdk-8u20-linux-x64.tar.gz 1.8 acts like 32bit

I am creating a new car. I accidentally installed 32-bit Java, but I disabled it and I installed jdk-8u20-linux-x64.tar.gz (also used RPM).

This unit has 132G or memory, but I suspect I am running a 32 bit Java application because it always runs out or memory in the same place, regardless of the -Xmx setting.

I am getting a dump from java. He complains that I have a 0 limit per core, but most of the ulimit settings are unlimited or significant.

The err.log indicates either the lack of physical memory. or in 32-bit mode. I can't believe the former, but I can't prove / disprove the latter.

The program also manages an array of processes. It chokes after calling 12 java processes, each of which immediately reads 2G of data into memory.

Here's a proof of concept for the app:

import java.util.*;
import java.io.*;
public class PrintProps {

public static void main(String[] args) {
for (String pname : System.getProperties().stringPropertyNames()) {
    System.out.println(String.format("Key:%30s  PropVal:%s", pname,         System.getProperty(pname)));
}
ArrayList<Process> alist = new ArrayList<Process>();

for (int i = 0; i < 50; i++) {
    String[] jargs = new String[]{
    "java",
    "-cp",
    "/usr/sup/jars/jpsgcs-pipe-pathing.jar",
    "jpsgcs.pipe.SGSPValue",
    "-d=/export/home/raja/SGS/CLL_MM_MBL/CLL_MM_DC/chrom9/6211-CLL_only_9.Loci.ped",
    "-p=/base/Human610Q/ld/chrom9/TF_H610Q_9.ld",
    String.format("-f=/tmp/6211/10K.%d",i)};

    ProcessBuilder pb = new ProcessBuilder(jargs);
        pb.directory(new File("."));
        pb.inheritIO();
    System.out.println(String.format("pbuilder %d ", i ));
    try {
    alist.add(pb.start());
    Thread.sleep(1000);
    }
    catch (Exception e) {
    e.printStackTrace();
    }
}
  }
}

      

TL / DR warning. Unfortunately

Here is hs_err.log

#
# There is insufficient memory for the Java Runtime Environment to continue.
# Cannot create GC thread. Out of system resources.
# Possible reasons:
#   The system is out of physical RAM or swap space
#   In 32 bit mode, the process size limit was hit
# Possible solutions:
#   Reduce memory load on the system
#   Increase physical memory or swap space
#   Check if swap backing store is full
#   Use 64 bit Java on a 64 bit OS
#   Decrease Java heap size (-Xmx/-Xms)
#   Decrease number of Java threads
#   Decrease Java thread stack sizes (-Xss)
#   Set larger code cache with -XX:ReservedCodeCacheSize=
# This output file may be truncated or incomplete.
#
#  Out of Memory Error (gcTaskThread.cpp:48), pid=7938, tid=139841170798336
#
# JRE version:  (8.0_20-b26) (build )
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.20-b23 mixed mode linux-amd64 compressed oops)
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#

---------------  T H R E A D  ---------------

Current thread (0x00007f2f48009000):  JavaThread "Unknown thread" [_thread_in_vm, id=7940, stack(0x00007f2f4f3f7000,0x00007f2f4f4f8000)]

Stack: [0x00007f2f4f3f7000,0x00007f2f4f4f8000],  sp=0x00007f2f4f4f6680,  free space=1021k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0xa76cea]  VMError::report_and_die()+0x2ca
V  [libjvm.so+0x4e52fb]  report_vm_out_of_memory(char const*, int, unsigned long, VMErrorType, char const*)+0x8b
V  [libjvm.so+0x5afaff]  GCTaskThread::GCTaskThread(GCTaskManager*, unsigned int, unsigned int)+0x11f
V  [libjvm.so+0x5af068]  GCTaskManager::initialize()+0x2c8
V  [libjvm.so+0x90697b]  ParallelScavengeHeap::initialize()+0x32b
V  [libjvm.so+0xa44d0d]  Universe::initialize_heap()+0xfd
V  [libjvm.so+0xa4512f]  universe_init()+0x3f
V  [libjvm.so+0x612055]  init_globals()+0x65
V  [libjvm.so+0xa2acdd]  Threads::create_vm(JavaVMInitArgs*, bool*)+0x24d
V  [libjvm.so+0x6a9414]  JNI_CreateJavaVM+0x74
C  [libjli.so+0x736e]  JavaMain+0x9e
C  [libpthread.so.0+0x79d1]


---------------  P R O C E S S  ---------------

Java Threads: ( => current thread )

Other Threads:

=>0x00007f2f48009000 (exited) JavaThread "Unknown thread" [_thread_in_vm, id=7940, stack(0x00007f2f4f3f7000,0x00007f2f4f4f8000)]

VM state:not at safepoint (not fully initialized)

VM Mutex/Monitor currently owned by a thread: None

GC Heap History (0 events):
No events

Deoptimization events (0 events):
No events

Internal exceptions (0 events):
No events

Events (0 events):
No events


Dynamic libraries:
00400000-00401000 r-xp 00000000 fd:00 23069232                           /usr/java/jdk1.8.0_20/bin/java
00600000-00601000 rw-p 00000000 fd:00 23069232                           /usr/java/jdk1.8.0_20/bin/java
01648000-01669000 rw-p 00000000 00:00 0                                  [heap]
80200000-d4200000 rw-p 00000000 00:00 0 
d4200000-580100000 ---p 00000000 00:00 0 
580100000-5aa100000 rw-p 00000000 00:00 0 
5aa100000-800000000 ---p 00000000 00:00 0 
32a4a00000-32a4a20000 r-xp 00000000 fd:00 11010054                       /lib64/ld-2.12.so
32a4c1f000-32a4c20000 r--p 0001f000 fd:00 11010054                       /lib64/ld-2.12.so
32a4c20000-32a4c21000 rw-p 00020000 fd:00 11010054                       /lib64/ld-2.12.so
32a4c21000-32a4c22000 rw-p 00000000 00:00 0 
32a4e00000-32a4e83000 r-xp 00000000 fd:00 11010116                       /lib64/libm-2.12.so
32a4e83000-32a5082000 ---p 00083000 fd:00 11010116                       /lib64/libm-2.12.so
32a5082000-32a5083000 r--p 00082000 fd:00 11010116                       /lib64/libm-2.12.so
32a5083000-32a5084000 rw-p 00083000 fd:00 11010116                       /lib64/libm-2.12.so
32a5200000-32a538a000 r-xp 00000000 fd:00 11010055                       /lib64/libc-2.12.so
32a538a000-32a558a000 ---p 0018a000 fd:00 11010055                       /lib64/libc-2.12.so
32a558a000-32a558e000 r--p 0018a000 fd:00 11010055                       /lib64/libc-2.12.so
32a558e000-32a558f000 rw-p 0018e000 fd:00 11010055                       /lib64/libc-2.12.so
32a558f000-32a5594000 rw-p 00000000 00:00 0 
32a5600000-32a5617000 r-xp 00000000 fd:00 11010062                       /lib64/libpthread-2.12.so
32a5617000-32a5817000 ---p 00017000 fd:00 11010062                       /lib64/libpthread-2.12.so
32a5817000-32a5818000 r--p 00017000 fd:00 11010062                       /lib64/libpthread-2.12.so
32a5818000-32a5819000 rw-p 00018000 fd:00 11010062                       /lib64/libpthread-2.12.so
32a5819000-32a581d000 rw-p 00000000 00:00 0 
32a5a00000-32a5a02000 r-xp 00000000 fd:00 11010076                       /lib64/libdl-2.12.so
32a5a02000-32a5c02000 ---p 00002000 fd:00 11010076                       /lib64/libdl-2.12.so
32a5c02000-32a5c03000 r--p 00002000 fd:00 11010076                       /lib64/libdl-2.12.so
32a5c03000-32a5c04000 rw-p 00003000 fd:00 11010076                       /lib64/libdl-2.12.so
32a6200000-32a6207000 r-xp 00000000 fd:00 11010066                       /lib64/librt-2.12.so
32a6207000-32a6406000 ---p 00007000 fd:00 11010066                       /lib64/librt-2.12.so
32a6406000-32a6407000 r--p 00006000 fd:00 11010066                       /lib64/librt-2.12.so
32a6407000-32a6408000 rw-p 00007000 fd:00 11010066                       /lib64/librt-2.12.so
32b5600000-32b5616000 r-xp 00000000 fd:00 11010100                       /lib64/libnsl-2.12.so
32b5616000-32b5815000 ---p 00016000 fd:00 11010100                       /lib64/libnsl-2.12.so
32b5815000-32b5816000 r--p 00015000 fd:00 11010100                       /lib64/libnsl-2.12.so
32b5816000-32b5817000 rw-p 00016000 fd:00 11010100                       /lib64/libnsl-2.12.so
32b5817000-32b5819000 rw-p 00000000 00:00 0 
7f2f32c00000-7f2f32ea0000 rw-p 00000000 00:00 0 
7f2f32ea0000-7f2f35400000 ---p 00000000 00:00 0 
7f2f35400000-7f2f356a0000 rw-p 00000000 00:00 0 
7f2f356a0000-7f2f37bff000 ---p 00000000 00:00 0 
7f2f37bff000-7f2f37d50000 rw-p 00000000 00:00 0 
7f2f37d50000-7f2f38fff000 ---p 00000000 00:00 0 
7f2f38fff000-7f2f39000000 rw-p 00000000 00:00 0 
7f2f39000000-7f2f39270000 rwxp 00000000 00:00 0 
7f2f39270000-7f2f48000000 ---p 00000000 00:00 0 
7f2f48000000-7f2f48039000 rw-p 00000000 00:00 0 
7f2f48039000-7f2f4c000000 ---p 00000000 00:00 0 
7f2f4e129000-7f2f4e39e000 rw-p 00000000 00:00 0 
7f2f4e39e000-7f2f4e39f000 ---p 00000000 00:00 0 
7f2f4e39f000-7f2f4e49f000 rw-p 00000000 00:00 0 
7f2f4e49f000-7f2f4e4a0000 ---p 00000000 00:00 0 
7f2f4e4a0000-7f2f4e5aa000 rw-p 00000000 00:00 0 
7f2f4e5aa000-7f2f4e960000 ---p 00000000 00:00 0 
7f2f4e960000-7f2f4e97a000 r-xp 00000000 fd:00 23069413                   /usr/java/jdk1.8.0_20/jre/lib/amd64/libzip.so
7f2f4e97a000-7f2f4eb7a000 ---p 0001a000 fd:00 23069413                   /usr/java/jdk1.8.0_20/jre/lib/amd64/libzip.so
7f2f4eb7a000-7f2f4eb7b000 rw-p 0001a000 fd:00 23069413                   /usr/java/jdk1.8.0_20/jre/lib/amd64/libzip.so
7f2f4eb7b000-7f2f4eb85000 r-xp 00000000 fd:00 11010081                   /lib64/libnss_nis-2.12.so
7f2f4eb85000-7f2f4ed84000 ---p 0000a000 fd:00 11010081                   /lib64/libnss_nis-2.12.so
7f2f4ed84000-7f2f4ed85000 r--p 00009000 fd:00 11010081                   /lib64/libnss_nis-2.12.so
7f2f4ed85000-7f2f4ed86000 rw-p 0000a000 fd:00 11010081                   /lib64/libnss_nis-2.12.so
7f2f4ed86000-7f2f4ed92000 r-xp 00000000 fd:00 11010077                   /lib64/libnss_files-2.12.so
7f2f4ed92000-7f2f4ef92000 ---p 0000c000 fd:00 11010077                   /lib64/libnss_files-2.12.so
7f2f4ef92000-7f2f4ef93000 r--p 0000c000 fd:00 11010077                   /lib64/libnss_files-2.12.so
7f2f4ef93000-7f2f4ef94000 rw-p 0000d000 fd:00 11010077                   /lib64/libnss_files-2.12.so
7f2f4efbc000-7f2f4efe6000 r-xp 00000000 fd:00 23069378                   /usr/java/jdk1.8.0_20/jre/lib/amd64/libjava.so
7f2f4efe6000-7f2f4f1e6000 ---p 0002a000 fd:00 23069378                   /usr/java/jdk1.8.0_20/jre/lib/amd64/libjava.so
7f2f4f1e6000-7f2f4f1e8000 rw-p 0002a000 fd:00 23069378                   /usr/java/jdk1.8.0_20/jre/lib/amd64/libjava.so
7f2f4f1e8000-7f2f4f1f5000 r-xp 00000000 fd:00 23069412                   /usr/java/jdk1.8.0_20/jre/lib/amd64/libverify.so
7f2f4f1f5000-7f2f4f3f5000 ---p 0000d000 fd:00 23069412                   /usr/java/jdk1.8.0_20/jre/lib/amd64/libverify.so
7f2f4f3f5000-7f2f4f3f7000 rw-p 0000d000 fd:00 23069412                   /usr/java/jdk1.8.0_20/jre/lib/amd64/libverify.so
7f2f4f3f7000-7f2f4f3fa000 ---p 00000000 00:00 0 
7f2f4f3fa000-7f2f4f4f8000 rw-p 00000000 00:00 0 
7f2f4f4f8000-7f2f50162000 r-xp 00000000 fd:00 23069417                   /usr/java/jdk1.8.0_20/jre/lib/amd64/server/libjvm.so
7f2f50162000-7f2f50361000 ---p 00c6a000 fd:00 23069417                   /usr/java/jdk1.8.0_20/jre/lib/amd64/server/libjvm.so
7f2f50361000-7f2f50438000 rw-p 00c69000 fd:00 23069417                   /usr/java/jdk1.8.0_20/jre/lib/amd64/server/libjvm.so
7f2f50438000-7f2f5047d000 rw-p 00000000 00:00 0 
7f2f5047d000-7f2f50492000 r-xp 00000000 fd:00 23069680                   /usr/java/jdk1.8.0_20/lib/amd64/jli/libjli.so
7f2f50492000-7f2f50691000 ---p 00015000 fd:00 23069680                   /usr/java/jdk1.8.0_20/lib/amd64/jli/libjli.so
7f2f50691000-7f2f50692000 rw-p 00014000 fd:00 23069680                   /usr/java/jdk1.8.0_20/lib/amd64/jli/libjli.so
7f2f50692000-7f2f50693000 rw-p 00000000 00:00 0 
7f2f506ae000-7f2f506b1000 rw-p 00000000 00:00 0 
7f2f506b1000-7f2f506b9000 rw-s 00000000 fd:00 12583065                   /tmp/hsperfdata_rob/7938
7f2f506b9000-7f2f506ba000 rw-p 00000000 00:00 0 
7f2f506ba000-7f2f506bb000 r--p 00000000 00:00 0 
7f2f506bb000-7f2f506bc000 rw-p 00000000 00:00 0 
7fff31e86000-7fff31e9b000 rw-p 00000000 00:00 0                          [stack]
7fff31eb9000-7fff31eba000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]

VM Arguments:
java_command: jpsgcs.pipe.SGSPValue -b -d=/export/home/rob/SGS/CLL_MM_MBL/CLL_MM_DC/chrom9/6211-CLL_only_9.Loci.ped -p=/base/Human610Q/ld/chrom9/TF_H610Q_9.ld -n=400 -s=1 --dist=8
java_class_path (initial): /usr/sup/jars/jpsgcs-pipe-pathing.jar
Launcher Type: SUN_STANDARD

Environment Variables:
JAVA_HOME=/usr/java/jdk1.8.0
CLASSPATH=/usr/sup/jars/jpsgcs-pipe-pathing.jar
PATH=.:/usr/sup/apache-maven-3.1.1/bin:/usr/sup/groovy/bin:/home/work/toolshed/gradle-2.0/bin:/usr/sup/eclipse:/usr/sup/pgsql/bin:/export/home/rob/bin:/usr/sup/bin:/usr/java/jdk1.8.0/bin:/usr/bin:/bin:/usr/sbin
USERNAME=rob
SHELL=/bin/bash
DISPLAY=:0.0

Signal Handlers:
SIGSEGV: [libjvm.so+0xa77530], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO
SIGBUS: [libjvm.so+0xa77530], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO
SIGFPE: [libjvm.so+0x8e1d90], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO
SIGPIPE: [libjvm.so+0x8e1d90], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO
SIGXFSZ: [libjvm.so+0x8e1d90], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO
SIGILL: [libjvm.so+0x8e1d90], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO
SIGUSR1: SIG_DFL, sa_mask[0]=00000000000000000000000000000000, sa_flags=none
SIGUSR2: [libjvm.so+0x8e35c0], sa_mask[0]=00100000000000000000000000000000, sa_flags=SA_RESTART|SA_SIGINFO
SIGHUP: SIG_DFL, sa_mask[0]=00000000000000000000000000000000, sa_flags=none
SIGINT: SIG_DFL, sa_mask[0]=00000000000000000000000000000000, sa_flags=none
SIGTERM: SIG_DFL, sa_mask[0]=00000000000000000000000000000000, sa_flags=none
SIGQUIT: SIG_DFL, sa_mask[0]=00000000000000000000000000000000, sa_flags=none


---------------  S Y S T E M  ---------------

OS:Red Hat Enterprise Linux Server release 6.5 (Santiago)

uname:Linux 2.6.32-431.29.2.el6.x86_64 #1 SMP Sun Jul 27 15:55:46 EDT 2014 x86_64
libc:glibc 2.12 NPTL 2.12 
rlimit: STACK 10240k, CORE 0k, NPROC 1024, NOFILE 4096, AS infinity
load average:6.35 1.57 0.69

/proc/meminfo:
MemTotal:       132108656 kB
MemFree:        109573200 kB
Buffers:           71664 kB
Cached:          2582360 kB
SwapCached:            0 kB
Active:         19304804 kB
Inactive:        1990228 kB
Active(anon):   18639784 kB
Inactive(anon):     7724 kB
Active(file):     665020 kB
Inactive(file):  1982504 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:       8208380 kB
SwapFree:        8208380 kB
Dirty:            138276 kB
Writeback:             0 kB
AnonPages:      18403024 kB
Mapped:           168804 kB
Shmem:              5968 kB
Slab:             276284 kB
SReclaimable:     137288 kB
SUnreclaim:       138996 kB
KernelStack:       14032 kB
PageTables:        77708 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:    74262708 kB
Committed_AS:   71622560 kB
VmallocTotal:   34359738367 kB
VmallocUsed:      518808 kB
VmallocChunk:   34289913932 kB
HardwareCorrupted:     0 kB
AnonHugePages:  16584704 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:       65536 kB
DirectMap2M:     4079616 kB
DirectMap1G:    130023424 kB


CPU:total 32 (8 cores per cpu, 2 threads per core) family 6 model 62 stepping 4, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, aes, clmul, erms, ht, tsc, tscinvbit



Memory: 4k page, physical 132108656k(109565180k free), swap 8208380k(8208380k free)

vm_info: Java HotSpot(TM) 64-Bit Server VM (25.20-b23) for linux-amd64 JRE (1.8.0_20-b26), built on Jul 30 2014 13:13:52 by "java_re" with gcc 4.3.0 20080428 (Red Hat 4.3.0-8)

time: Tue Oct 14 16:15:03 2014
elapsed time: 0 seconds (0d 0h 0m 0s)

      

+3


source to share


2 answers


You may be running into a custom OS process limit (which from my empirical research includes Java threads). Reaching this limit can manifest itself in OutOfMemoryError

.

RHEL has:

/etc/security/limits.d/90-nproc.conf

      

... which contains custom constraints. In RHEL6 (and CentOS6) the "maximum user processes" is set to 1024 by default.



Try installing it to unlimited

:

# Default limit for number of user processes to prevent
# accidental fork bombs.
# See rhbz #432903 for reasoning.

*          soft    nproc     unlimited
root       soft    nproc     unlimited

      

This answer assumes that you must restart for these changes to take effect.

+4


source


I also got the same hs_err_pid * .log when upgrading JRE from JRE-6u45 to JRE-8u20 (server distribution) on 64-bit Linux operating system.

I have a test case to reproduce. When I run multiple instances of this test case, on JRE-6u45, I never get "not enough memory for the JVM" or hs_err_pid * .log. The same test case gives hs_err_pid * .log with insufficient memory on the same m / s.



Then I found out that I installed the JRE-8u20 and JRE-6u45 server distribution that I had with the desktop version. To confirm this, I installed the desktop version of JRE-8u20 and no problem now.

But I don't understand the root cause - why the difference is in b / w server and desktop version. are there memory limits?

-1


source







All Articles