[ 
https://issues.apache.org/jira/browse/THRIFT-602?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13507908#comment-13507908
 ] 

oliver  z commented on THRIFT-602:
----------------------------------

I can still reproduce this on 0.8 so its not fixed. 

10:12:40.461 [Thread-1] [ERROR] o.a.t.server.THsHaServer - run() exiting due to 
uncaught error 
java.lang.OutOfMemoryError: Java heap space
        at java.nio.HeapByteBuffer.<init>(Unknown Source) ~[na:1.7.0_04]
        at java.nio.ByteBuffer.allocate(Unknown Source) ~[na:1.7.0_04]
        at 
org.apache.thrift.server.AbstractNonblockingServer$FrameBuffer.read(AbstractNonblockingServer.java:338)
 ~[libthrift-0.8.0.jar:0.8.0]
        at 
org.apache.thrift.server.AbstractNonblockingServer$AbstractSelectThread.handleRead(AbstractNonblockingServer.java:202)
 ~[libthrift-0.8.0.jar:0.8.0]
        at 
org.apache.thrift.server.TNonblockingServer$SelectAcceptThread.select(TNonblockingServer.java:198)
 ~[libthrift-0.8.0.jar:0.8.0]
        at 
org.apache.thrift.server.TNonblockingServer$SelectAcceptThread.run(TNonblockingServer.java:154)
 ~[libthrift-0.8.0.jar:0.8.0]
                
> Out of memory error on bogus input
> ----------------------------------
>
>                 Key: THRIFT-602
>                 URL: https://issues.apache.org/jira/browse/THRIFT-602
>             Project: Thrift
>          Issue Type: Bug
>          Components: Java - Library
>    Affects Versions: 0.2
>         Environment: The internet :-)
>            Reporter: Kjetil Valstadsve
>         Attachments: 
> Catch_out_of_memory_error,_notify_the_number_of_bytes_requested,_and_rethrow_as_TException_.patch
>
>
> When testing the thrift port of a Cassandra server, I did a telnet and typed 
> in an "sdfsdf" and linebreak, just to see it hang up. 
> Hang up it did! In fact, this happened on the server:
> ERROR [pool-1-thread-1] 2009-10-08 13:20:56,782 CassandraDaemon.java (line 
> 71) Fatal exception in thread Thread[pool-1-thread-1,5,main]
> 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$Worker.runTask(ThreadPoolExecutor.java:886)
>         at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>         at java.lang.Thread.run(Thread.java:619)
> I assume this is what happens: Data is misread as an input length, an 
> unreasonably-sized array is attempted, and the VM dies. I have a patch that 
> rethrows it as a TException, with some info on the number of bytes requested. 
> I will attach it once I find out how.
> Not sure about the thrift version, it happens in Cassandra 0.4.0, the thrift 
> jar being libthrift-r808609.jar.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to