Thomas Rosenblatt a écrit :
Pekka Pessi a écrit :
On 5/2/06, Thomas Rosenblatt <[EMAIL PROTECTED]> wrote:
But I have noticed a new bug, very strange: The records stored in cache
are sometimes not find with the sres_cached_answers.
I really do not understand, I printed all records on screen, when they
are stored they keep the right sr_name. When I need to get a record from
cache, sometimes the sr_name is totally crazy!
(Not all records are bad stored only some of them, and always the
same...) . Therefore the record in cache is not found, whether it is in
cache!

What kind of records are bad? Do they have status of 0?

--
Pekka.Pessi mail at nokia.com

I found where the problem came from:
With my multi thread version, I create a new resolver for each request. When the request is done, I destroy the resolver, with the sres_resolver_destroy. I think that it removes the cache associated with the resolver (with the destructor() function), that is why the cache memory is freed.

I need to change the sres_resolver_destructor() function (remove the line sres_cache_unref(res->res_cache));

Thank you,

T.Rosenblatt.


Well I have followed my investigation, and I have found exactly where is the problem. I don't know why, but there it is.

Here is the stack when I'm destroying a resolver:
#0  _su_home_deinit (home=0x8094eb0) at su_alloc.c:868
#1  0x080541a6 in _su_home_deinit (home=0x8094cb8) at su_alloc.c:860
#2  0x08054853 in su_home_unref (home=0x8094cb8) at su_alloc.c:589
#3  0x0805b64c in sres_resolver_unref (res=0x8094cb8) at sres.c:410
#4  0x08061d79 in sres_resolver_destroy (res=0x8094cb8) at sresolv.c:205

When I remove this line /"free(b->sub_nodes[i].sua_data);"/
in _su_home_deinit, I have no more cache problems.
It's weird, because, this function is sensed to work on a home object that is totally different from the home object of the cache!!!


Have you got any idea ?

Thank you,

Thomas.





-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
_______________________________________________
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel

Reply via email to