Uploaded image for project: 'Accumulo'
  1. Accumulo
  2. ACCUMULO-2658

Thrift Proxy crashes with OOM on bad input

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.1
    • Fix Version/s: 1.5.2, 1.6.1, 1.7.0
    • Component/s: proxy
    • Labels:
      None

      Description

      The proxy server doesn't benefit from the fix for ACCUMULO-2360 because it doesn't use the TServerUtils class to set up the thrift server.

      The smallest fix is really easy: just add the line:

      args.maxReadBufferBytes = maxFrameSize; 
      

      to o.a.a.proxy.Proxy.createProxyServer.

      I guess a more comprehensive fix would be to convert Proxy to use TServerUtils, but that's a little beyond me at this point.

      Steps to reproduce:
      1. Start your proxy server
      2. telnet localhost 42424
      3. Type "stat", press enter.

      Expected Behaviour:

      • The thrift server stays up and ignores the invalid input

      Actual Behaviour:

      • The thrift server seems to interpret the text string as a buffer size and immediately crashes with this error written to the log file:
        #
        # java.lang.OutOfMemoryError: Java heap space
        # -XX:OnOutOfMemoryError="kill -9 %p"
        #   Executing /bin/sh -c "kill -9 13396"...
        

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                elserj Josh Elser
                Reporter:
                rweeks Russ Weeks
              • Votes:
                1 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h