out of mem exception with ICE


#1

Hey Seb,

Here's what I just saw with ICE. Could this be related to your latest
changes?

Emil

···

14:42:00.589 WARNING: org.ice4j.stack.NetAccessManager.handleFatalError() A message processor has unexpectedly stopped. AP:org.ice4j.stack.MessageProcessor@124be57
java.lang.OutOfMemoryError: unable to create new native thread
  at java.lang.Thread.start0(Native Method)
  at java.lang.Thread.start(Thread.java:658)
  at org.ice4j.stack.StunServerTransaction.start(StunServerTransaction.java:132)
  at org.ice4j.stack.StunStack.handleMessageEvent(StunStack.java:669)
  at org.ice4j.stack.MessageProcessor.run(MessageProcessor.java:161)
  at java.lang.Thread.run(Thread.java:680)
14:42:00.589 SEVERE: util.UtilActivator.uncaughtException().88 An uncaught exception occurred in thread=Thread[Stun4J Message Processor,6,main] and message was: unable to create new native thread
java.lang.OutOfMemoryError: unable to create new native thread
  at java.lang.Thread.start0(Native Method)
  at java.lang.Thread.start(Thread.java:658)
  at org.ice4j.stack.MessageProcessor.start(MessageProcessor.java:194)
  at org.ice4j.stack.NetAccessManager.handleFatalError(NetAccessManager.java:186)
  at org.ice4j.stack.MessageProcessor.run(MessageProcessor.java:181)
  at java.lang.Thread.run(Thread.java:680)
14:42:00.604 INFO: org.ice4j.ice.ConnectivityCheckServer.processRequest() No candidate pair that match local and remote ufrag
14:42:00.628 WARNING: org.ice4j.stack.NetAccessManager.handleFatalError() A message processor has unexpectedly stopped. AP:org.ice4j.stack.MessageProcessor@8a22c9
java.lang.OutOfMemoryError: unable to create new native thread
  at java.lang.Thread.start0(Native Method)
  at java.lang.Thread.start(Thread.java:658)
  at org.ice4j.stack.StunServerTransaction.start(StunServerTransaction.java:132)
  at org.ice4j.stack.StunStack.handleMessageEvent(StunStack.java:669)
  at org.ice4j.stack.MessageProcessor.run(MessageProcessor.java:161)
  at java.lang.Thread.run(Thread.java:680)
14:42:00.629 SEVERE: util.UtilActivator.uncaughtException().88 An uncaught exception occurred in thread=Thread[Stun4J Message Processor,6,main] and message was: unable to create new native thread
java.lang.OutOfMemoryError: unable to create new native thread
  at java.lang.Thread.start0(Native Method)
  at java.lang.Thread.start(Thread.java:658)
  at org.ice4j.stack.MessageProcessor.start(MessageProcessor.java:194)
  at org.ice4j.stack.NetAccessManager.handleFatalError(NetAccessManager.java:186)
  at org.ice4j.stack.MessageProcessor.run(MessageProcessor.java:181)
  at java.lang.Thread.run(Thread.java:680)
14:42:00.640 INFO: org.ice4j.ice.ConnectivityCheckServer.processRequest() No candidate pair that match local and remote ufrag
14:42:00.641 WARNING: org.ice4j.stack.NetAccessManager.handleFatalError() A message processor has unexpectedly stopped. AP:org.ice4j.stack.MessageProcessor@177ba44
java.lang.OutOfMemoryError: unable to create new native thread
  at java.lang.Thread.start0(Native Method)
  at java.lang.Thread.start(Thread.java:658)
  at org.ice4j.stack.StunServerTransaction.start(StunServerTransaction.java:132)
  at org.ice4j.stack.StunStack.handleMessageEvent(StunStack.java:669)
  at org.ice4j.stack.MessageProcessor.run(MessageProcessor.java:161)
  at java.lang.Thread.run(Thread.java:680)
14:42:00.641 SEVERE: util.UtilActivator.uncaughtException().88 An uncaught exception occurred in thread=Thread[Stun4J Message Processor,6,main] and message was: unable to create new native thread
java.lang.OutOfMemoryError: unable to create new native thread
  at java.lang.Thread.start0(Native Method)
  at java.lang.Thread.start(Thread.java:658)
  at org.ice4j.stack.MessageProcessor.start(MessageProcessor.java:194)
  at org.ice4j.stack.NetAccessManager.handleFatalError(NetAccessManager.java:186)
  at org.ice4j.stack.MessageProcessor.run(MessageProcessor.java:181)
  at java.lang.Thread.run(Thread.java:680)


#2

My latest changes were to remove some ICE threads that stay after end of a call and that never exit.

I will check what can be wrong.

···

--
Seb

Le 14/02/12 14:43, Emil Ivov a �crit :

Hey Seb,

