[
https://issues.apache.org/jira/browse/THRIFT-601?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13034112#comment-13034112
]
Bryan Duxbury commented on THRIFT-601:
--------------------------------------
@Ryan - I'm not sure I follow your comment. If you send a large frame size and
then never provide the data, it's true that that socket will "hang", insofar as
there won't ever be a timeout or whatnot, but it won't prevent the selector
from servicing other sockets. The socket channel read methods never block -
they'll only read as much as is available.
> sending random data crashes thrift service
> ------------------------------------------
>
> Key: THRIFT-601
> URL: https://issues.apache.org/jira/browse/THRIFT-601
> Project: Thrift
> Issue Type: Bug
> Components: Java - Library
> Affects Versions: 0.2
> Reporter: Eric Evans
> Assignee: David Reiss
> Priority: Critical
> Labels: gsoc
> Fix For: 0.3
>
> Attachments: t601-p2.patch, thrift-601-v2.patch, thrift-601.patch
>
>
> Sending random data to a Java thrift service causes it to crash with extreme
> prejudice.
> dd if=/dev/urandom count=1 | nc $host 9160
> ... produces ...
> java.lang.OutOfMemoryError: Java heap space
> at
> org.apache.thrift.protocol.TBinaryProtocol.readStringBody(TBinaryProtocol.java:296)
> at
> org.apache.thrift.protocol.TBinaryProtocol.readMessageBegin(TBinaryProtocol.java:203)
> at
> org.apache.cassandra.service.Cassandra$Processor.process(Cassandra.java:615)
> at
> org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:253)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:636)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira