Hi,

For the bad data...  I am not sure how I got it into that state.  It happened to me today with the old presence code when I was changing my kamailio.cfg and things weren't being cleared out of the DB.  I do not think this a bug in the new presence module.  I think it is in the current code as well.  I have two theories:
  1. There is a problem with the code in or around the loop in get_subs_db() so if you end up with more than one matching record you get a crash.
  2. The db result in get_subs_db() is too big and maybe db_fetch_query() should be used.

The two error message that were coming out (before and separate to the crash) are showing an error in either the new presence module or RLS, and I think it is possible for records to get left in active_watchers between client sessions when those errors occur.  If that is what is happening then the crash in the new code could be happening for the same reason it happens in the old code.  That is, there is a problem when there are multiple results from the query in get_subs_db().

Peter


On Thu, 2012-03-01 at 16:55 +0200, Anca Vamanu wrote:
Hi Peter,


So the cause was bad data in the db? Was that data corrupted by an external application, or did presence module insert bad data?
I would really like to investigate this problem thoroughly to be sure there isn't a bug in the new code.

Regards,
Anca


On 03/01/2012 04:45 PM, Peter Dunkley wrote:
Hi,

I've been doing more investigation myself.  It seems that even with old presence module I can get it to crash here if the records in the DB are "broken" enough.  So I think it was just a co-incidence that I first spotted the crash with the new code.  I suspect that with the two errors coming out of the new presence code (and the state things are in when they come out) it is just easier to get the DB records broken in the right way.

The error messages are actually the bigger issue as they are stopping presence and RLS working together.

Thanks,

Peter

-- 
Peter Dunkley
Technical Director
Crocodile RCS Ltd

_______________________________________________
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

-- 
Peter Dunkley
Technical Director
Crocodile RCS Ltd