Ubuntu + Tomcat7.0 + jdk7,hs_err_pid%.log文件每小时都在生成

时间:2015-05-28 16:51:59

标签: java tomcat ubuntu

更新:我安装了Oracle版本的jdk1.7,并使用update-alternative来使用Oracle jdk而不是openjdk,然后问题就消失了。我的一些frds说openJDK有时会有bug。不知道为什么,但无论如何它已经解决了。

大家好我是linux的新手,但最近我租了一个网络托管服务器来测试我自己的项目。(os:ubuntu 12.04,它预装了Tomcat7,mysql,nginx和jdk7)

有趣的事情发生在昨天我将一个webapp部署到tomcat之后。 hs_err_pidxxxxx.log每隔一小时就会生成一次。以下是生成的相关错误日志的屏幕截图:

drwxr-xr-x  13 root root  3880 May 28 13:36 dev
drwxr-xr-x 101 root root  4096 May 28 13:35 etc
drwxr-xr-x   4 root root  4096 May 25 13:25 home
-rw-r-----   1 root root 19561 May 27 23:06 hs_err_pid11601.log
-rw-r-----   1 root root 19561 May 28 00:06 hs_err_pid11670.log
-rw-r-----   1 root root 19512 May 28 01:06 hs_err_pid11866.log
-rw-r-----   1 root root 19514 May 28 02:06 hs_err_pid13256.log
-rw-r-----   1 root root 19517 May 28 03:06 hs_err_pid13485.log
-rw-r-----   1 root root 19563 May 28 04:06 hs_err_pid13524.log
-rw-r-----   1 root root 19567 May 28 05:06 hs_err_pid13567.log
-rw-r-----   1 root root 19665 May 28 06:06 hs_err_pid13606.log
-rw-r-----   1 root root 18971 May 28 13:37 hs_err_pid1375.log
-rw-r-----   1 root root 19517 May 28 07:06 hs_err_pid13981.log
-rw-r-----   1 root root 19712 May 28 08:06 hs_err_pid14020.log
-rw-r-----   1 root root 19513 May 28 09:06 hs_err_pid14059.log
-rw-r-----   1 root root 19518 May 28 10:06 hs_err_pid14098.log
-rw-r-----   1 root root 18981 May 28 11:06 hs_err_pid14289.log
-rw-r-----   1 root root 19081 May 28 12:06 hs_err_pid14783.log
-rw-r-----   1 root root 18984 May 28 13:06 hs_err_pid14945.log
-rw-r-----   1 root root 18977 May 28 14:37 hs_err_pid2029.log
-rw-r-----   1 root root 18974 May 28 16:37 hs_err_pid2386.log
-rw-r-----   1 root root 18974 May 28 17:37 hs_err_pid2428.log
lrwxrwxrwx   1 root root    33 Aug 14  2012 initrd.img -> /boot/initrd.img-3.2.0-29-generic
drwxr-xr-x  19 root root  4096 May 27 11:20 lib
drwxr-xr-x   2 root root  4096 Jun 12  2014 lib64
drwx------   2 root root 16384 Aug  6  2012 lost+found
drwxr-xr-x   3 root root  4096 Aug  6  2012 media

所以你看到每小时第6分钟生成的所有文件?我发现了这个,并尝试在May28 13:37重启我的机器,tomcat与系统一起自动重启,然后错误文件开始每隔37分钟生成一次。起初我没有意识到这个原因,直到我关闭tomcat服务器,然后错误日志消失了!

这些错误日志真的很烦人,当Tomcat打开时,消耗的内存java也非常高。以下是运行命令ps aux --sort rss

时的结果
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND

root        15  0.0  0.0      0     0 ?        S    May28   0:00 [bdi-default]
root        16  0.0  0.0      0     0 ?        S<   May28   0:00 [kintegrityd]
root        17  0.0  0.0      0     0 ?        S<   May28   0:00 [kblockd]
root        18  0.0  0.0      0     0 ?        S<   May28   0:00 [ata_sff]
root        19  0.0  0.0      0     0 ?        S    May28   0:00 [khubd]
root        20  0.0  0.0      0     0 ?        S<   May28   0:00 [md]
root        22  0.0  0.0      0     0 ?        S    May28   0:00 [kworker/0:1]
root        24  0.0  0.0      0     0 ?        S    May28   0:00 [khungtaskd]
root        25  0.0  0.0      0     0 ?        S    May28   0:00 [kswapd0]
root        26  0.0  0.0      0     0 ?        SN   May28   0:00 [ksmd]
root        27  0.0  0.0      0     0 ?        SN   May28   0:00 [khugepaged]
root        28  0.0  0.0      0     0 ?        S    May28   0:00 [fsnotify_mark]
root        29  0.0  0.0      0     0 ?        S    May28   0:00 [ecryptfs-kthrea]
root        30  0.0  0.0      0     0 ?        S<   May28   0:00 [crypto]
root        38  0.0  0.0      0     0 ?        S<   May28   0:00 [kthrotld]
root        39  0.0  0.0      0     0 ?        S    May28   0:00 [scsi_eh_0]
root        40  0.0  0.0      0     0 ?        S    May28   0:00 [scsi_eh_1]
root        41  0.0  0.0      0     0 ?        S    May28   0:00 [kworker/u:2]
root        61  0.0  0.0      0     0 ?        S<   May28   0:00 [devfreq_wq]
root       195  0.0  0.0      0     0 ?        S    May28   0:00 [jbd2/xvda1-8]
root       196  0.0  0.0      0     0 ?        S<   May28   0:00 [ext4-dio-unwrit]
root       408  0.0  0.0      0     0 ?        S<   May28   0:00 [kpsmoused]
root       416  0.0  0.0      0     0 ?        S    May28   0:04 [kworker/0:2]
root      2232  0.0  0.0      0     0 ?        S    May28   0:00 [flush-202:0]
root       745  0.0  0.0  25524   168 ?        Ssl  May28   0:00 /usr/sbin/gshelld
daemon     701  0.0  0.0  16912   372 ?        Ss   May28   0:00 atd
root       526  0.0  0.0  15192   400 ?        S    May28   0:00 upstart-socket-bridge --daemon
root       266  0.0  0.0  17236   636 ?        S    May28   0:00 upstart-udev-bridge --daemon
root       895  0.0  0.0   4404   736 ?        S    May28   0:00 /bin/sh /alidata/server/mysql/bin/mysqld_safe --datadir=/alidata/server/mysql/data --pid-file=/alidata/server/mysq
root       343  0.0  0.0  21504   864 ?        S    May28   0:00 /sbin/udevd --daemon
root       344  0.0  0.0  21504   872 ?        S    May28   0:00 /sbin/udevd --daemon
root       696  0.0  0.0  14508   976 tty2     Ss+  May28   0:00 /sbin/getty -8 38400 tty2
root      1255  0.0  0.0  14508   976 tty1     Ss+  May28   0:00 /sbin/getty -8 38400 tty1
root      1195  0.0  0.0  30944   980 ?        Ss   May28   0:00 nginx: master process /alidata/server/nginx/sbin/nginx -c /alidata/server/nginx/conf/nginx.conf
root       700  0.0  0.1  19116  1048 ?        Ss   May28   0:00 cron
102        652  0.0  0.1  23944  1076 ?        Ss   May28   0:00 dbus-daemon --system --fork --activation=upstart
root      3191  0.0  0.1  16852  1204 pts/0    R+   00:44   0:00 ps aux --sort rss
nobody     765  0.0  0.1 527228  1296 ?        Ssl  May28   0:00 /usr/sbin/nscd
root       271  0.0  0.1  21648  1420 ?        Ss   May28   0:00 /sbin/udevd --daemon
syslog     619  0.0  0.1 249472  1448 ?        Sl   May28   0:01 rsyslogd -c5
root       790  0.0  0.1  23440  1452 ?        S    May28   0:00 /usr/sbin/vsftpd
ntp       1328  0.0  0.2  33756  2112 ?        Ss   May28   0:02 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 104:108
root         1  0.0  0.2  24208  2180 ?        Ss   May28   0:00 /sbin/init
root       832  0.0  0.2 463408  2588 ?        Ssl  May28   0:21 /usr/local/aegis/aegis_update/AliYunDunUpdate
root       604  0.0  0.2  50036  2924 ?        Ss   May28   0:00 /usr/sbin/sshd -D
root      1451  0.0  0.3 186592  3268 ?        Sl   May28   0:00 /usr/lib/policykit-1/polkitd --no-debug
root      1384  0.0  0.3 584308  3892 ?        Sl   May28   0:00 /usr/sbin/console-kit-daemon --no-daemon
root      2743  0.0  0.3  79888  3900 ?        Ss   May28   0:00 sshd: root@pts/0    
root      2760  0.0  0.4  22328  4904 pts/0    Ss   May28   0:00 -bash
root      1352  0.1  0.7 676660  8116 ?        Sl   May28   1:09 /usr/local/aegis/alihids/AliHids 
root      1336  0.1  1.0 675236 10308 ?        Sl   May28   1:17 /usr/local/aegis/aegis_client/aegis_00_73/AliYunDun
www       1198  0.0  2.8  58080 28800 ?        S    May28   0:00 nginx: worker process                                                    
mysql     1171  0.0  4.1 536480 42704 ?        Sl   May28   0:14 /alidata/server/mysql/bin/mysqld --basedir=/alidata/server/mysql --datadir=/alidata/server/mysql/data --plugin-dir
root      3035  0.3  7.4 997652 76192 pts/0    Sl   00:05   0:08 /alidata/server/java/jre/bin/java -Djava.util.logging.config.file=/alidata/server/tomcat7/conf/logging.properties

