java.lang.OutOfMemoryError: unable to create new native thread*

spark-user | Soumya Simanta | 3 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Caused by: java.lang.OutOfMemoryError: unable to create new native thread

    spark-user | 3 years ago | Soumya Simanta
    java.lang.OutOfMemoryError: unable to create new native thread*

    Root Cause Analysis

    1. java.lang.OutOfMemoryError

      unable to create new native thread*

      at java.lang.Thread.start0()
    2. Java RT
      Runtime.exec
      1. java.lang.Thread.start0(Native Method)
      2. java.lang.Thread.start(Thread.java:679)
      3. java.lang.UNIXProcess$1.run(UNIXProcess.java:157)
      4. java.security.AccessController.doPrivileged(Native Method)
      5. java.lang.UNIXProcess.<init>(UNIXProcess.java:119)
      6. java.lang.ProcessImpl.start(ProcessImpl.java:81)
      7. java.lang.ProcessBuilder.start(ProcessBuilder.java:470)
      8. java.lang.Runtime.exec(Runtime.java:612)
      9. java.lang.Runtime.exec(Runtime.java:485)
      9 frames
    3. jline
      ConsoleReader.readVirtualKey
      1. scala.tools.jline.internal.TerminalLineSettings.exec(TerminalLineSettings.java:178)
      2. scala.tools.jline.internal.TerminalLineSettings.exec(TerminalLineSettings.java:168)
      3. scala.tools.jline.internal.TerminalLineSettings.stty(TerminalLineSettings.java:163)
      4. scala.tools.jline.internal.TerminalLineSettings.get(TerminalLineSettings.java:67)
      5. scala.tools.jline.internal.TerminalLineSettings.getProperty(TerminalLineSettings.java:87)
      6. scala.tools.jline.UnixTerminal.readVirtualKey(UnixTerminal.java:127)
      7. scala.tools.jline.console.ConsoleReader.readVirtualKey(ConsoleReader.java:933)
      7 frames
    4. Spark REPL
      SparkJLineReader.readOneKey
      1. org.apache.spark.repl.SparkJLineReader$JLineConsoleReader.readOneKey(SparkJLineReader.scala:54)
      2. org.apache.spark.repl.SparkJLineReader.readOneKey(SparkJLineReader.scala:81)
      2 frames
    5. Scala Compiler
      InteractiveReader$class.readYesOrNo
      1. scala.tools.nsc.interpreter.InteractiveReader$class.readYesOrNo(InteractiveReader.scala:29)
      1 frame
    6. Spark REPL
      SparkILoop$$anonfun$1$$anonfun$org$apache$spark$repl$SparkILoop$$anonfun$$fn$1$1.apply$mcZ$sp
      1. org.apache.spark.repl.SparkJLineReader.readYesOrNo(SparkJLineReader.scala:25)
      2. org.apache.spark.repl.SparkILoop$$anonfun$1.org$apache$spark$repl$SparkILoop$$anonfun$$fn$1(SparkILoop.scala:576)
      3. org.apache.spark.repl.SparkILoop$$anonfun$1$$anonfun$org$apache$spark$repl$SparkILoop$$anonfun$$fn$1$1.apply$mcZ$sp(SparkILoop.scala:576)
      3 frames
    7. Scala Compiler
      InteractiveReader$class.readYesOrNo
      1. scala.tools.nsc.interpreter.InteractiveReader$class.readYesOrNo(InteractiveReader.scala:32)
      1 frame
    8. Spark REPL
      SparkILoop$$anonfun$1$$anonfun$org$apache$spark$repl$SparkILoop$$anonfun$$fn$1$1.apply$mcZ$sp
      1. org.apache.spark.repl.SparkJLineReader.readYesOrNo(SparkJLineReader.scala:25)
      2. org.apache.spark.repl.SparkILoop$$anonfun$1.org$apache$spark$repl$SparkILoop$$anonfun$$fn$1(SparkILoop.scala:576)
      3. org.apache.spark.repl.SparkILoop$$anonfun$1$$anonfun$org$apache$spark$repl$SparkILoop$$anonfun$$fn$1$1.apply$mcZ$sp(SparkILoop.scala:576)
      3 frames
    9. Scala Compiler
      InteractiveReader$class.readYesOrNo
      1. scala.tools.nsc.interpreter.InteractiveReader$class.readYesOrNo(InteractiveReader.scala:32)
      1 frame
    10. Spark REPL
      SparkILoop$$anonfun$1.applyOrElse
      1. org.apache.spark.repl.SparkJLineReader.readYesOrNo(SparkJLineReader.scala:25)
      2. org.apache.spark.repl.SparkILoop$$anonfun$1.org$apache$spark$repl$SparkILoop$$anonfun$$fn$1(SparkILoop.scala:576)
      3. org.apache.spark.repl.SparkILoop$$anonfun$1.applyOrElse(SparkILoop.scala:579)
      4. org.apache.spark.repl.SparkILoop$$anonfun$1.applyOrElse(SparkILoop.scala:566)
      4 frames
    11. Scala
      AbstractPartialFunction$mcZL$sp.apply
      1. scala.runtime.AbstractPartialFunction$mcZL$sp.apply$mcZL$sp(AbstractPartialFunction.scala:33)
      2. scala.runtime.AbstractPartialFunction$mcZL$sp.apply(AbstractPartialFunction.scala:33)
      3. scala.runtime.AbstractPartialFunction$mcZL$sp.apply(AbstractPartialFunction.scala:25)
      3 frames
    12. Spark REPL
      SparkILoop$$anonfun$process$1.apply
      1. org.apache.spark.repl.SparkILoop.innerLoop$1(SparkILoop.scala:608)
      2. org.apache.spark.repl.SparkILoop.loop(SparkILoop.scala:611)
      3. org.apache.spark.repl.SparkILoop$$anonfun$process$1.apply$mcZ$sp(SparkILoop.scala:936)
      4. org.apache.spark.repl.SparkILoop$$anonfun$process$1.apply(SparkILoop.scala:884)
      5. org.apache.spark.repl.SparkILoop$$anonfun$process$1.apply(SparkILoop.scala:884)
      5 frames
    13. Scala Compiler
      ScalaClassLoader$.savingContextLoader
      1. scala.tools.nsc.util.ScalaClassLoader$.savingContextLoader(ScalaClassLoader.scala:135)
      1 frame
    14. Spark REPL
      Main.main
      1. org.apache.spark.repl.SparkILoop.process(SparkILoop.scala:884)
      2. org.apache.spark.repl.SparkILoop.process(SparkILoop.scala:983)
      3. org.apache.spark.repl.Main$.main(Main.scala:31)
      4. org.apache.spark.repl.Main.main(Main.scala)
      4 frames