Hmm i am a bit busy now. Gimme some time. I will go thru some of the plugins and we shall discuss this tomorrow afternoon.
Cheers, Deepu. On Wed, Apr 28, 2010 at 3:19 PM, shirish <[email protected]> wrote: > Also, please point me If there is any implementation indicating the usage > of INKCacheRead and INKCacheWrite along with INKVConnRead/Write. I have had > a look at Null Transform plugin. But the use of Cache Read and Cache write > is not clear. What and how do I handle after Cache Read/ Write returns a > CacheVC in the void *data ? > > cheers, > shirish > > > On Wed, Apr 28, 2010 at 3:06 PM, shirish <[email protected]> wrote: > >> Hello, >> >> I am writing some plugin. The handler has the events >> INK_EVENT_CACHE_LOOK_UP >> INK_EVENT_CACHE_READ >> >> the cache read event calls a function >> cache_read(INKCont contp, INKEvent event, void *edata); >> >> in which I try to use the INKCacheRead function in the following way >> >> INKHttpTxn txnp = (INKHttpTxn) edata; >> void *key=0; >> int keysize=0; >> >> INKCacheKeyGet(txnp, &key, &keysize); >> >> INKCacheRead(contp, key); >> >> The INKCacheRead yields seg fault. The stack trace of the same follows >> >> >> NOTE: Traffic Server received Sig 11: Segmentation fault >> traffic_server - STACK TRACE: >> [0x6a5400] >> traffic_server(INKCacheRead+0x160)[0x80f44f0] >> >> traffic_server(_ZN14CacheProcessor9open_readEP12ContinuationP3URLP7HTTPHdrP21CacheLookupHttpConfigl13CacheFragType+0x156)[0x829b6a6] >> >> traffic_server(_ZN14CacheProcessor9open_readEP12ContinuationP3URLP7HTTPHdrP21CacheLookupHttpConfigl13CacheFragType+0x156)[0x829b6a6] >> >> traffic_server(_ZN11HttpCacheSM9open_readEP3URLP7HTTPHdrP21CacheLookupHttpConfigl+0x6a)[0x8158b4a] >> traffic_server(_ZN6HttpSM24do_cache_lookup_and_readEv+0xe9)[0x816bba9] >> traffic_server(_ZN6HttpSM14set_next_stateEv+0x430)[0x8180400] >> >> traffic_server(_ZN6HttpSM32call_transact_and_set_next_stateEPFvPN12HttpTransact5StateEE+0xab)[0x81691cb] >> traffic_server(_ZN6HttpSM17handle_api_returnEv+0x2ba)[0x817e91a] >> traffic_server(_ZN6HttpSM14set_next_stateEv+0x467)[0x8180437] >> >> traffic_server(_ZN6HttpSM32call_transact_and_set_next_stateEPFvPN12HttpTransact5StateEE+0xab)[0x81691cb] >> traffic_server(_ZN6HttpSM14set_next_stateEv+0x158)[0x8180128] >> >> traffic_server(_ZN6HttpSM32call_transact_and_set_next_stateEPFvPN12HttpTransact5StateEE+0xab)[0x81691cb] >> traffic_server(_ZN6HttpSM17handle_api_returnEv+0x2ba)[0x817e91a] >> traffic_server(_ZN6HttpSM14set_next_stateEv+0x467)[0x8180437] >> >> traffic_server(_ZN6HttpSM32call_transact_and_set_next_stateEPFvPN12HttpTransact5StateEE+0xab)[0x81691cb] >> >> traffic_server(_ZN6HttpSM32state_read_client_request_headerEiPv+0x69d)[0x8172c3d] >> traffic_server(_ZN6HttpSM12main_handlerEiPv+0x11c)[0x81797bc] >> traffic_server[0x82f11dd] >> traffic_server(_ZN10NetHandler12mainNetEventEiP5Event+0x15c)[0x82e7bcc] >> traffic_server(_ZN7EThread13process_eventEP5Eventi+0xa2)[0x83129c2] >> traffic_server(_ZN7EThread7executeEv+0x473)[0x83132e3] >> traffic_server[0x8310c0c] >> /lib/tls/i686/cmov/libpthread.so.0(+0x596e)[0xb1f96e] >> /lib/tls/i686/cmov/libc.so.6(clone+0x5e)[0x5b49de] >> /lib/tls/i686/cmov/libc.so.6(clone+0x5e)[0x5b49de] >> Segmentation fault >> >> >> Can any point me to where is that I am going wrong. >> >> Thanking you, >> >> cheers >> shirish >> >> >> >> >> >