我还从tomcat中删除了我部署的webapp,但仍然出现了错误日志...... 真的需要一些帮助或暗示我应该怎么处理这个错误文件,我读了一些参考文档,但没有太多的想法。

这是hs_err_pidxxxxx.log,都非常类似于

#
# There is insufficient memory for the Java Runtime Environment to continue.
# pthread_getattr_np
# 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 (os_linux_x86.cpp:718), pid=2428, tid=139723618129664
#
# JRE version:  (7.0_79-b14) (build )
# Java VM: OpenJDK 64-Bit Server VM (24.79-b02 mixed mode linux-amd64 compressed oops)
# Derivative: IcedTea 2.5.5
# Distribution: Ubuntu 12.04 LTS, package 7u79-2.5.5-0ubuntu0.12.04.1
# 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 (0x00007f13ec072000):  JavaThread "Finalizer" daemon [_thread_new, id=2432, stack(0x0000000000000000,0x0000000000000000)]

Stack: [0x0000000000000000,0x0000000000000000],  sp=0x00007f13f0a007c0,  free space=136448845825k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x9263d3]
V  [libjvm.so+0x488c30]
V  [libjvm.so+0x7b231a]
V  [libjvm.so+0x7b23ad]
V  [libjvm.so+0x8d9514]
V  [libjvm.so+0x8e17ea]
V  [libjvm.so+0x7a7e42]


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

Java Threads: ( => current thread )
=>0x00007f13ec072000 JavaThread "Finalizer" daemon [_thread_new, id=2432, stack(0x0000000000000000,0x0000000000000000)]
  0x00007f13ec070000 JavaThread "Reference Handler" daemon [_thread_blocked, id=2431, stack(0x00007f13f0a02000,0x00007f13f0b03000)]
  0x00007f13ec00a000 JavaThread "main" [_thread_in_vm, id=2429, stack(0x00007f13f44cf000,0x00007f13f45d0000)]

Other Threads:
  0x00007f13ec06b800 VMThread [stack: 0x00007f13f0b03000,0x00007f13f0c04000] [id=2430]

VM state:not at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread: None

Heap
 def new generation   total 4800K, used 85K [0x00000000d6800000, 0x00000000d6d30000, 0x00000000e0e00000)
  eden space 4288K,   2% used [0x00000000d6800000, 0x00000000d6815760, 0x00000000d6c30000)
  from space 512K,   0% used [0x00000000d6c30000, 0x00000000d6c30000, 0x00000000d6cb0000)
  to   space 512K,   0% used [0x00000000d6cb0000, 0x00000000d6cb0000, 0x00000000d6d30000)
 tenured generation   total 10624K, used 0K [0x00000000e0e00000, 0x00000000e1860000, 0x00000000f5a00000)
   the space 10624K,   0% used [0x00000000e0e00000, 0x00000000e0e00000, 0x00000000e0e00200, 0x00000000e1860000)
 compacting perm gen  total 21248K, used 1022K [0x00000000f5a00000, 0x00000000f6ec0000, 0x0000000100000000)
   the space 21248K,   4% used [0x00000000f5a00000, 0x00000000f5aff948, 0x00000000f5affa00, 0x00000000f6ec0000)
