Thrift
  1. Thrift
  2. THRIFT-601

sending random data crashes thrift service

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 0.2
    • Fix Version/s: 0.3
    • Component/s: Java - Library
    • Labels:

      Description

      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)

      1. thrift-601-v2.patch
        0.6 kB
        Bryan Duxbury
      2. thrift-601.patch
        2 kB
        Esteve Fernandez
      3. t601-p2.patch
        1 kB
        David Reiss

        Issue Links

          Activity

          Jens Geyer made changes -
          Link This issue relates to THRIFT-2500 [ THRIFT-2500 ]
          LiMing made changes -
          Link This issue is a clone of THRIFT-2500 [ THRIFT-2500 ]
          Jake Farrell made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          David Reiss made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Bryan Duxbury made changes -
          Assignee David Reiss [ dreiss ]
          Fix Version/s 0.3 [ 12314451 ]
          David Reiss made changes -
          Attachment t601-p2.patch [ 12442645 ]
          Bryan Duxbury made changes -
          Attachment thrift-601-v2.patch [ 12440268 ]
          Jonathan Ellis made changes -
          Labels gsoc
          Affects Version/s 0.2 [ 12313769 ]
          Esteve Fernandez made changes -
          Attachment thrift-601.patch [ 12424489 ]
          Esteve Fernandez made changes -
          Priority Major [ 3 ] Critical [ 2 ]
          Eric Evans made changes -
          Field Original Value New Value
          Description Sending random data to a Java thrift service causes it 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)
          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)
          Eric Evans created issue -

            People

            • Assignee:
              David Reiss
              Reporter:
              Eric Evans
            • Votes:
              5 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development