"java.lang.OutOfMemoryError: unable to create new native thread" and lots of JacORB threads in dump
Issue
The machine fails with "java.lang.OutOfMemoryError: unable to create new native thread". Taking thread dumps prior to this error shows a large number of ClientMessageReceptor threads from JacORB, similar to one of the following:
"ClientMessageReceptor2" daemon prio=10 tid=0x00007f5c09c23000 nid=0x7078 runnable [0x00007f5b7e2e7000]
java.lang.Thread.State: RUNNABLE
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at org.jacorb.orb.etf.StreamConnectionBase.read(Unknown Source)
at org.jacorb.orb.giop.GIOPConnection.getMessage(Unknown Source)
at org.jacorb.orb.giop.GIOPConnection.receiveMessages(Unknown Source)
at org.jacorb.orb.giop.MessageReceptor.doWork(Unknown Source)
at org.jacorb.util.threadpool.ConsumerTie.run(Unknown Source)
at java.lang.Thread.run(Thread.java:662)
"ClientMessageReceptor0" daemon prio=10 tid=0x00007f5ecea22000 nid=0x225 in Object.wait() [0x00007f5c21443000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x000000068bd0db60> (a org.jacorb.util.threadpool.ThreadPool)
at java.lang.Object.wait(Object.java:485)
at org.jacorb.util.threadpool.ThreadPool.getJob(Unknown Source)
- locked <0x000000068bd0db60> (a org.jacorb.util.threadpool.ThreadPool)
at org.jacorb.util.threadpool.ConsumerTie.run(Unknown Source)
at java.lang.Thread.run(Thread.java:662)
The number of these threads grow constantly over time until the OutOfMemoryError happens:
$ grep -rc '^\"ClientMessageReceptor' |sort
thread_dump_1.out:1408
thread_dump_2.out:1442
thread_dump_3.out:1496
...
Environment
- Red Hat JBoss Enterprise SOA Platform (SOA-P) 5.x
- Red Hat Enterprise Platform (EAP) 5.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.