- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
昨晚,一台服务器(JBoss 5.1GA, Java(TM) SE Runtime Environment (build 1.6.0_20-b02),Java HotSpot(TM) 64 位服务器 VM,在 VMWare 上的 Linux VM 中运行)突然开始使用 100% CPU。该应用程序是运行 Seam 的相当典型的 J2EE 业务应用程序,没有什么特别之处。当时负载极低。
我设法在进程被终止并重新启动之前获得线程转储(应用程序必须可用)。 JStack 在其死锁检测中出现异常;除此之外,大多数线程都处于阻塞状态。
这是 JVM 错误吗?我以前没见过。重新启动后一切正常,就像在该服务器上使用该应用程序后的几个月(定期更新)。
感谢您的任何建议。
稍作编辑的线程转储(以适应 SO 的帖子大小限制)如下。我删除了几个相同的线程(从 JBoss/Seam 中的各种线程池),只留下堆栈跟踪中的最上面几行。
编辑:完整的线程转储 在 http://pastie.org/1083984
[~]$ jstack -F 13553
Attaching to process ID 13553, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 11.3-b02
Deadlock Detection:
java.lang.NullPointerException
at sun.jvm.hotspot.oops.InstanceKlass.computeSubtypeOf(InstanceKlass.java:426)
at sun.jvm.hotspot.oops.Klass.isSubtypeOf(Klass.java:137)
at sun.jvm.hotspot.oops.Oop.isA(Oop.java:92)
at sun.jvm.hotspot.runtime.DeadlockDetector.print(DeadlockDetector.java:93)
at sun.jvm.hotspot.runtime.DeadlockDetector.print(DeadlockDetector.java:39)
at sun.jvm.hotspot.tools.StackTrace.run(StackTrace.java:52)
at sun.jvm.hotspot.tools.StackTrace.run(StackTrace.java:45)
at sun.jvm.hotspot.tools.JStack.run(JStack.java:60)
at sun.jvm.hotspot.tools.Tool.start(Tool.java:221)
at sun.jvm.hotspot.tools.JStack.main(JStack.java:86)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at sun.tools.jstack.JStack.runJStackTool(JStack.java:118)
at sun.tools.jstack.JStack.main(JStack.java:84)
Can't print deadlocks:null
Thread 26208: (state = BLOCKED)
Thread 25250: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Interpreted frame)
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=158 (Interpreted frame)
Thread 25249: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Interpreted frame)
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=158 (Interpreted frame)
Thread 21240: (state = BLOCKED)
- java.lang.Object.wait(long) @bci=0 (Interpreted frame)
- java.lang.Object.wait() @bci=2, line=485 (Interpreted frame)
- org.apache.tomcat.util.net.JIoEndpoint$Worker.await() @bci=8, line=416 (Interpreted frame)
Thread 21140: (state = BLOCKED)
- java.lang.Object.wait(long) @bci=0 (Interpreted frame)
- java.lang.Object.wait() @bci=2, line=485 (Interpreted frame)
- org.apache.tomcat.util.net.JIoEndpoint$Worker.await() @bci=8, line=416 (Interpreted frame)
Thread 21139: (state = BLOCKED)
- java.lang.Object.wait(long) @bci=0 (Interpreted frame)
- java.lang.Object.wait() @bci=2, line=485 (Interpreted frame)
- org.apache.tomcat.util.net.JIoEndpoint$Worker.await() @bci=8, line=416 (Interpreted frame)
Thread 21138: (state = BLOCKED)
- java.lang.Object.wait(long) @bci=0 (Interpreted frame)
- java.lang.Object.wait() @bci=2, line=485 (Interpreted frame)
- org.apache.tomcat.util.net.JIoEndpoint$Worker.await() @bci=8, line=416 (Interpreted frame)
Thread 19380: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Interpreted frame)
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=158 (Interpreted frame)
Thread 19377: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Interpreted frame)
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=158 (Interpreted frame)
Thread 19361: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Interpreted frame)
Thread 19343: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Interpreted frame)
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=158 (Interpreted frame)
Thread 19317: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Interpreted frame)
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=158 (Interpreted frame)
Thread 18995: (state = BLOCKED)
- java.lang.Object.wait(long) @bci=0 (Interpreted frame)
- java.lang.Object.wait() @bci=2, line=485 (Interpreted frame)
Thread 18986: (state = BLOCKED)
- java.lang.Object.wait(long) @bci=0 (Interpreted frame)
- java.lang.Object.wait() @bci=2, line=485 (Interpreted frame)
Thread 17659: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Interpreted frame)
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=158 (Interpreted frame)
Thread 17658: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Interpreted frame)
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=158 (Interpreted frame)
Thread 17653: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Interpreted frame)
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=158 (Interpreted frame)
Thread 17631: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Interpreted frame)
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=158 (Interpreted frame)
Thread 14977: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Interpreted frame)
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=158 (Interpreted frame)
Thread 14796: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Interpreted frame)
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=158 (Interpreted frame)
Thread 14609: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Interpreted frame)
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=158 (Interpreted frame)
Thread 14437: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Interpreted frame)
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=158 (Interpreted frame)
Thread 14248: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Interpreted frame)
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=158 (Interpreted frame)
Thread 14232: (state = BLOCKED)
- java.util.Arrays.copyOf(char[], int) @bci=1, line=2882 (Compiled frame)
- java.lang.AbstractStringBuilder.expandCapacity(int) @bci=33, line=100 (Compiled frame)
Thread 14040: (state = IN_NATIVE)
- java.net.PlainSocketImpl.socketAccept(java.net.SocketImpl) @bci=0 (Interpreted frame)
- java.net.PlainSocketImpl.accept(java.net.SocketImpl) @bci=7, line=384 (Interpreted frame)
Thread 13858: (state = BLOCKED)
- java.lang.Object.wait(long) @bci=0 (Interpreted frame)
- java.lang.ref.ReferenceQueue.remove(long) @bci=44, line=116 (Compiled frame)
Thread 13815: (state = BLOCKED)
- java.lang.Object.wait(long) @bci=0 (Interpreted frame)
- java.lang.Object.wait() @bci=2, line=485 (Interpreted frame)
- org.apache.tomcat.util.net.JIoEndpoint$Worker.await() @bci=8, line=416 (Interpreted frame)
Thread 13814: (state = IN_NATIVE)
- java.net.PlainSocketImpl.socketAccept(java.net.SocketImpl) @bci=0 (Interpreted frame)
Thread 13813: (state = BLOCKED)
- java.lang.Object.wait(long) @bci=0 (Interpreted frame)
- java.lang.Object.wait() @bci=2, line=485 (Interpreted frame)
- org.apache.tomcat.util.net.JIoEndpoint$Worker.await() @bci=8, line=416 (Interpreted frame)
Thread 13812: (state = BLOCKED)
Error occurred during stack walking:
sun.jvm.hotspot.utilities.AssertionFailure: range check
at sun.jvm.hotspot.utilities.Assert.that(Assert.java:32)
at sun.jvm.hotspot.runtime.RegisterMap.<init>(RegisterMap.java:109)
at sun.jvm.hotspot.runtime.x86.X86RegisterMap.<init>(X86RegisterMap.java:39)
at sun.jvm.hotspot.runtime.x86.X86RegisterMap.clone(X86RegisterMap.java:43)
at sun.jvm.hotspot.runtime.VFrame.<init>(VFrame.java:37)
at sun.jvm.hotspot.runtime.JavaVFrame.<init>(JavaVFrame.java:45)
at sun.jvm.hotspot.runtime.CompiledVFrame.<init>(CompiledVFrame.java:43)
at sun.jvm.hotspot.runtime.VFrame.newVFrame(VFrame.java:77)
at sun.jvm.hotspot.runtime.VFrame.sender(VFrame.java:129)
at sun.jvm.hotspot.runtime.VFrame.javaSender(VFrame.java:146)
at sun.jvm.hotspot.runtime.JavaThread.getLastJavaVFrameDbg(JavaThread.java:231)
at sun.jvm.hotspot.tools.StackTrace.run(StackTrace.java:76)
at sun.jvm.hotspot.tools.StackTrace.run(StackTrace.java:45)
at sun.jvm.hotspot.tools.JStack.run(JStack.java:60)
at sun.jvm.hotspot.tools.Tool.start(Tool.java:221)
at sun.jvm.hotspot.tools.JStack.main(JStack.java:86)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at sun.tools.jstack.JStack.runJStackTool(JStack.java:118)
at sun.tools.jstack.JStack.main(JStack.java:84)
Thread 13811: (state = IN_NATIVE)
- java.net.PlainSocketImpl.socketAccept(java.net.SocketImpl) @bci=0 (Interpreted frame)
Thread 13810: (state = IN_NATIVE)
- java.net.PlainSocketImpl.socketAccept(java.net.SocketImpl) @bci=0 (Interpreted frame)
Thread 13809: (state = BLOCKED)
- java.lang.Object.wait(long) @bci=0 (Interpreted frame)
- java.lang.Object.wait() @bci=2, line=485 (Interpreted frame)
- org.jboss.jms.client.container.ClientConsumer.getMessage(long) @bci=71, line=866 (Interpreted frame)
Thread 13808: (state = BLOCKED)
- java.lang.Object.wait(long) @bci=0 (Interpreted frame)
- java.lang.Object.wait() @bci=2, line=485 (Interpreted frame)
- org.jboss.jms.client.container.ClientConsumer.getMessage(long) @bci=71, line=866 (Interpreted frame)
Thread 13807: (state = BLOCKED)
- java.lang.Object.wait(long) @bci=0 (Interpreted frame)
- java.lang.Object.wait() @bci=2, line=485 (Interpreted frame)
- org.jboss.bootstrap.AbstractServerImpl$LifeThread.run() @bci=11, line=866 (Interpreted frame)
Thread 13806: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Interpreted frame)
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=158 (Interpreted frame)
Thread 13805: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Interpreted frame)
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=158 (Interpreted frame)
Thread 13804: (state = BLOCKED)
- java.lang.Object.wait(long) @bci=0 (Interpreted frame)
- java.util.TimerThread.mainLoop() @bci=201, line=509 (Interpreted frame)
Thread 13803: (state = BLOCKED)
- java.lang.Object.wait(long) @bci=0 (Interpreted frame)
- java.util.TimerThread.mainLoop() @bci=201, line=509 (Interpreted frame)
Thread 13802: (state = BLOCKED)
- java.util.Arrays.copyOfRange(char[], int, int) @bci=40, line=3209 (Compiled frame)
- java.lang.String.<init>(char[], int, int) @bci=65, line=216 (Compiled frame)
- java.lang.StringBuffer.toString() @bci=13, line=585 (Compiled frame)
- org.apache.log4j.PatternLayout.format(org.apache.log4j.spi.LoggingEvent) @bci=68, line=506 (Compiled frame)
Thread 13784: (state = BLOCKED)
- java.lang.Object.wait(long) @bci=0 (Interpreted frame)
- java.lang.ref.ReferenceQueue.remove(long) @bci=44, line=116 (Compiled frame)
- org.jboss.el.util.ReferenceCache$ReferenceQueueRunner.run() @bci=1, line=159 (Interpreted frame)
Thread 13753: (state = BLOCKED)
- java.lang.Thread.sleep(long) @bci=0 (Compiled frame; information may be imprecise)
- org.jboss.ejb3.cache.simple.SimpleStatefulCache$SessionTimeoutTask.block() @bci=11, line=210 (Interpreted frame)
Thread 13752: (state = BLOCKED)
- java.lang.Object.wait(long) @bci=0 (Interpreted frame)
- org.jboss.resource.connectionmanager.IdleRemover$IdleRemoverRunnable.run() @bci=31, line=167 (Interpreted frame)
Thread 13749: (state = BLOCKED)
- java.lang.Object.wait(long) @bci=0 (Interpreted frame)
- java.lang.Object.wait() @bci=2, line=485 (Interpreted frame)
- org.jboss.remoting.transport.socket.ServerThread.run() @bci=209, line=284 (Interpreted frame)
Thread 13734: (state = BLOCKED)
- java.lang.Object.wait(long) @bci=0 (Interpreted frame)
- java.util.TimerThread.mainLoop() @bci=201, line=509 (Interpreted frame)
Thread 13701: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Interpreted frame)
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=158 (Interpreted frame)
Thread 13700: (state = BLOCKED)
- java.lang.Thread.sleep(long) @bci=0 (Compiled frame; information may be imprecise)
- org.jboss.console.plugins.AOPLister$RefreshPoller.run() @bci=41, line=898 (Interpreted frame)
Thread 13699: (state = BLOCKED)
- java.lang.Thread.sleep(long) @bci=0 (Compiled frame; information may be imprecise)
- org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run() @bci=22, line=1590 (Interpreted frame)
- java.lang.Thread.run() @bci=11, line=619 (Interpreted frame)
Thread 13698: (state = IN_NATIVE)
- java.net.PlainSocketImpl.socketAccept(java.net.SocketImpl) @bci=0 (Interpreted frame)
Thread 13678: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Interpreted frame)
- java.util.concurrent.locks.LockSupport.parkNanos(java.lang.Object, long) @bci=20, line=198 (Interpreted frame)
Thread 13554: (state = BLOCKED)
Thread 13560: (state = BLOCKED)
Thread 13559: (state = BLOCKED)
- java.lang.Object.wait(long) @bci=0 (Interpreted frame)
- java.lang.ref.ReferenceQueue.remove(long) @bci=44, line=116 (Compiled frame)
- java.lang.ref.ReferenceQueue.remove() @bci=2, line=132 (Compiled frame)
- java.lang.ref.Finalizer$FinalizerThread.run() @bci=3, line=159 (Compiled frame)
Thread 13558: (state = BLOCKED)
- java.lang.Object.wait(long) @bci=0 (Interpreted frame)
- java.lang.Object.wait() @bci=2, line=485 (Compiled frame)
- java.lang.ref.Reference$ReferenceHandler.run() @bci=46, line=116 (Compiled frame)
最佳答案
一种可能是您用完了堆空间。如果堆空间用完,JVM 将开始以惊人的速度消耗 CPU 进行疯狂的垃圾收集。
关于java - JVM 消耗所有 CPU,大多数线程被阻塞。 JVM 错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3449918/
我有一个简单的 HATEOAS 使用 构建的提供程序 Spring 这为我提供了以下资源: { "_links" : { "self" : { "href" : "http:/
这里是 Clojure 初学者,不确定问题中的术语是否正确。 我正在使用 clj-webdriver 出租车 API 构建网络抓取工具。它需要从多个站点抓取数据。以下实际上不是项目中的代码,但我已经对
我使用pthread lib 2.8,操作系统内核是arm上的Linux 2.6.37。在我的程序中,线程 A 使用 pthread 接口(interface)将调度优先级设置为 sched_get_
我有一个大约 400MB 的二进制文件,我想将其转换为 CSV 格式。输出的 CSV 文件将约为 1GB(根据我的计算)。 我读取二进制文件并将其存储在一个结构数组中(其他处理也需要),当用户想要将其
我在编写我的专业应用程序时遇到一个串口线程问题。我有cpu消耗。当我在我的项目中添加 SerialCtrl.h(来自项目 SerialCtrl http://www.codeproject.com/A
总结:似乎 c 代码的 RAM 消耗取决于变量排序。有没有办法自动优化? 更长的版本:在这里,我粘贴了两个版本的代码,它们仅在变量排序方面有所不同。 版本 1: static unsigned lon
我有一个处理图像编辑(裁剪和调整大小)的 Windows 应用程序项目。不幸的是,这些图像处理会消耗大量内存和 CPU 资源(很容易达到 600MB 或 50% cpu),而且它只是裁剪和调整大小 2
我创建了一个实例化类 10 亿次的循环,并且非常惊讶地看到它在 0 毫秒内运行并且根据 Windows 任务管理器没有消耗 CPU 时间。 正如您从下面的代码中看到的那样,我显然没有对默认构造函数执行
我们有以下用户名验证规则: 用户名可以包含字母数字字符 用户名可以有下划线、连字符或句号 现在假设用户名是 ASCII 用户名不能以句点开头或结尾 用户名不能开始、结束或有任何空格 我们有以下相同的正
如何获取 C# 中所有进程的列表,然后获取每个进程的当前内存和 CPU 消耗? 非常感谢示例代码。 最佳答案 Process class有一个 GetProcesses 方法,可以让您枚举正在运行的进
如何从 linux 2.6.32 机器上的源代码中限制 C 程序的物理内存消耗? 我需要确定系统使用的页面替换算法的类型。 问题是,如果不限制一个进程在内存中可以拥有的页面数量,就很难分析页面错误的模
我正在编写一个 Linux 应用程序,它观察其他应用程序并跟踪资源消耗。我计划使用 Java,但编程语言对我来说并不重要。目标很重要,所以我可以切换到另一种技术或使用模块。我的应用程序将任何选定的第三
我有一个图标,旁边有一个复选框,包含在一个面板中。面板有悬停效果,点击面板时想选中框。 我想使用或阻止复选框的所有事件,仅以编程方式选择它。我希望该框在屏幕上显示为“已启用”,而“在幕后”几乎不起作用
我正在使用服务 REST,它当前有 5025 条记录,但当我使用该服务时,只出现 1,000 条记录。我可以做什么来完全消耗所有记录? 这是我的代码示例: $http({ method:
我已经搜索了几个小时但没有成功,是否可以跟踪 Blob 容器上 SAS 凭据的消耗情况? 我将向几个客户提供 SAS 凭证,并且我希望能够跟踪他们的 SAS 使用情况(操作次数、带宽使用情况...)
我创建了具有 1.75 GB RAM 的 B1 应用服务计划。我还创建了一个应用程序服务并向其部署了 docker 镜像。现在我停止了 docker 镜像,它的状态已停止,并且它是该应用程序服务计划中
与我们的合作伙伴一起为我们的客户(一家售后汽车零部件零售商)开发一个项目,他们利用 AR 和 VR 做了很多很酷的事情。我们的想法是使用 Hololens 并尝试帮助我们的客户在其大型仓库中进行物流操
这是一个简短的 Haskell 程序,可以生成 440 Hz 的声音。它使用pulseaudio作为音频后端。 import GHC.Float import Control.Arrow import
关闭。这个问题需要多问focused 。目前不接受答案。 想要改进此问题吗?更新问题,使其仅关注一个问题 editing this post . 已关闭 8 年前。 Improve this ques
tab.setOnCloseRequest(e -> { if (getEditorForTextArea(getSelectedTextArea()) != null
我是一名优秀的程序员,十分优秀!