例如,这是来自 Tomcat 服务器的堆栈跟踪:
"RMI TCP Accept-0" daemon prio=10 tid=0x091a5800 nid=0x8f1 runnable [0x8b305000]
java.lang.Thread.State: RUNNABLE
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:408)
- locked <0x911d3c30> (a java.net.SocksSocketImpl)
at java.net.ServerSocket.implAccept(ServerSocket.java:462)
at java.net.ServerSocket.accept(ServerSocket.java:430)
at sun.management.jmxremote.LocalRMIServerSocketFactory$1.accept(LocalRMIServerSocketFactory.java:34)
at sun.rmi.transport.tcp.TCPTransport$AcceptLoop.executeAcceptLoop(TCPTransport.java:369)
at sun.rmi.transport.tcp.TCPTransport$AcceptLoop.run(TCPTransport.java:341)
at java.lang.Thread.run(Thread.java:662)
我的猜测是“锁定”意味着 CPU 正在等待某种锁定。但是,如果是这样,为什么线程的状态被列为 RUNNABLE 而不是 BLOCKED?
谢谢。