[ https://issues.apache.org/jira/browse/THRIFT-968?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brandon Williams updated THRIFT-968: ------------------------------------ Description: In telephus, a wrapper for cassandra, we have a test that passes an integer where a string is required: http://github.com/driftx/Telephus/blob/unstable/test/test_cassandraclient.py#L270 The point of this test is to ensure that telephus throws the connection away (because it's no longer usable) and makes new ones to recover. However, this is impossible as thrift itself becomes unusable afterwards. Client calls never respond after this, and on the server we see: ERROR 19:27:01,831 Thrift error occurred during processing of message. org.apache.thrift.protocol.TProtocolException: Missing version in readMessageBegin, old client? at org.apache.thrift.protocol.TBinaryProtocol.readMessageBegin(TBinaryProtocol.java:211) at org.apache.cassandra.thrift.Cassandra$Processor.process(Cassandra.java:2542) at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:167) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) When using the accelerated protocol. With the unaccelerated protocol, we get a different error: ERROR [pool-1-thread-4] 2010-10-24 19:28:15,146 CustomTThreadPoolServer.java (line 175) Thrift error occurred during processing of message. org.apache.thrift.TException: Negative length: -2147418111 at org.apache.thrift.protocol.TBinaryProtocol.checkReadLength(TBinaryProtocol.java:379) at org.apache.thrift.protocol.TBinaryProtocol.readBinary(TBinaryProtocol.java:361) at org.apache.cassandra.thrift.Cassandra$get_args.read(Cassandra.java:5279) at org.apache.cassandra.thrift.Cassandra$Processor$get.process(Cassandra.java:2641) at org.apache.cassandra.thrift.Cassandra$Processor.process(Cassandra.java:2554) at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:167) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) The python process has to be restarted for any calls to succeed again. was: In telephus, a wrapper for cassandra, we have a test that passes an integer where a string is required: http://github.com/driftx/Telephus/blob/unstable/test/test_cassandraclient.py#L270 The point of this test is to ensure that telephus throws the connection away (because it's no longer unusable) and makes new ones to recover. However, this is impossible as thrift itself becomes unusable afterwards. Client calls never respond after this, and on the server we see: ERROR 19:27:01,831 Thrift error occurred during processing of message. org.apache.thrift.protocol.TProtocolException: Missing version in readMessageBegin, old client? at org.apache.thrift.protocol.TBinaryProtocol.readMessageBegin(TBinaryProtocol.java:211) at org.apache.cassandra.thrift.Cassandra$Processor.process(Cassandra.java:2542) at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:167) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) When using the accelerated protocol. With the unaccelerated protocol, we get a different error: ERROR [pool-1-thread-4] 2010-10-24 19:28:15,146 CustomTThreadPoolServer.java (line 175) Thrift error occurred during processing of message. org.apache.thrift.TException: Negative length: -2147418111 at org.apache.thrift.protocol.TBinaryProtocol.checkReadLength(TBinaryProtocol.java:379) at org.apache.thrift.protocol.TBinaryProtocol.readBinary(TBinaryProtocol.java:361) at org.apache.cassandra.thrift.Cassandra$get_args.read(Cassandra.java:5279) at org.apache.cassandra.thrift.Cassandra$Processor$get.process(Cassandra.java:2641) at org.apache.cassandra.thrift.Cassandra$Processor.process(Cassandra.java:2554) at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:167) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) The python process has to be restarted for any calls to succeed again. > Passing invalid parameters to thrift makes it unusable > ------------------------------------------------------ > > Key: THRIFT-968 > URL: https://issues.apache.org/jira/browse/THRIFT-968 > Project: Thrift > Issue Type: Bug > Components: Python - Library > Affects Versions: 0.5 > Reporter: Brandon Williams > > In telephus, a wrapper for cassandra, we have a test that passes an integer > where a string is required: > http://github.com/driftx/Telephus/blob/unstable/test/test_cassandraclient.py#L270 > The point of this test is to ensure that telephus throws the connection away > (because it's no longer usable) and makes new ones to recover. However, this > is impossible as thrift itself becomes unusable afterwards. Client calls > never respond after this, and on the server we see: > ERROR 19:27:01,831 Thrift error occurred during processing of message. > org.apache.thrift.protocol.TProtocolException: Missing version in > readMessageBegin, old client? > at > org.apache.thrift.protocol.TBinaryProtocol.readMessageBegin(TBinaryProtocol.java:211) > at > org.apache.cassandra.thrift.Cassandra$Processor.process(Cassandra.java:2542) > at > org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:167) > at > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) > at java.lang.Thread.run(Thread.java:619) > When using the accelerated protocol. With the unaccelerated protocol, we get > a different error: > ERROR [pool-1-thread-4] 2010-10-24 19:28:15,146 CustomTThreadPoolServer.java > (line 175) Thrift error occurred during processing of message. > org.apache.thrift.TException: Negative length: -2147418111 > at > org.apache.thrift.protocol.TBinaryProtocol.checkReadLength(TBinaryProtocol.java:379) > at > org.apache.thrift.protocol.TBinaryProtocol.readBinary(TBinaryProtocol.java:361) > at > org.apache.cassandra.thrift.Cassandra$get_args.read(Cassandra.java:5279) > at > org.apache.cassandra.thrift.Cassandra$Processor$get.process(Cassandra.java:2641) > at > org.apache.cassandra.thrift.Cassandra$Processor.process(Cassandra.java:2554) > at > org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:167) > at > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) > at java.lang.Thread.run(Thread.java:619) > The python process has to be restarted for any calls to succeed again. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.