No shared spaces configured.

Card table byte_map: [0x00007f13f0ff2000,0x00007f13f113f000] byte_map_base: 0x00007f13f093e000

Polling page: 0x00007f13f45dd000

Code Cache  [0x00007f13e9000000, 0x00007f13e9270000, 0x00007f13ec000000)
 total_blobs=75 nmethods=0 adapters=53 free_code_cache=48818Kb largest_free_block=49990080

Compilation events (0 events):
No events

GC Heap History (0 events):
No events

Deoptimization events (0 events):
No events

Internal exceptions (0 events):
No events

Events (10 events):
Event: 0.034 loading class 0x00007f13f0ea82c0
Event: 0.034 loading class 0x00007f13f0ea8520
Event: 0.034 loading class 0x00007f13f0ea8520 done
Event: 0.034 loading class 0x00007f13f0ea82c0 done
Event: 0.034 loading class 0x00007f13f0ea5870 done
Event: 0.035 loading class 0x00007f13f0ea58a0
Event: 0.035 loading class 0x00007f13f0ea58a0 done
Event: 0.035 loading class 0x00007f13f0ea58d0
Event: 0.035 loading class 0x00007f13f0ea58d0 done
Event: 0.035 loading class 0x00007f13f0e8a670


Dynamic libraries:
00400000-00401000 r-xp 00000000 ca:01 138141                             /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java
00600000-00601000 r--p 00000000 ca:01 138141                             /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java
00601000-00602000 rw-p 00001000 ca:01 138141                             /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java
01ee0000-01f01000 rw-p 00000000 00:00 0                                  [heap]
d6800000-d6d30000 rw-p 00000000 00:00 0 
d6d30000-e0e00000 rw-p 00000000 00:00 0 
e0e00000-e1860000 rw-p 00000000 00:00 0 
e1860000-f5a00000 rw-p 00000000 00:00 0 
f5a00000-f6ec0000 rw-p 00000000 00:00 0 
f6ec0000-100000000 rw-p 00000000 00:00 0 
7f13e0000000-7f13e0021000 rw-p 00000000 00:00 0 
7f13e0021000-7f13e4000000 ---p 00000000 00:00 0 
7f13e4000000-7f13e4021000 rw-p 00000000 00:00 0 
7f13e4021000-7f13e8000000 ---p 00000000 00:00 0 
7f13e9000000-7f13e9270000 rwxp 00000000 00:00 0 
7f13e9270000-7f13ec083000 rw-p 00000000 00:00 0 
7f13ec083000-7f13f0000000 ---p 00000000 00:00 0 
7f13f0901000-7f13f0a02000 rw-p 00000000 00:00 0 
7f13f0a02000-7f13f0a05000 ---p 00000000 00:00 0 
7f13f0a05000-7f13f0b03000 rw-p 00000000 00:00 0 
7f13f0b03000-7f13f0b04000 ---p 00000000 00:00 0 
7f13f0b04000-7f13f0c4d000 rw-p 00000000 00:00 0 
7f13f0c4d000-7f13f0dfe000 r--s 01d27000 ca:01 138110                     /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/rt.jar
7f13f0dfe000-7f13f0f02000 rw-p 00000000 00:00 0 
7f13f0f02000-7f13f0f4b000 rw-p 00000000 00:00 0 
7f13f0f4b000-7f13f0f51000 rw-p 00000000 00:00 0 
7f13f0f51000-7f13f0ff2000 rw-p 00000000 00:00 0 
7f13f0ff2000-7f13f0ff5000 rw-p 00000000 00:00 0 
7f13f0ff5000-7f13f1045000 rw-p 00000000 00:00 0 
7f13f1045000-7f13f104b000 rw-p 00000000 00:00 0 
7f13f104b000-7f13f10eb000 rw-p 00000000 00:00 0 
7f13f10eb000-7f13f10f6000 rw-p 00000000 00:00 0 
7f13f10f6000-7f13f113e000 rw-p 00000000 00:00 0 
7f13f113e000-7f13f113f000 rw-p 00000000 00:00 0 
7f13f113f000-7f13f1147000 r-xp 00000000 ca:01 138039                     /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/libzip.so
7f13f1147000-7f13f1346000 ---p 00008000 ca:01 138039                     /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/libzip.so
7f13f1346000-7f13f1347000 r--p 00007000 ca:01 138039                     /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/libzip.so
7f13f1347000-7f13f1348000 rw-p 00008000 ca:01 138039                     /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/libzip.so
7f13f1348000-7f13f1354000 r-xp 00000000 ca:01 1048852                    /lib/x86_64-linux-gnu/libnss_files-2.15.so
7f13f1354000-7f13f1553000 ---p 0000c000 ca:01 1048852                    /lib/x86_64-linux-gnu/libnss_files-2.15.so
7f13f1553000-7f13f1554000 r--p 0000b000 ca:01 1048852                    /lib/x86_64-linux-gnu/libnss_files-2.15.so
7f13f1554000-7f13f1555000 rw-p 0000c000 ca:01 1048852                    /lib/x86_64-linux-gnu/libnss_files-2.15.so
7f13f1555000-7f13f155f000 r-xp 00000000 ca:01 1048857                    /lib/x86_64-linux-gnu/libnss_nis-2.15.so
7f13f155f000-7f13f175f000 ---p 0000a000 ca:01 1048857                    /lib/x86_64-linux-gnu/libnss_nis-2.15.so
7f13f175f000-7f13f1760000 r--p 0000a000 ca:01 1048857                    /lib/x86_64-linux-gnu/libnss_nis-2.15.so
7f13f1760000-7f13f1761000 rw-p 0000b000 ca:01 1048857                    /lib/x86_64-linux-gnu/libnss_nis-2.15.so
7f13f1761000-7f13f1778000 r-xp 00000000 ca:01 1048919                    /lib/x86_64-linux-gnu/libnsl-2.15.so
7f13f1778000-7f13f1977000 ---p 00017000 ca:01 1048919                    /lib/x86_64-linux-gnu/libnsl-2.15.so
7f13f1977000-7f13f1978000 r--p 00016000 ca:01 1048919                    /lib/x86_64-linux-gnu/libnsl-2.15.so
7f13f1978000-7f13f1979000 rw-p 00017000 ca:01 1048919                    /lib/x86_64-linux-gnu/libnsl-2.15.so
7f13f1979000-7f13f197b000 rw-p 00000000 00:00 0 
7f13f197b000-7f13f1983000 r-xp 00000000 ca:01 1048850                    /lib/x86_64-linux-gnu/libnss_compat-2.15.so
7f13f1983000-7f13f1b82000 ---p 00008000 ca:01 1048850                    /lib/x86_64-linux-gnu/libnss_compat-2.15.so
7f13f1b82000-7f13f1b83000 r--p 00007000 ca:01 1048850                    /lib/x86_64-linux-gnu/libnss_compat-2.15.so
7f13f1b83000-7f13f1b84000 rw-p 00008000 ca:01 1048850                    /lib/x86_64-linux-gnu/libnss_compat-2.15.so
7f13f1b84000-7f13f1bad000 r-xp 00000000 ca:01 138046                     /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/libjava.so
7f13f1bad000-7f13f1dac000 ---p 00029000 ca:01 138046                     /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/libjava.so
7f13f1dac000-7f13f1dad000 r--p 00028000 ca:01 138046                     /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/libjava.so
7f13f1dad000-7f13f1daf000 rw-p 00029000 ca:01 138046                     /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/libjava.so
7f13f1daf000-7f13f1dbd000 r-xp 00000000 ca:01 138061                     /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/libverify.so
7f13f1dbd000-7f13f1fbc000 ---p 0000e000 ca:01 138061                     /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/libverify.so
7f13f1fbc000-7f13f1fbe000 r--p 0000d000 ca:01 138061                     /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/libverify.so
7f13f1fbe000-7f13f1fbf000 rw-p 0000f000 ca:01 138061                     /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/libverify.so
7f13f1fbf000-7f13f1fc6000 r-xp 00000000 ca:01 1048856                    /lib/x86_64-linux-gnu/librt-2.15.so
7f13f1fc6000-7f13f21c5000 ---p 00007000 ca:01 1048856                    /lib/x86_64-linux-gnu/librt-2.15.so
7f13f21c5000-7f13f21c6000 r--p 00006000 ca:01 1048856                    /lib/x86_64-linux-gnu/librt-2.15.so
7f13f21c6000-7f13f21c7000 rw-p 00007000 ca:01 1048856                    /lib/x86_64-linux-gnu/librt-2.15.so
7f13f21c7000-7f13f21dc000 r-xp 00000000 ca:01 1048621                    /lib/x86_64-linux-gnu/libgcc_s.so.1
7f13f21dc000-7f13f23db000 ---p 00015000 ca:01 1048621                    /lib/x86_64-linux-gnu/libgcc_s.so.1
7f13f23db000-7f13f23dc000 r--p 00014000 ca:01 1048621                    /lib/x86_64-linux-gnu/libgcc_s.so.1
7f13f23dc000-7f13f23dd000 rw-p 00015000 ca:01 1048621                    /lib/x86_64-linux-gnu/libgcc_s.so.1
7f13f23dd000-7f13f24d8000 r-xp 00000000 ca:01 1048860                    /lib/x86_64-linux-gnu/libm-2.15.so
7f13f24d8000-7f13f26d7000 ---p 000fb000 ca:01 1048860                    /lib/x86_64-linux-gnu/libm-2.15.so
7f13f26d7000-7f13f26d8000 r--p 000fa000 ca:01 1048860                    /lib/x86_64-linux-gnu/libm-2.15.so
7f13f26d8000-7f13f26d9000 rw-p 000fb000 ca:01 1048860                    /lib/x86_64-linux-gnu/libm-2.15.so
7f13f26d9000-7f13f27bb000 r-xp 00000000 ca:01 1184732                    /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16
7f13f27bb000-7f13f29ba000 ---p 000e2000 ca:01 1184732                    /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16
7f13f29ba000-7f13f29c2000 r--p 000e1000 ca:01 1184732                    /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16
7f13f29c2000-7f13f29c4000 rw-p 000e9000 ca:01 1184732                    /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16
7f13f29c4000-7f13f29d9000 rw-p 00000000 00:00 0 
7f13f29d9000-7f13f34c8000 r-xp 00000000 ca:01 138068                     /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/server/libjvm.so
7f13f34c8000-7f13f36c7000 ---p 00aef000 ca:01 138068                     /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/server/libjvm.so
7f13f36c7000-7f13f3768000 r--p 00aee000 ca:01 138068                     /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/server/libjvm.so
7f13f3768000-7f13f378b000 rw-p 00b8f000 ca:01 138068                     /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/server/libjvm.so
7f13f378b000-7f13f37b8000 rw-p 00000000 00:00 0 
7f13f37b8000-7f13f37ce000 r-xp 00000000 ca:01 1048805                    /lib/x86_64-linux-gnu/libz.so.1.2.3.4
7f13f37ce000-7f13f39cd000 ---p 00016000 ca:01 1048805                    /lib/x86_64-linux-gnu/libz.so.1.2.3.4
7f13f39cd000-7f13f39ce000 r--p 00015000 ca:01 1048805                    /lib/x86_64-linux-gnu/libz.so.1.2.3.4
7f13f39ce000-7f13f39cf000 rw-p 00016000 ca:01 1048805                    /lib/x86_64-linux-gnu/libz.so.1.2.3.4
7f13f39cf000-7f13f39e7000 r-xp 00000000 ca:01 1048858                    /lib/x86_64-linux-gnu/libpthread-2.15.so
7f13f39e7000-7f13f3be6000 ---p 00018000 ca:01 1048858                    /lib/x86_64-linux-gnu/libpthread-2.15.so
7f13f3be6000-7f13f3be7000 r--p 00017000 ca:01 1048858                    /lib/x86_64-linux-gnu/libpthread-2.15.so
7f13f3be7000-7f13f3be8000 rw-p 00018000 ca:01 1048858                    /lib/x86_64-linux-gnu/libpthread-2.15.so
7f13f3be8000-7f13f3bec000 rw-p 00000000 00:00 0 
7f13f3bec000-7f13f3bee000 r-xp 00000000 ca:01 1048866                    /lib/x86_64-linux-gnu/libdl-2.15.so
7f13f3bee000-7f13f3dee000 ---p 00002000 ca:01 1048866                    /lib/x86_64-linux-gnu/libdl-2.15.so
7f13f3dee000-7f13f3def000 r--p 00002000 ca:01 1048866                    /lib/x86_64-linux-gnu/libdl-2.15.so
7f13f3def000-7f13f3df0000 rw-p 00003000 ca:01 1048866                    /lib/x86_64-linux-gnu/libdl-2.15.so
7f13f3df0000-7f13f3fa5000 r-xp 00000000 ca:01 1048847                    /lib/x86_64-linux-gnu/libc-2.15.so
7f13f3fa5000-7f13f41a5000 ---p 001b5000 ca:01 1048847                    /lib/x86_64-linux-gnu/libc-2.15.so
7f13f41a5000-7f13f41a9000 r--p 001b5000 ca:01 1048847                    /lib/x86_64-linux-gnu/libc-2.15.so
7f13f41a9000-7f13f41ab000 rw-p 001b9000 ca:01 1048847                    /lib/x86_64-linux-gnu/libc-2.15.so
7f13f41ab000-7f13f41b0000 rw-p 00000000 00:00 0 
7f13f41b0000-7f13f41bd000 r-xp 00000000 ca:01 138044                     /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/jli/libjli.so
7f13f41bd000-7f13f43bc000 ---p 0000d000 ca:01 138044                     /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/jli/libjli.so
7f13f43bc000-7f13f43bd000 r--p 0000c000 ca:01 138044                     /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/jli/libjli.so
7f13f43bd000-7f13f43be000 rw-p 0000d000 ca:01 138044                     /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/jli/libjli.so
7f13f43be000-7f13f43e0000 r-xp 00000000 ca:01 1048861                    /lib/x86_64-linux-gnu/ld-2.15.so
7f13f4407000-7f13f4411000 rw-p 00000000 00:00 0 
7f13f4411000-7f13f44c7000 rw-p 00000000 00:00 0 
7f13f44c7000-7f13f44cf000 rw-s 00000000 ca:01 1048991                    /tmp/hsperfdata_root/2428
7f13f44cf000-7f13f44d2000 ---p 00000000 00:00 0 
7f13f44d2000-7f13f45d5000 rw-p 00000000 00:00 0 
7f13f45dc000-7f13f45dd000 rw-p 00000000 00:00 0 
7f13f45dd000-7f13f45de000 r--p 00000000 00:00 0 
7f13f45de000-7f13f45e0000 rw-p 00000000 00:00 0 
7f13f45e0000-7f13f45e1000 r--p 00022000 ca:01 1048861                    /lib/x86_64-linux-gnu/ld-2.15.so
7f13f45e1000-7f13f45e3000 rw-p 00023000 ca:01 1048861                    /lib/x86_64-linux-gnu/ld-2.15.so
7fff3c9d3000-7fff3c9f4000 rw-p 00000000 00:00 0                          [stack]
7fff3c9ff000-7fff3ca00000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]

