Java应用程序崩溃 [英] Java Application Crash

查看:497
本文介绍了Java应用程序崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在研究大型Java应用程序.它是相当并行的,并使用了几个fixedThreadPools(每个线程有8个线程).我正在具有2个内核的计算机上运行它,每个内核具有4个处理器.我的程序正在分析大量数据,并且在每个数据集之后都会保存(序列化)分析,尽管它可以跨数据集工作,所以每次我运行一个新数据(然后保存)时都会重新加载分析. 我的问题是这样的:在运行4-5个数据集(大约需要2天,我对自己的编码效率非常满意)之后,在第5个数据集上完全相同的时间(无论哪个数据集)之后,它都会崩溃我用).该程序是重复性的,因此此时的代码中没有新内容.它是可复制的,我不确定该怎么做.我可以张贴完整的错误日志,如果有帮助的话...我知道这个问题是模棱两可的,没有太多详细的信息,但是如果有任何建议,将不胜感激.

I have been working on a large java application. It is quite parallel, and uses several fixedThreadPools (each with 8 threads). I am running it on a computer with 2 cores, each with 4 processors. My program is analyzing large sets of data, and the analysis is saved (serialized) after every set, though it works across data sets, and so is re-loaded every time I run a new one (and then saved). My problem is this: after running 4-5 data sets (takes about 2 days, and I'm pretty happy with my coding efficiency) it will crash, after exactly the same amount of time on the 5th set (no matter which data set I use). The program is repetitive, and so there is nothing new in the code going on at this time. It is reproducible, and I am not sure what to do. I can post the full error log if that would help... I understand that this problem is ambiguous without a lot more detailed information, but if there are any go-to suggestions, it would be greatly appreciated.

我一直在测试不同的设置以查看是否有帮助,现在我正在运行以下参数.

I have been testing different settings to see if anything helps, and right now I am running with the following arguments.

-Xmx6g -Xmx12g -XX:+ UnlockExperimentalVMOptions -XX:+ UseG1GC

-Xmx6g -Xmx12g -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC

谢谢, 乔

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x0000000000000000, pid=18454, tid=140120548144896
#
# JRE version: 7.0_03-b147
# Java VM: OpenJDK 64-Bit Server VM (22.0-b10 mixed mode linux-amd64 compressed oops)
# Derivative: IcedTea7 2.1.1pre
# Distribution: Ubuntu precise (development branch), package 7~u3-2.1.1~pre1-1ubuntu2
# Problematic frame:
# C  0x0000000000000000
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# If you would like to submit a bug report, please include
# instructions on how to reproduce the bug and visit:
#   https://bugs.launchpad.net/ubuntu/+source/openjdk-7/
#

推荐答案

我会使用 Visual VM .当您的应用运行时,它将实时显示内存,线程,CPU,创建的对象等中发生的情况.

I'd instrument it with something like Visual VM. It'll show what's happening in memory, threads, CPU, objects created, etc. in real time as your app runs.

我拥有的不错的版本仅适用于Oracle/Sun JVM. JDK附带了一个,但我不相信它显示的细节与安装了所有插件的版本1.6.3一样.

The nice version that I have is for Oracle/Sun JVMs only. There's one that ships with the JDK, but I don't believe it shows as much detail as the version 1.6.3 with all plugins installed.

这篇关于Java应用程序崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