首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >许多线程处于IN_NATIVE状态

许多线程处于IN_NATIVE状态
EN

Stack Overflow用户
提问于 2013-02-03 17:26:00
回答 2查看 8.9K关注 0票数 0

我们在tomcat节点上看到了一些奇怪的问题。我使用线程转储来查看线程状态。在tha中,大多数线程处于IN_NATIVE状态。有人能告诉我这是什么原因吗?下面是线程的堆栈跟踪。

代码语言:javascript
复制
Thread 677: (state = IN_NATIVE)
 - java.net.SocketInputStream.socketRead0(java.io.FileDescriptor, byte[], int, int, int) @bci=0 (Compiled frame; information may be imprecise)
 - java.net.SocketInputStream.read(byte[], int, int) @bci=84, line=129 (Compiled frame)
 - com.sun.net.ssl.internal.ssl.InputRecord.readFully(java.io.InputStream, byte[], int, int) @bci=21, line=293 (Compiled frame)
 - com.sun.net.ssl.internal.ssl.InputRecord.read(java.io.InputStream, java.io.OutputStream) @bci=32, line=331 (Compiled frame)
 - com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(com.sun.net.ssl.internal.ssl.InputRecord, boolean) @bci=44, line=789 (Compiled frame)
 - com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(com.sun.net.ssl.internal.ssl.InputRecord) @bci=15, line=746 (Compiled frame)
 - com.sun.net.ssl.internal.ssl.AppInputStream.read(byte[], int, int) @bci=30, line=75 (Compiled frame)
 - java.io.BufferedInputStream.fill() @bci=175, line=218 (Compiled frame)
 - java.io.BufferedInputStream.read1(byte[], int, int) @bci=44, line=258 (Compiled frame)
 - java.io.BufferedInputStream.read(byte[], int, int) @bci=49, line=317 (Compiled frame)
 - com.sun.jndi.ldap.Connection.run() @bci=30, line=808 (Compiled frame)
 - java.lang.Thread.run() @bci=11, line=619 (Interpreted frame)


Thread 675: (state = IN_NATIVE)
 - java.net.SocketInputStream.socketRead0(java.io.FileDescriptor, byte[], int, int, int) @bci=0 (Compiled frame; information may be imprecise)
 - java.net.SocketInputStream.read(byte[], int, int) @bci=84, line=129 (Compiled frame)
 - com.sun.net.ssl.internal.ssl.InputRecord.readFully(java.io.InputStream, byte[], int, int) @bci=21, line=293 (Compiled frame)
 - com.sun.net.ssl.internal.ssl.InputRecord.read(java.io.InputStream, java.io.OutputStream) @bci=32, line=331 (Compiled frame)
 - com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(com.sun.net.ssl.internal.ssl.InputRecord, boolean) @bci=44, line=789 (Compiled frame)
 - com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(com.sun.net.ssl.internal.ssl.InputRecord) @bci=15, line=746 (Compiled frame)
 - com.sun.net.ssl.internal.ssl.AppInputStream.read(byte[], int, int) @bci=30, line=75 (Compiled frame)
 - java.io.BufferedInputStream.fill() @bci=175, line=218 (Compiled frame)
 - java.io.BufferedInputStream.read1(byte[], int, int) @bci=44, line=258 (Compiled frame)
 - java.io.BufferedInputStream.read(byte[], int, int) @bci=49, line=317 (Compiled frame)
 - com.sun.jndi.ldap.Connection.run() @bci=30, line=808 (Compiled frame)
 - java.lang.Thread.run() @bci=11, line=619 (Interpreted frame)

全线程转储为@ PpQrTQxtIWjWmAlt8AF1ddAOzvisCM/edit?usp=sharing

EN

回答 2

Stack Overflow用户

发布于 2013-02-03 18:28:19

Java在某种程度上类似于C++的包装语言。一些库仍然使用c++并使用java关键字本机。

这基本上意味着他们调用了一个本地方法,该方法现在正在c/c++代码中执行。

票数 2
EN

Stack Overflow用户

发布于 2013-02-03 23:05:47

线程被阻止,通过SSL从LDAP服务器读取。看到堆栈跟踪。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/14675113

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档