VM Arguments:
java_command: org.apache.catalina.util.ServerInfo
Launcher Type: SUN_STANDARD

Environment Variables:
PATH=/sbin:/usr/sbin:/bin:/usr/bin

Signal Handlers:
SIGSEGV: [libjvm.so+0x926e30], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGBUS: [libjvm.so+0x926e30], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGFPE: [libjvm.so+0x7a5d40], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGPIPE: [libjvm.so+0x7a5d40], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGXFSZ: [libjvm.so+0x7a5d40], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGILL: [libjvm.so+0x7a5d40], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGUSR1: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000
SIGUSR2: [libjvm.so+0x7a5f80], sa_mask[0]=0x00000000, sa_flags=0x10000004
SIGHUP: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000
SIGINT: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000
SIGTERM: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000
SIGQUIT: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000
SIGTRAP: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000


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

OS:Ubuntu 12.04 (precise)
uname:Linux 3.2.0-29-generic #46-Ubuntu SMP Fri Jul 27 17:03:23 UTC 2012 x86_64
libc:glibc 2.15 NPTL 2.15 
rlimit: STACK 8192k, CORE 0k, NPROC 7815, NOFILE 1024, AS 1048576k
load average:0.00 0.01 0.05

/proc/meminfo:
MemTotal:        1017972 kB
MemFree:          478304 kB
Buffers:           72536 kB
Cached:           237944 kB
SwapCached:            0 kB
Active:           291448 kB
Inactive:         174416 kB
Active(anon):     155464 kB
Inactive(anon):      248 kB
Active(file):     135984 kB
Inactive(file):   174168 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:             0 kB
SwapFree:              0 kB
Dirty:                76 kB
Writeback:             0 kB
AnonPages:        155448 kB
Mapped:            43112 kB
Shmem:               280 kB
Slab:              50744 kB
SReclaimable:      40756 kB
SUnreclaim:         9988 kB
KernelStack:        1720 kB
PageTables:         3240 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:      508984 kB
Committed_AS:     789008 kB
VmallocTotal:   34359738367 kB
VmallocUsed:        8596 kB
VmallocChunk:   34359727484 kB
HardwareCorrupted:     0 kB
AnonHugePages:         0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:       36864 kB
DirectMap2M:     1011712 kB


