一个Java进程直接死掉的问题分析

一个项目24小时不停的下载文件,并调用本地安卓工具包,aapt命令分析apk的包名等应用名信息,偶发性出现该问题,导致Java进程直接死掉

硬件环境:云主机

软件环境:Linux(CentOS 6.5 final) + Java8(Oracle JDK)+ Tomcat7.0.70

错误日志:

java: res_query.c:251: __libc_res_nquery: Assertion `hp != hp2' failed.

进程直接没有了。

发布了48 篇原创文章 · 获赞 7 · 访问量 8万+
展开阅读全文

java -jar 运行一个jar项目,运行一段时间后就进程自动被杀掉

02-09

# 运行程序的命令: java -Xms2048m -Xmx2048m -Xss512K -XX:PermSize=1024m -XX:MaxPermSize=2048m -XX:+PrintGCDetails -Xloggc:../logs/gc.log -jar emplatform-1.0.1-release.jar & ## gc.log 日志 Java HotSpot(TM) 64-Bit Server VM (25.131-b11) for linux-amd64 JRE (1.8.0_131-b11), built on Mar 15 2017 01:23:40 by "java_re" with gcc 4.3.0 20080428 (Red Hat 4.3.0-8) Memory: 4k page, physical 16333940k(12397552k free), swap 2097148k(2097148k free) CommandLine flags: -XX:InitialHeapSize=2147483648 -XX:MaxHeapSize=2147483648 -XX:+PrintGC -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:ThreadStackSize=512 -XX:+UseCompressedClassPointers -XX:+UseCompressedOops -XX:+UseParallelGC 4.624: [GC (Metadata GC Threshold) [PSYoungGen: 272899K->14776K(611840K)] 272899K->14856K(2010112K), 0.0223975 secs] [Times: user=0.05 sys=0.01, real=0.02 secs] 4.647: [Full GC (Metadata GC Threshold) [PSYoungGen: 14776K->0K(611840K)] [ParOldGen: 80K->14040K(1398272K)] 14856K->14040K(2010112K), [Metaspace: 20838K->20838K(1069056K)], 0.0641837 secs] [Times: user=0.16 sys=0.01, real=0.07 secs] 7.167: [GC (Metadata GC Threshold) [PSYoungGen: 520000K->22892K(611840K)] 534041K->36941K(2010112K), 0.0295682 secs] [Times: user=0.05 sys=0.00, real=0.03 secs] 7.196: [Full GC (Metadata GC Threshold) [PSYoungGen: 22892K->0K(611840K)] [ParOldGen: 14048K->27566K(1398272K)] 36941K->27566K(2010112K), [Metaspace: 34825K->34825K(1081344K)], 0.0498541 secs] [Times: user=0.13 sys=0.01, real=0.05 secs] 9.544: [GC (Allocation Failure) [PSYoungGen: 524800K->19918K(611840K)] 552366K->47492K(2010112K), 0.0302185 secs] [Times: user=0.08 sys=0.00, real=0.03 secs] 57.786: [GC (Allocation Failure) [PSYoungGen: 544718K->22544K(611840K)] 572292K->50145K(2010112K), 0.0269022 secs] [Times: user=0.08 sys=0.00, real=0.02 secs] 180.300: [GC (Metadata GC Threshold) [PSYoungGen: 169197K->20777K(611840K)] 196798K->48386K(2010112K), 0.0264694 secs] [Times: user=0.08 sys=0.01, real=0.03 secs] 180.327: [Full GC (Metadata GC Threshold) [PSYoungGen: 20777K->0K(611840K)] [ParOldGen: 27609K->33178K(1398272K)] 48386K->33178K(2010112K), [Metaspace: 58024K->58020K(1101824K)], 0.2751654 secs] [Times: user=0.75 sys=0.00, real=0.27 secs] Heap PSYoungGen total 611840K, used 508359K [0x00000000d5580000, 0x0000000100000000, 0x0000000100000000) eden space 524800K, 96% used [0x00000000d5580000,0x00000000f45f1ea0,0x00000000f5600000) from space 87040K, 0% used [0x00000000f5600000,0x00000000f5600000,0x00000000fab00000) to space 25088K, 0% used [0x00000000fe780000,0x00000000fe780000,0x0000000100000000) ParOldGen total 1398272K, used 33178K [0x0000000080000000, 0x00000000d5580000, 0x00000000d5580000) object space 1398272K, 2% used [0x0000000080000000,0x00000000820669b8,0x00000000d5580000) Metaspace used 59420K, capacity 60386K, committed 60632K, reserved 1103872K class space used 6923K, capacity 7119K, committed 7168K, reserved 1048576K 服务器上还有其他项目在运行,这些项目没有做jvm的设置。 问答

java线程僵死-jstack日志

12-15

2014-12-15 14:19:47 Full thread dump Java HotSpot(TM) 64-Bit Server VM (20.45-b01 mixed mode): "resin-1954" daemon prio=10 tid=0x00007fe870024800 nid=0x15ca waiting on condition [0x00007fe8ad969000] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:283) at com.caucho.env.thread2.ResinThread2.park(ResinThread2.java:196) at com.caucho.env.thread2.ResinThread2.runTasks(ResinThread2.java:147) at com.caucho.env.thread2.ResinThread2.run(ResinThread2.java:118) "resin-1953" daemon prio=10 tid=0x00007fe87001b000 nid=0x1578 waiting on condition [0x00007fe88da66000] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:283) at com.caucho.env.thread2.ResinThread2.park(ResinThread2.java:196) at com.caucho.env.thread2.ResinThread2.runTasks(ResinThread2.java:147) at com.caucho.env.thread2.ResinThread2.run(ResinThread2.java:118) "resin-1952" daemon prio=10 tid=0x00007fe870004000 nid=0x1470 waiting on condition [0x00007fe796f26000] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:283) at com.caucho.env.thread2.ResinThread2.park(ResinThread2.java:196) at com.caucho.env.thread2.ResinThread2.runTasks(ResinThread2.java:147) at com.caucho.env.thread2.ResinThread2.run(ResinThread2.java:118) "resin-1949" daemon prio=10 tid=0x00007fe870021000 nid=0x131a waiting on condition [0x00007fe7968f3000] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:283) at com.caucho.env.thread2.ResinThread2.park(ResinThread2.java:196) at com.caucho.env.thread2.ResinThread2.runTasks(ResinThread2.java:147) at com.caucho.env.thread2.ResinThread2.run(ResinThread2.java:118) "resin-1948" daemon prio=10 tid=0x00007fe87000d000 nid=0x114d waiting on condition [0x00007fe796ac9000] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:283) at com.caucho.env.thread2.ResinThread2.park(ResinThread2.java:196) at com.caucho.env.thread2.ResinThread2.runTasks(ResinThread2.java:147) at com.caucho.env.thread2.ResinThread2.run(ResinThread2.java:118) "resin-1947" daemon prio=10 tid=0x00007fe870033800 nid=0x108e waiting on condition [0x00007fe88dc68000] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:283) at com.caucho.env.thread2.ResinThread2.park(ResinThread2.java:196) at com.caucho.env.thread2.ResinThread2.runTasks(ResinThread2.java:147) at com.caucho.env.thread2.ResinThread2.run(ResinThread2.java:118) "resin-1945" daemon prio=10 tid=0x00007fe870032000 nid=0x105f waiting on condition [0x00007fe8ac946000] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:283) at com.caucho.env.thread2.ResinThread2.park(ResinThread2.java:196) at com.caucho.env.thread2.ResinThread2.runTasks(ResinThread2.java:147) at com.caucho.env.thread2.ResinThread2.run(ResinThread2.java:118) "resin-1944" daemon prio=10 tid=0x00007fe87003a000 nid=0xfc0 waiting on condition [0x00007fe88e16d000] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:283) at com.caucho.env.thread2.ResinThread2.park(ResinThread2.java:196) at com.caucho.env.thread2.ResinThread2.runTasks(ResinThread2.java:147) at com.caucho.env.thread2.ResinThread2.run(ResinThread2.java:118) "resin-1943" daemon prio=10 tid=0x00007fe870051800 nid=0xf54 waiting on condition [0x00007fe8acc49000] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:283) at com.caucho.env.thread2.ResinThread2.park(ResinThread2.java:196) at com.caucho.env.thread2.ResinThread2.runTasks(ResinThread2.java:147) at com.caucho.env.thread2.ResinThread2.run(ResinThread2.java:118) "resin-1941" daemon prio=10 tid=0x00007fe87000a000 nid=0xecb waiting on condition [0x00007fe8adb6b000] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:283) at com.caucho.env.thread2.ResinThread2.park(ResinThread2.java:196) at com.caucho.env.thread2.ResinThread2.runTasks(ResinThread2.java:147) at com.caucho.env.thread2.ResinThread2.run(ResinThread2.java:118) "resin-1940" daemon prio=10 tid=0x00007fe870026000 nid=0xe3f waiting on condition [0x00007fe8ac643000] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:283) at com.caucho.env.thread2.ResinThread2.park(ResinThread2.java:196) at com.caucho.env.thread2.ResinThread2.runTasks(ResinThread2.java:147) at com.caucho.env.thread2.ResinThread2.run(ResinThread2.java:118) "resin-1939" daemon prio=10 tid=0x00007fe870038000 nid=0xe3e waiting on condition [0x00007fe795ee9000] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:283) at com.caucho.env.thread2.ResinThread2.park(ResinThread2.java:196) at com.caucho.env.thread2.ResinThread2.runTasks(ResinThread2.java:147) at com.caucho.env.thread2.ResinThread2.run(ResinThread2.java:118) "resin-port-127.0.0.1:6800-launcher" daemon prio=10 tid=0x00007fe87002b000 nid=0xba7 waiting on condition [0x00007fe79742b000] java.lang.Thread.State: TIMED_WAITING (parking) at sun.misc.Unsafe.park(Native Method) at java.util.concurrent.locks.LockSupport.parkUntil(LockSupport.java:351) at com.caucho.env.thread2.AbstractTaskWorker2.run(AbstractTaskWorker2.java:256) at com.caucho.env.thread2.ResinThread2.runTasks(ResinThread2.java:173) at com.caucho.env.thread2.ResinThread2.run(ResinThread2.java:118) "resin-1936" daemon prio=10 tid=0x00007fe870001000 nid=0xba6 waiting on condition [0x00007fe8ac744000] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:283) at com.caucho.env.thread2.ResinThread2.park(ResinThread2.java:196) at com.caucho.env.thread2.ResinThread2.runTasks(ResinThread2.java:147) at com.caucho.env.thread2.ResinThread2.run(ResinThread2.java:118) "resin-1935" daemon prio=10 tid=0x00007fe87002d000 nid=0xb5e waiting on condition [0x00007fe797027000] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:283) at com.caucho.env.thread2.ResinThread2.park(ResinThread2.java:196) at com.caucho.env.thread2.ResinThread2.runTasks(ResinThread2.java:147) at com.caucho.env.thread2.ResinThread2.run(ResinThread2.java:118) "resin-1934" daemon prio=10 tid=0x00007fe870006000 nid=0xb2a waiting on condition [0x00007fe795fea000] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:283) at com.caucho.env.thread2.ResinThread2.park(ResinThread2.java:196) at com.caucho.env.thread2.ResinThread2.runTasks(ResinThread2.java:147) at com.caucho.env.thread2.ResinThread2.run(ResinThread2.java:118) "resin-1933" daemon prio=10 tid=0x00007fe87000b800 nid=0xa4e waiting on condition [0x00007fe797229000] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:283) at com.caucho.env.thread2.ResinThread2.park(ResinThread2.java:196) at com.caucho.env.thread2.ResinThread2.runTasks(ResinThread2.java:147) at com.caucho.env.thread2.ResinThread2.run(ResinThread2.java:118) 问答

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 编程工作室 设计师: CSDN官方博客

分享到微信朋友圈

×

扫一扫,手机浏览