Here's what I just saw with ICE. Could this be related to your latest
changes?

Emil

14:42:00.589 WARNING: org.ice4j.stack.NetAccessManager.handleFatalError() A message processor has unexpectedly stopped. AP:org.ice4j.stack.MessageProcessor@124be57
java.lang.OutOfMemoryError: unable to create new native thread
  at java.lang.Thread.start0(Native Method)
  at java.lang.Thread.start(Thread.java:658)
  at org.ice4j.stack.StunServerTransaction.start(StunServerTransaction.java:132)
  at org.ice4j.stack.StunStack.handleMessageEvent(StunStack.java:669)
  at org.ice4j.stack.MessageProcessor.run(MessageProcessor.java:161)
  at java.lang.Thread.run(Thread.java:680)
14:42:00.589 SEVERE: util.UtilActivator.uncaughtException().88 An uncaught exception occurred in thread=Thread[Stun4J Message Processor,6,main] and message was: unable to create new native thread
java.lang.OutOfMemoryError: unable to create new native thread
  at java.lang.Thread.start0(Native Method)
  at java.lang.Thread.start(Thread.java:658)
  at org.ice4j.stack.MessageProcessor.start(MessageProcessor.java:194)
  at org.ice4j.stack.NetAccessManager.handleFatalError(NetAccessManager.java:186)
  at org.ice4j.stack.MessageProcessor.run(MessageProcessor.java:181)
  at java.lang.Thread.run(Thread.java:680)
14:42:00.604 INFO: org.ice4j.ice.ConnectivityCheckServer.processRequest() No candidate pair that match local and remote ufrag
14:42:00.628 WARNING: org.ice4j.stack.NetAccessManager.handleFatalError() A message processor has unexpectedly stopped. AP:org.ice4j.stack.MessageProcessor@8a22c9
java.lang.OutOfMemoryError: unable to create new native thread
  at java.lang.Thread.start0(Native Method)
  at java.lang.Thread.start(Thread.java:658)
  at org.ice4j.stack.StunServerTransaction.start(StunServerTransaction.java:132)
  at org.ice4j.stack.StunStack.handleMessageEvent(StunStack.java:669)
  at org.ice4j.stack.MessageProcessor.run(MessageProcessor.java:161)
  at java.lang.Thread.run(Thread.java:680)
14:42:00.629 SEVERE: util.UtilActivator.uncaughtException().88 An uncaught exception occurred in thread=Thread[Stun4J Message Processor,6,main] and message was: unable to create new native thread
java.lang.OutOfMemoryError: unable to create new native thread
  at java.lang.Thread.start0(Native Method)
  at java.lang.Thread.start(Thread.java:658)
  at org.ice4j.stack.MessageProcessor.start(MessageProcessor.java:194)
  at org.ice4j.stack.NetAccessManager.handleFatalError(NetAccessManager.java:186)
  at org.ice4j.stack.MessageProcessor.run(MessageProcessor.java:181)
  at java.lang.Thread.run(Thread.java:680)
14:42:00.640 INFO: org.ice4j.ice.ConnectivityCheckServer.processRequest() No candidate pair that match local and remote ufrag
14:42:00.641 WARNING: org.ice4j.stack.NetAccessManager.handleFatalError() A message processor has unexpectedly stopped. AP:org.ice4j.stack.MessageProcessor@177ba44
java.lang.OutOfMemoryError: unable to create new native thread
  at java.lang.Thread.start0(Native Method)
  at java.lang.Thread.start(Thread.java:658)
  at org.ice4j.stack.StunServerTransaction.start(StunServerTransaction.java:132)
  at org.ice4j.stack.StunStack.handleMessageEvent(StunStack.java:669)
  at org.ice4j.stack.MessageProcessor.run(MessageProcessor.java:161)
  at java.lang.Thread.run(Thread.java:680)
14:42:00.641 SEVERE: util.UtilActivator.uncaughtException().88 An uncaught exception occurred in thread=Thread[Stun4J Message Processor,6,main] and message was: unable to create new native thread
java.lang.OutOfMemoryError: unable to create new native thread
  at java.lang.Thread.start0(Native Method)
  at java.lang.Thread.start(Thread.java:658)
  at org.ice4j.stack.MessageProcessor.start(MessageProcessor.java:194)
  at org.ice4j.stack.NetAccessManager.handleFatalError(NetAccessManager.java:186)
  at org.ice4j.stack.MessageProcessor.run(MessageProcessor.java:181)
  at java.lang.Thread.run(Thread.java:680)


#3

sounds like a thread leak in case of error. What is the number of threads in this situation?
Could you have a look in taskmanager (if running in windows)? If run with standard parameters,
Java goes with 64MB. Thread stack size is 1MB! It is recommended though, to reduce it to 512k: -Xss512k
But does not matter anyway in case of leak.