CPU:total 1 (32 cores per cpu, 2 threads per core) family 6 model 45 stepping 7, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, aes, ht, tsc

/proc/cpuinfo:
processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model       : 45
model name  : Intel(R) Xeon(R) CPU E5-2630 0 @ 2.30GHz
stepping    : 7
microcode   : 0x70d
cpu MHz     : 2300.070
cache size  : 15360 KB
physical id : 0
siblings    : 1
core id     : 0
cpu cores   : 1
apicid      : 0
initial apicid  : 0
fpu     : yes
fpu_exception   : yes
cpuid level : 13
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush mmx fxsr sse sse2 ht syscall nx rdtscp lm constant_tsc up rep_good nopl pni ssse3 cx16 sse4_1 sse4_2 popcnt aes hypervisor lahf_lm
bogomips    : 4600.14
clflush size    : 64
cache_alignment : 64
address sizes   : 46 bits physical, 48 bits virtual
power management:



Memory: 4k page, physical 1017972k(478304k free), swap 0k(0k free)

vm_info: OpenJDK 64-Bit Server VM (24.79-b02) for linux-amd64 JRE (1.7.0_79-b14), built on Apr 16 2015 10:33:54 by "buildd" with gcc 4.6.3

time: Thu May 28 17:37:37 2015
elapsed time: 0 seconds

