[
https://issues.apache.org/jira/browse/ACCUMULO-2897?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14030064#comment-14030064
]
Joseph L Howard commented on ACCUMULO-2897:
-------------------------------------------
{code}
final long maxFrameSize =
AccumuloConfiguration.getMemoryInBytes(properties.getProperty("maxFrameSize",
"16M"));
final long maxMessageSize =
AccumuloConfiguration.getMemoryInBytes(properties.getProperty("maxMessageSize",
"16M"));
if (maxFrameSize > Integer.MAX_VALUE)
throw new RuntimeException(maxFrameSize + " - FrameSize is larger than
MAX_INT");
args.maxReadBufferBytes = Math.min(maxMessageSize,maxFrameSize);
{/code}
> Thrift proxy in Accumulo throws out of memory error on malformed request
> ------------------------------------------------------------------------
>
> Key: ACCUMULO-2897
> URL: https://issues.apache.org/jira/browse/ACCUMULO-2897
> Project: Accumulo
> Issue Type: Bug
> Components: proxy
> Affects Versions: 1.6.0
> Environment: Oracle Java 1.7.0_60, Accumulo 1.6, Hadoop 2.2 Zookeeper
> on Centos
> Reporter: Joseph L Howard
> Labels: Accumulo, Memory, Proxy, Thrift, error
> Original Estimate: 120h
> Remaining Estimate: 120h
>
> Thrift libraries have a well known Jira problem where malformed requests
> (e.g. curl) throw an Out of memory error on malformed requests. Length limit
> checks (possibly JIRA THRIFT-2572 issue Add string/collection length limit
> checks (from C++) to java.)
> This is likely TBinaryProtocol.
> ----------------------------------------------------------------------
> Replicating the issue:
> 1) start Accumulo proxy "./accumulo proxy -p ../proxy/proxy.properties
> 2) curl -get localhost:proxyport "Hi"
> Proxy will crash with OOM.
--
This message was sent by Atlassian JIRA
(v6.2#6252)