最终注意到所有的worker thread 都在下面的地方卡主:
仔细研究后明白了,是第三放的sendget方法遇到 https 的url了。
最终卡在 ssl常见的 读取socket的代码上,那么使用j2se或者替换https到http。
最终确认,该java code实现的 sendGet 方法,没有设置连接超时和读超时,导致该问题。设置超时后,问题不再出现。
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(Unknown Source)
at java.net.SocketInputStream.read(Unknown Source)
at sun.security.ssl.InputRecord.readFully(Unknown Source)
at sun.security.ssl.InputRecord.readV3Record(Unknown Source)
at sun.security.ssl.InputRecord.read(Unknown Source)
at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
- locked [0x000000062abd5a80] (a java.lang.Object)
at sun.security.ssl.SSLSocketImpl.readDataRecord(Unknown Source)
at sun.security.ssl.AppInputStream.read(Unknown Source)
- locked [0x000000062abd5740] (a sun.security.ssl.AppInputStream)
at java.io.BufferedInputStream.read1(Unknown Source)
at java.io.BufferedInputStream.read(Unknown Source)
- locked [0x000000062abd5718] (a java.io.BufferedInputStream)
at sun.net.www.MeteredStream.read(Unknown Source)
- locked [0x000000062abd56d8] (a sun.net.www.http.KeepAliveStream)
at java.io.FilterInputStream.read(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(Unknown Source)
at sun.nio.cs.StreamDecoder.readBytes(Unknown Source)
at sun.nio.cs.StreamDecoder.implRead(Unknown Source)
at sun.nio.cs.StreamDecoder.read(Unknown Source)
- locked [0x000000062abd4460] (a java.io.InputStreamReader)
at java.io.InputStreamReader.read(Unknown Source)
at java.io.BufferedReader.fill(Unknown Source)
at java.io.BufferedReader.readLine(Unknown Source)
- locked [0x000000062abd4460] (a java.io.InputStreamReader)
at java.io.BufferedReader.readLine(Unknown Source)
at SubProcess.Level2.SyncWithoutBlank.SyncWithoutBlankEncodeBlank.sendGet(SyncWithoutBlankEncodeBlank.java:61)
at SubProcess.Level2.SyncWithoutBlank.SyncWithoutBlankEncodeBlank.invoke(SyncWithoutBlankEncodeBlank.java:81)
at sun.reflect.GeneratedMethodAccessor114.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
网友评论