2 个答案:

答案 0 :(得分:1)

这次崩溃的原因是JVM无法从操作系统获得所需的内存。例如,如果您的计算机本身具有8 GB RAM,并且将-Xmx配置为12GB,则JVM将在您创建新对象时尝试请求此内存。

在那个时候,如果JVM无法获得足够的内存,它就会像这样崩溃。

答案 1 :(得分:0)

你确定Tomcat实际上是在使用64位的Java 7 JVM吗? JVM崩溃转储(即调用hs_err_*个文件)表示:There is insufficient memory for the Java Runtime Environment to continue.In 32 bit mode, the process size limit was hit。当JVM(本机代码)或链接库执行非法操作时,将生成故障转储。当tomcat正在运行时,请确保您可以使用jps命令监视JVM。如果JVM以32位模式运行,那么它只能访问堆上大约3.5GB的内存(即使有大量可用的虚拟内存 - 这是您可以/应该使用64位JVM的地方)。 / p>

崩溃转储看起来有点奇怪。转储主要意味着内部JVM /库错误。但我很困惑,你正在做的事情就是造成这种情况。根据我的经验,它曾用于显示遇到操作系统违规的有问题的框架。在您的转储中,查看是否存在有问题的框架。

另一件事是在JVM看到OOMError时实际转储Java线程。这通常是通过在JAVA_OPTS /etc/default/tomcat7中添加一个新选项-XX:+HeapDumpOnOutOfMemoryError来完成的,这样您就可以了解当JVM进入{{1}时Java /本机线程实际在做什么}}