Thanks Alex,
I will take more look at the code later on to make sure I understand the
process and find the specific debugs sections relevant to this specific
problem.
What I was thinking is that if there is a specific debug section that
checks the current cache file in the disk or gets the pointer etc,
I will start there to see what is causing squid to decide that the file
reading failed or any other thing in the file can cause it.
the next goal after I will find this bug cause will be to find what in
my code cause segmentation and crashes squid while doing some debugs
over details level 1.
Thanks,
Eliezer
On 11/13/2012 8:01 PM, Alex Rousskov wrote:
> You asked for an example, and I found one. That particular example is a
> good illustration of why a swap-in may fail, but it probably has little
> or nothing to do with your specific problem.
>
>
>>> >> From what was explained before the store index stores keys and not url,
>>> >>am I right?
> What is stored in a store index is kind of store-dependent so, ideally,
> you should not care.
>
>
>>> >>just throwing into the air, what are the steps when trying to find a
>>> >>file in cache and serve it?
>>> >>1. predict the hash of the request.(if store_url present to use it)
> Yes, "calculate the store key" based on request information may be a
> more accurate description. This happens as a part of
> Store::get()-related API discussed in item #2 below.
>
>
>>> >>2. lookup for the hash(get and head..) in the index?(memory? ufs? are
>>> >>the same?)
> Yes, see Store::get(), storeGetPublicByRequest(), and other related
> storeGet*() and StoreEntry::get*() functions and methods. The Store
> controller searches for the entry in various places, including memory
> cache and disk caches.
>
>
>>> >>3. read the file mentioned in the index from disk? by what?
>>> >>(I have seen some code but not sure if it's the point I should look at)
> Yes, the cached entry is swapped in from disk or from memory. The
> specific code depends on the store (memory, ufs, Rock, etc.). For
> disk-related stores, it all starts in storeSwapInStart() IIRC.
>
>
> HTH,
>
> Alex.
>
-- Eliezer Croitoru https://www1.ngtech.co.il IT consulting for Nonprofit organizations eliezer <at> ngtech.co.ilReceived on Tue Nov 13 2012 - 18:11:38 MST
This archive was generated by hypermail 2.2.0 : Wed Nov 14 2012 - 12:00:07 MST