trafficserver-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From deepak srinivasan <sdeepa...@gmail.com>
Subject Issue with VConn close
Date Tue, 12 Mar 2013 12:36:57 GMT
Hi All,

I am trying to implement cache write using plugin cache.

After the null transfrom has made a cont call for event
TS_EVENT_VCONN_WRITE_COMPLETE, I try to
do cache write.
In order to handle these cases I create a queue of cache data. I check if
the
queue has data in a infinite running thread(threadcacheWrite), created
using TSThreadCreate. If It has, I create a cont for cache write
and perform cache write(TSCacheWrite).
After the cache write is complete I close the VConn.
However the the closed vconn instead of calling the same
function(cacheHandler), it calls null_transform function.
This function is again called when the null_transform vconn is also closed.
Also the data passed to null_transform function is same in both the cases.

Can anybody suggest me why the cache vconn is going to null transform
handler.
I checked this by using function (TSVConnClosedGet) and printing cont data.
The cont data printed is same in both the cases.
Due to this I am unable to free the Cont and it is resulting in memory
leaks.

I have also attached sample code in two files for the reference.

Am I missing something

Regards

Mime
View raw message