···

Am 14.02.2012 14:47, schrieb Sebastien Vincent:

My latest changes were to remove some ICE threads that stay after end of a call and that never exit.

I will check what can be wrong.

--
Seb

Le 14/02/12 14:43, Emil Ivov a �crit :

Hey Seb,

Here's what I just saw with ICE. Could this be related to your latest
changes?

Emil

14:42:00.589 WARNING: org.ice4j.stack.NetAccessManager.handleFatalError() A message processor has unexpectedly stopped. AP:org.ice4j.stack.MessageProcessor@124be57
java.lang.OutOfMemoryError: unable to create new native thread
    at java.lang.Thread.start0(Native Method)
    at java.lang.Thread.start(Thread.java:658)
    at org.ice4j.stack.StunServerTransaction.start(StunServerTransaction.java:132)
    at org.ice4j.stack.StunStack.handleMessageEvent(StunStack.java:669)
    at org.ice4j.stack.MessageProcessor.run(MessageProcessor.java:161)
    at java.lang.Thread.run(Thread.java:680)
14:42:00.589 SEVERE: util.UtilActivator.uncaughtException().88 An uncaught exception occurred in thread=Thread[Stun4J Message Processor,6,main] and message was: unable to create new native thread
java.lang.OutOfMemoryError: unable to create new native thread
    at java.lang.Thread.start0(Native Method)
    at java.lang.Thread.start(Thread.java:658)
    at org.ice4j.stack.MessageProcessor.start(MessageProcessor.java:194)
    at org.ice4j.stack.NetAccessManager.handleFatalError(NetAccessManager.java:186)
    at org.ice4j.stack.MessageProcessor.run(MessageProcessor.java:181)
    at java.lang.Thread.run(Thread.java:680)
14:42:00.604 INFO: org.ice4j.ice.ConnectivityCheckServer.processRequest() No candidate pair that match local and remote ufrag
14:42:00.628 WARNING: org.ice4j.stack.NetAccessManager.handleFatalError() A message processor has unexpectedly stopped. AP:org.ice4j.stack.MessageProcessor@8a22c9
java.lang.OutOfMemoryError: unable to create new native thread
    at java.lang.Thread.start0(Native Method)
    at java.lang.Thread.start(Thread.java:658)
    at org.ice4j.stack.StunServerTransaction.start(StunServerTransaction.java:132)
    at org.ice4j.stack.StunStack.handleMessageEvent(StunStack.java:669)
    at org.ice4j.stack.MessageProcessor.run(MessageProcessor.java:161)
    at java.lang.Thread.run(Thread.java:680)
14:42:00.629 SEVERE: util.UtilActivator.uncaughtException().88 An uncaught exception occurred in thread=Thread[Stun4J Message Processor,6,main] and message was: unable to create new native thread
java.lang.OutOfMemoryError: unable to create new native thread
    at java.lang.Thread.start0(Native Method)
    at java.lang.Thread.start(Thread.java:658)
    at org.ice4j.stack.MessageProcessor.start(MessageProcessor.java:194)
    at org.ice4j.stack.NetAccessManager.handleFatalError(NetAccessManager.java:186)
    at org.ice4j.stack.MessageProcessor.run(MessageProcessor.java:181)
    at java.lang.Thread.run(Thread.java:680)
14:42:00.640 INFO: org.ice4j.ice.ConnectivityCheckServer.processRequest() No candidate pair that match local and remote ufrag
14:42:00.641 WARNING: org.ice4j.stack.NetAccessManager.handleFatalError() A message processor has unexpectedly stopped. AP:org.ice4j.stack.MessageProcessor@177ba44
java.lang.OutOfMemoryError: unable to create new native thread
    at java.lang.Thread.start0(Native Method)
    at java.lang.Thread.start(Thread.java:658)
    at org.ice4j.stack.StunServerTransaction.start(StunServerTransaction.java:132)
    at org.ice4j.stack.StunStack.handleMessageEvent(StunStack.java:669)
    at org.ice4j.stack.MessageProcessor.run(MessageProcessor.java:161)
    at java.lang.Thread.run(Thread.java:680)
14:42:00.641 SEVERE: util.UtilActivator.uncaughtException().88 An uncaught exception occurred in thread=Thread[Stun4J Message Processor,6,main] and message was: unable to create new native thread
java.lang.OutOfMemoryError: unable to create new native thread
    at java.lang.Thread.start0(Native Method)
    at java.lang.Thread.start(Thread.java:658)
    at org.ice4j.stack.MessageProcessor.start(MessageProcessor.java:194)
    at org.ice4j.stack.NetAccessManager.handleFatalError(NetAccessManager.java:186)
    at org.ice4j.stack.MessageProcessor.run(MessageProcessor.java:181)
    at java.lang.Thread.run(Thread.java:680)