You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Jens Geyer (Jira)" <ji...@apache.org> on 2021/03/26 12:37:00 UTC

[jira] [Commented] (THRIFT-5369) Malformed payload can still cause huge allocations

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

Jens Geyer commented on THRIFT-5369:
------------------------------------

Did you consider to limit MaxMessageSize? If that does not work then there might be an impl bug. 

Having another separate setting just for containers raiises the question if we should also limit strings and binary separately? And finally, if we implemented all of this, what we need the then totally redundant MaxMessageSize for? I don't want to stay in the way but I personally think it is not the right way to add more code only to cover weaknesses of the existing implementation.

> Malformed payload can still cause huge allocations
> --------------------------------------------------
>
>                 Key: THRIFT-5369
>                 URL: https://issues.apache.org/jira/browse/THRIFT-5369
>             Project: Thrift
>          Issue Type: Bug
>          Components: Go - Compiler, Go - Library
>    Affects Versions: 0.14.1
>            Reporter: Juraci Paixão Kröhling
>            Assignee: Yuxuan Wang
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> While testing Jaeger with the fix provided as part of THRIFT-5322, users in our community reported that they are still seeing huge allocations when malformed packets are received by our backend (jaeger-agent). See the [discussion starting from this comment by vchirikov on Mar 5|https://github.com/jaegertracing/jaeger/issues/2638#issuecomment-791242270]. 
> Based on the comment from [~fishywang] in the issue linked above, I understand that the issue should be addressed at both the compiler and the Go library:
> bq. The sanity check on container header should be done in thrift go library (github.com/apache/thrift/lib/go/thrift)
> bq. 
> bq. If you want to avoid allocation of the containers upfront after it passed the header sanity check, then that needs to be don in thrift compiler (in generated go code)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)