You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Mario Emmenlauer (JIRA)" <ji...@apache.org> on 2018/07/04 13:19:00 UTC
[jira] [Created] (THRIFT-4598) TBinaryProtocol.readMessageBegin()
hangs forever in Java
Mario Emmenlauer created THRIFT-4598:
----------------------------------------
Summary: TBinaryProtocol.readMessageBegin() hangs forever in Java
Key: THRIFT-4598
URL: https://issues.apache.org/jira/browse/THRIFT-4598
Project: Thrift
Issue Type: Bug
Components: Java - Library
Affects Versions: 1.0
Environment: Ubuntu Linux 16.04 x86_64
Reporter: Mario Emmenlauer
I run some internal tests for the robustness of our thrift Java server. It seems the tests lead to an infinitely hanging server thread. This blocks the jvm from cleanly ending. After I try a clean exit, there are almost no threads left except the org.apache.thrift.server.TThreadPoolServer.
Here is the call stack:
{code:java}
java.lang.Thread.State: RUNNABLE
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
at java.net.SocketInputStream.read(SocketInputStream.java:171)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:286)
at java.io.BufferedInputStream.read(BufferedInputStream.java:345)
- locked <0x000000067b390fd8> (a java.io.BufferedInputStream)
at org.apache.thrift.transport.TIOStreamTransport.read(TIOStreamTransport.java:127)
at org.apache.thrift.transport.TTransport.readAll(TTransport.java:86)
at org.apache.thrift.protocol.TBinaryProtocol.readAll(TBinaryProtocol.java:425)
at org.apache.thrift.protocol.TBinaryProtocol.readI32(TBinaryProtocol.java:321)
at org.apache.thrift.protocol.TBinaryProtocol.readMessageBegin(TBinaryProtocol.java:225)
at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:27)
at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:310)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
{code}
I already reduced the server socket timeout to 30sec and the requestTimeout to 10sec. Is there anything else I can do to timeout readMessageBegin()?
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)