[Devel] Re: crash on boot with a "full" active_watchers table ...

Anca-Maria Vamanu anca at voice-system.ro
Fri Apr 13 16:07:03 CEST 2007


No, you need not forward the un Register to presence.
Xlite sends a  Subscribe with expires 0 when  closing. So there might be 
2 possiblities.
1.  Presence does not succeed to erase the record.
2.  Another record for a subscription existed in database.(possible 
since you said there were prevoius records in database).

I don;t see this problem with mysql. To decide wich case it is about 
please tell me if you see in openser log when shuting down one xlite 
client  the message : "PRESENCE:update_subscription: expires =0 -> 
deleting from database\n" and if an ERROR message follows after this 
message.

Cesc wrote:

> I still have the "problem" that openser keeps sending the NOTIFY (via
> my ser proxy) to the not-running xlite, until the ser proxy sends back
> a 408 Timeout ...
> I would think that the xlite sends, on quit, an un-SUBscribe ...
> Or could it be that I need to forward the un-REGISTER also to the
> openser so that it knows that the xlite is no longer available??
>
> Cesc
>
> On 4/13/07, Cesc <cesc.santa at gmail.com> wrote:
>
>> Hi Anca,
>>
>> This fixes the crash ...
>> Index: modules/presence/notify.c
>> ===================================================================
>> --- modules/presence/notify.c   (revision 1999)
>> +++ modules/presence/notify.c   (working copy)
>> @@ -764,9 +764,11 @@
>>                 from_domain.s= row_vals[from_domain_col].val.str_val.s;
>>                 from_domain.len= strlen(from_domain.s);
>>                 event_id.s=row_vals[event_id_col].val.str_val.s;
>> -               event_id.len= strlen(event_id.s);
>> -               if(event_id.s== NULL)
>> +               if(event_id.s== NULL) {
>>                         event_id.len = 0;
>> +               } else {
>> +                       event_id.len= strlen(event_id.s);
>> +               }
>>                 to_tag.s= row_vals[to_tag_col].val.str_val.s;
>>                 to_tag.len= strlen(to_tag.s);
>>                 from_tag.s= row_vals[from_tag_col].val.str_val.s;
>>
>>
>>
>> On 4/13/07, Cesc <cesc.santa at gmail.com> wrote:
>> > Hi,
>> >
>> > Moving forward ... one more crash. This time after a publish ....
>> > which generates a NOTIFY (to a second xlite, which is actually not
>> > running). The watchrs and active_watchers tables contain data from a
>> > previous run of openser ...
>> > crash on xlite boot ... active_watchers and watchers table were NOT 
>> empty
>> >
>> > #0  get_subs_dialog (p_user=0x816a7dc, p_domain=0x816a7e4,
>> > event=0xb7d4f9fb "presence", n=0x0) at notify.c:767
>> > #1  0xb7d40b8b in query_db_notify (p_user=0x816a7dc,
>> > p_domain=0x816a7e4, event=0xb7d4f9fb "presence", watcher_subs=0x0,
>> > etag=0x0) at notify.c:934
>> > #2  0xb7d45c3d in update_presentity (presentity=0x816a7d8,
>> > body=0xbfd367b0, new_t=1) at presentity.c:240
>> > #3  0xb7d48053 in handle_publish (msg=0x8170190, str1=0x0, str2=0x0)
>> > at publish.c:443
>> > #4  0x08051354 in do_action (a=0x816eff8, msg=0x8170190) at 
>> action.c:883
>> > #5  0x080505aa in run_action_list (a=0x816eb38, msg=0x8170190) at 
>> action.c:131
>> > #6  0x080529ea in do_action (a=0x816fad0, msg=0x8170190) at 
>> action.c:801
>> > #7  0x080505aa in run_action_list (a=0x816c408, msg=0x8170190) at 
>> action.c:131
>> > #8  0x08053855 in run_top_route (a=0x816c408, msg=0x0) at action.c:111
>> > #9  0x08080b20 in receive_msg (
>> >     buf=0x8135d20 "PUBLISH sip:Klaas at cafes.org
>> > SIP/2.0\r\nRecord-Route:
>> > <sip:192.168.1.150;ftag=6c33763f;lr=on>\r\nVia: SIP/2.0/UDP
>> > 192.168.1.150;branch=z9hG4bK05e2.ef8cea5.0\r\nVia: SIP/2.0/UDP
>> > 192.168.3.172:13974;branch=z9h"..., len=1143, rcv_info=0xbfd36c58) at
>> > receive.c:156
>> > #10 0x080aecfa in udp_rcv_loop () at udp_server.c:465
>> > #11 0x0806ee7e in main_loop () at main.c:834
>> > #12 0x080704cb in main (argc=3, argv=0xbfd36e04) at main.c:1399
>> >
>> >
>> >
>> >
>> >  3(8168) DBUG:parse_to: display={"X-lite user 1"}, 
>> ruri={sip:Klaas at cafes.org}
>> >  3(8168) New Message received: [1] from [sip:Klaas at cafes.org]
>> >  3(8168) Request method used:[PUBLISH].
>> >  3(8168) 
>> ============================================================================================= 
>>
>> >  3(8168) DEBUG: t_newtran:  T on entrance=0xffffffff
>> >  3(8168) parse_headers: flags=ffffffffffffffff
>> >  3(8168) get_hdr_field: cseq <CSeq>: <1> <PUBLISH>
>> >  3(8168) DEBUG: get_hdr_body : content_length=439
>> >  3(8168) found end of header
>> >  3(8168) parse_headers: flags=78
>> >  3(8168) t_lookup_request: start searching: hash=11856, isACK=0
>> >  3(8168) DEBUG: RFC3261 transaction matching failed
>> >  3(8168) DEBUG: t_lookup_request: no transaction found
>> >  3(8168) 
>> ============================================================================================= 
>>
>> >  3(8168) The request method used is to [PUBLISH] information. 
>> (handle publish)
>> >  3(8168) 
>> ============================================================================================= 
>>
>> >  3(8168) parse_headers: flags=ffffffffffffffff
>> >  3(8168) PRESENCE:handle_publish: SIP-If-Match not found
>> >  3(8168) PRESENCE: generate_ETag: etag= a.1175417156.8168.1 / 19
>> >   3(8168) PRESENCE:handle_publish: new etag  = a.1175417156.8168.1
>> >  3(8168) PRESENCE: handle_publish: 'expires' found
>> >  3(8168) PRESENCE: handle_publish: lexpire= 3600
>> >  3(8168) PRESENCE: handle_publish: 'To' header ALREADY PARSED:
>> > <sip:Klaas at cafes.org>
>> >  3(8168) parse_headers: flags=ffffffffffffffff
>> >  3(8168) PRESENCE:update_presentity: inserting 7 cols intotable
>> >  3(8168) DBT:dbt_load_file: request for table [presentity]
>> >  3(8168) DBT:dbt_load_file: db is 
>> [/cafes/openser.1.2/cafesConf/dbtext]
>> >  3(8168) DBT:dbt_load_file: loading file
>> > [/cafes/openser.1.2/cafesConf/dbtext/presentity]
>> >  3(8168) DBT: column[0] is INT!
>> >  3(8168) DBT: column[1] is STR!
>> >  3(8168) DBT: column[2] is STR!
>> >  3(8168) DBT: column[3] is STR!
>> >  3(8168) DBT: column[4] is STR!
>> >  3(8168) DBT: column[5] is INT!
>> >  3(8168) DBT: column[6] is INT!
>> >  3(8168) DBT: column[7] is STR!
>> >  3(8168) DTB:dbt_db_get_table: presentity
>> >  3(8168) DBT:db_insert: done!
>> >  3(8168) PRESENCE:get_subs_dialog:querying database table = 
>> active_watchers
>> >  3(8168) DBT:dbt_query: new res with 11 cols
>> >  3(8168) DBT:dbt_result_new: new res with 11 cols
>> >  3(8168) PRESENCE: get_subs_dialog:n= 1
>> >
>> >
>> > id(int,auto) to_user(str) to_domain(str) from_user(str)
>> > from_domain(str) event(str) event_id(str,null) to_tag(str)
>> > from_tag(str) callid(str) cseq(int) contact(str)
>> > record_route(str,null) expires(int) status(str) version(int)
>> > 
>> 8:Chelsea:cafes.org:Klaas:cafes.org:presence::10.8167.1175417177.1:aa097371:ZDczYzI5YzM4NDMzYWYxMWJjNDFiNDJiNGJhZmVlY2U.:1:sip\:Klaas at 192.168.3.172\:13974:<sip\:192.168.1.150;ftag=aa097371;lr=on>:1175420777:active:0 
>>
>> > 
>> 7:Klaas:cafes.org:Klaas:cafes.org:presence.winfo::10.8165.1175417176.1:652b6878:YjBiYTdmMTk2YjIwN2EwMTczYzA5ZjM4MzY3YmZkNGY.:2:sip\:Klaas at 192.168.3.172\:13974:<sip\:192.168.1.150;ftag=652b6878;lr=on>:1175420776:active:1 
>>
>> > 
>> 6:klaas:cafes.org:Chelsea:cafes.org:presence::10.7893.1175416634.4:515e071f:YWQ5NzU4ZjM2NTI2NTQzYTAyN2Q2YWVjNzcwNDkyYWI.:3:sip\:Chelsea at 192.168.1.178\:13118:<sip\:192.168.1.150;ftag=515e071f;lr=on>:1175420234:active:0 
>>
>> > 
>> 5:Chelsea:cafes.org:Chelsea:cafes.org:presence.winfo::10.7892.1175416634.4:44260456:YWRjOTViMDgxMDRmZDY4ZmM0NGZhZjNmZWJhNzIwYWQ.:2:sip\:Chelsea at 192.168.1.178\:13118:<sip\:192.168.1.150;ftag=44260456;lr=on>:1175420234:active:1 
>>
>> > 
>> 4:Chelsea:cafes.org:Klaas:cafes.org:presence::10.7892.1175416614.3:c83fe118:YWM0M2QxZjZlYjRlNWIyNzQyM2YyYzFkYTc5MWExODk.:5:sip\:Klaas at 192.168.3.172\:24790:<sip\:192.168.1.150;ftag=c83fe118;lr=on>:1175420214:active:0 
>>
>> > 
>> 3:Klaas:cafes.org:Klaas:cafes.org:presence.winfo::10.7893.1175416614.3:913a7d2e:ZGQyMGQxMTUzMDM3NGVkZjAxY2JkOWM4Zjk0ZTA1ZGM.:3:sip\:Klaas at 192.168.3.172\:24790:<sip\:192.168.1.150;ftag=913a7d2e;lr=on>:1175420214:active:2 
>>
>> >
>>
>
> _______________________________________________
> Devel mailing list
> Devel at openser.org
> http://openser.org/cgi-bin/mailman/listinfo/devel
>




More information about the Devel mailing list