1 Reply Latest reply on Mar 28, 2017 3:03 PM by Dalibor.Topic-Oracle

    Stuck threads

    3258973

      Question :

       

      Weblogic server frequently hangs up due to one thread not returning from FileOutputStream.writeBytes method , trying to log a message to stderr . The java thread dump shows this thread as follows:

       

      [STUCK] ExecuteThread: '11' for queue: 'weblogic.kernel.Default (self-tuning)'" Id=54 RUNNABLE (in native)

      at java.io.FileOutputStream.writeBytes(Native Method)

      at java.io.FileOutputStream.write(FileOutputStream.java:345)

      at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)

      at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)

      -  locked java.io.BufferedOutputStream@66f6b5da

      at java.io.PrintStream.write(PrintStream.java:482)

      -  locked java.io.PrintStream@13dd6361

      at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221)

      at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:291)

      at sun.nio.cs.StreamEncoder.flushBuffer(StreamEncoder.java:104)

      -  locked java.io.OutputStreamWriter@4f1d3005

      at java.io.OutputStreamWriter.flushBuffer(OutputStreamWriter.java:185)

      at java.io.PrintStream.newLine(PrintStream.java:546)

      -  locked java.io.PrintStream@13dd6361

      at java.io.PrintStream.println(PrintStream.java:824)

      -  locked java.io.PrintStream@13dd6361

      at java.lang.Throwable$WrappedPrintStream.println(Throwable.java:748)

      at java.lang.Throwable.printStackTrace(Throwable.java:658)

      -  locked java.io.PrintStream@13dd6361

      at java.lang.Throwable.printStackTrace(Throwable.java:643)

      at java.lang.Throwable.printStackTrace(Throwable.java:634):

       

       

      Over time, more and more threads get stuck because they are waiting to lock objects held by the above thread, until the complete application grinds to a halt. We are starting the server using the command

      nohup ./startManagedWeblogic &

      No explicit redirection is given for stdout and stderr stream.  Why does the writeBytes method not return ?

       

      Environment : Solaris

      Weblogic Server version : 12.1.2