File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes I/O and Streams and the fly likes Thread locked at BufferedReader.readLine Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "Thread locked at BufferedReader.readLine" Watch "Thread locked at BufferedReader.readLine" New topic
Author

Thread locked at BufferedReader.readLine

Madhu Kaparapu
Ranch Hand

Joined: Jul 04, 2005
Posts: 35
Hi Team,

I have a service/thread which reads the xml data from the given RSS XML feed URL and writes to a file. This service got hangs sometime twice in a week and by looking at the jstack process dump it seems a thread lock appears during the RSS xml Feed URL connection for getting XML feed data.

Please see the below jstack information:

"Thread-3" prio=10 tid=0x08264400 nid=0x207b runnable [0x8bf99000..0x8bf99e20]
java.lang.Thread.State: RUNNABLE
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:256)
at java.io.BufferedInputStream.read(BufferedInputStream.java:317)
- locked <0xb1955e28> (a java.io.BufferedInputStream)
at sun.net.www.http.ChunkedInputStream.fastRead(ChunkedInputStream.java:221)
at sun.net.www.http.ChunkedInputStream.read(ChunkedInputStream.java:662)
- locked <0xb1958b00> (a sun.net.www.http.ChunkedInputStream)
at java.io.FilterInputStream.read(FilterInputStream.java:116)
at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:2391)
at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264)
at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158)
- locked <0xb194a228> (a java.io.InputStreamReader)
at java.io.InputStreamReader.read(InputStreamReader.java:167)
at java.io.BufferedReader.fill(BufferedReader.java:136)
at java.io.BufferedReader.readLine(BufferedReader.java:299)
- locked <0xb194a228> (a java.io.InputStreamReader)
at java.io.BufferedReader.readLine(BufferedReader.java:362)
at com.xxx.util.XMLResponseReadAndWrite.getResponse(XMLResponseReadAndWrite.java:44)
at com.xxx.AggregationProcess.run(AggregationProcess.java:132)
at java.lang.Thread.run(Thread.java:619)

Each time i have to kill the process manaully... . Please find the attached full jstack dump and help in trouble shooting this issue.


Regards,
Madhu Kaparapu.
 
 
subject: Thread locked at BufferedReader.readLine
 
Similar Threads
Form based authentication with Tomcat 7 and JSF2 Problem
Unusual Error while starting weblogic 9.2
java.io.IOException: Premature EOF
Exception on setting Djavax.net.ssl.trustStore via relative path in ant junit task
java.util.zip in Thread Dump ?