Вопрос

We recently had a situation where a production machine went down with a massive thread dump. It's resin webserver, and it gave 'Full thread dump Java HotSpot(TM) 64-Bit Server VM (14.0-b16 mixed mode):'.

There are a ton of BLOCKED threads, but they are confusing to me. IE, one is like:

"resin-8576" daemon prio=10 tid=0x00007f871827b800 nid=0x6b5 waiting for monitor entry [0x00007f864a7e6000]
   java.lang.Thread.State: BLOCKED (on object monitor)
        at java.lang.String.toCharArray(String.java:2725)
        at java.lang.Thread.setName(Thread.java:1051)
        at com.caucho.server.port.TcpConnection.run(TcpConnection.java:605)
        at com.caucho.util.ThreadPool$Item.runTasks(ThreadPool.java:730)
        at com.caucho.util.ThreadPool$Item.run(ThreadPool.java:649)
        at java.lang.Thread.run(Thread.java:619)

The code there is

char result[] = new char[count];

Another one is like

"resin-8574" daemon prio=10 tid=0x00007f8718277800 nid=0x6b3 waiting for monitor entry [0x00007f864a9e8000]
   java.lang.Thread.State: BLOCKED (on object monitor)
        at java.lang.String.valueOf(String.java:2840)
        at java.lang.Thread.getName(Thread.java:1061)
        at com.caucho.server.port.TcpConnection.run(TcpConnection.java:603)
        at com.caucho.util.ThreadPool$Item.runTasks(ThreadPool.java:730)
        at com.caucho.util.ThreadPool$Item.run(ThreadPool.java:649)
        at java.lang.Thread.run(Thread.java:619)

Where the code of String there is

return new String(data);

Those seem like strange places to be blocked.

Could anyone suggest a reason those calls would be blocking?

Thanks, -kal

Нет правильного решения

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top