You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "James Peach (JIRA)" <ji...@apache.org> on 2014/02/27 02:03:00 UTC

[jira] [Updated] (TS-2572) Response header corruption when transforming cached objects

     [ https://issues.apache.org/jira/browse/TS-2572?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

James Peach updated TS-2572:
----------------------------

    Component/s: Clustering

> Response header corruption when transforming cached objects
> -----------------------------------------------------------
>
>                 Key: TS-2572
>                 URL: https://issues.apache.org/jira/browse/TS-2572
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Clustering
>            Reporter: Peter Walsh
>
> I have a transform that caches the untransformed response, so that way I 
> perform the transformation for each subsequent cache hit of that document.  
> Whenever the response is peer fetched from another node in the cluster, the response headers are partially overwritten by the response data.  This does not happen when the response is NOT cached, and it does NOT happen when NOT using cluster feature. 
> In my transform plugin I use TSIOBufferCreate to a create the buffer which
> gets written into by TSIOBufferWrite with the desired response body.
> When a response is peer fetched from cache, the address of the transformed
> response header's values (I'm printing address using
> TSHttpTxnTransformRespGet and other API's) starts halfway into the buffer
> allocated by TSIOBufferCreate.   So if I write about 2k into it, I
> overwrite my response transform headers.
> When the response is not from cache, or when the response is from cache
> and we're not in a cluster, this does NOT happen, ever. Could be
> coincidence, but its repeatable for response sizes varying from 5k to 10
> MB. 
> I don't know how the Transform response headers values can share the same
> memory as what I get from calling TSIOBufferCreate, but it does. My
> concern is that at a deeper level the memory is being mismanaged, and
> while I can check in my transform plugin if I'll overwrite my transform
> resp header buffer, but what about other parts of ATS that are utilizing
> buffers, or when I have multiple transforms happening at the same time?



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)