[Users] How can i make my OpenSER server with presence module work properly with the db_text database?

Daniel-Constantin Mierla daniel at voice-system.ro
Mon Feb 5 17:37:10 CET 2007


Hello Cesc,

yes, you are right, but there was another question related to your say 
"message with a strange event package = presence.winfo..." :-) so these 
emails were to clarify if there is such case or not. Wanted to see if 
openser rejects presence.winfo.

Regarding the part with strlen, you might be right -- but those fields 
should not be null. Checks must be done to avoid crashing, but we should 
spot why they became null as well.

Cheers,
Daniel


On 02/05/07 18:31, Cesc wrote:
> Hi Daniel,
>
> Tks for the time.
> I don't actually think the net trace will help so much ...
> It is a problem of crashing while a periodic clean of the
> active_watchers table is done ... so basically there is some value
> returned from the query to the database that openser does not like ...
> I ask my colleague to attach a copy of the database file ... and also
> to try to do some investigation for himself, placing some printfs here
> and there ...  but you'll probably spot the problem first :)
>
> Cesc
>
> On 2/5/07, Daniel-Constantin Mierla <daniel at voice-system.ro> wrote:
>> Hello,
>>
>> ngrep or pcap traces are more useful because I can see full content of
>> SIP messages instead of summary.
>>
>> As I could get it from what you send, the 489 Event Package Not
>> Supported reply is sent by X-Lite -- so you do not handle that SUBSCRIBE
>> with presence module from openser. Do a "ngrep -d any -qt port 5060" on
>> openser server and see if the SUBSCRIBE is sent to x-lite and from there
>> comes then the reply.
>>
>> Cheers,
>> Daniel
>>
>>
>> On 02/05/07 15:35, Kc Ayuba wrote:
>> > Hi,
>> >
>> > Here is the SIP messages that i captured when OpenSER crashed.
>> > After package number 312 (PUBLISH) OpenSER crashed.
>> >
>> > No. Time Source Destination Protocol Info
>> > 303 395.082565 192.168.3.172 192.168.3.170 SIP
>> > Request:REGISTER sip:192.168.3.170 sip:192.168.3.170
>> > CSeq: 1 REGISTER
>> > Expires: 60
>> > User-Agent: X-Lite
>> > Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE,
>> > SUBSCRIBE, INFO
>> >
>> > No. Time Source Destination Protocol Info
>> > 304 395.086627 192.168.3.170 192.168.3.172 SIP
>> > Status: 200 OK (1 bindings)
>> > CSeq: 1 REGISTER
>> > Server: OpenSer (1.2.0-dev14-notls (i386/linux))
>> >
>> > No. Time Source Destination Protocol Info
>> > 305 395.393790 192.168.3.172 192.168.3.170 SIP
>> > Request:SUBSCRIBE sip:Klaas at 192.168.3.170
>> > CSeq: 1 SUBSCRIBE
>> > Expires: 3600
>> > Accept: application/watcherinfo+xml
>> > Event: presence.winfo
>> > User-Agent: X-Lite
>> >
>> > No. Time Source Destination Protocol Info
>> > 306 395.393944 192.168.3.172 192.168.3.170 SIP
>> > Request:SUBSCRIBE sip:Chelsea at 192.168.3.170
>> > CSeq: 1 SUBSCRIBE
>> > Expires: 3600
>> > Accept: multipart/related, application/rlmi+xml, application/pidf+xml
>> > Event: presence
>> > User-Agent: X-Lite
>> >
>> > No. Time Source Destination Protocol Info
>> > 307 395.394042 192.168.3.172 192.168.3.170 SIP/XML
>> > Request:PUBLISH sip:Klaas at 192.168.3.170
>> > CSeq: 1 PUBLISH
>> > Expires: 3600
>> > Content-Type: application/pidf+xml
>> > User-Agent: X-Lite
>> > Event: presence
>> >
>> > No. Time Source Destination Protocol Info
>> > 308 395.397656 192.168.3.170 192.168.3.172 SIP
>> > Status: 404 Not Found
>> > CSeq: 1 SUBSCRIBE
>> > Server: OpenSer (1.2.0-dev14-notls (i386/linux))
>> >
>> > No. Time Source Destination Protocol Info
>> > 309 395.536895 192.168.3.170 192.168.3.172 SIP
>> > Request:SUBSCRIBE
>> > sip:Klaas at 192.168.3.172:14188;rinstance=38756ac05409b128
>> > CSeq: 1 SUBSCRIBE
>> > Expires: 3600
>> > User-Agent: X-Lite
>> > Accept: application/watcherinfo+xml
>> > Event: presence.winfo
>> > P-hint: usrloc applied
>> >
>> > No. Time Source Destination Protocol Info
>> > 310 395.638825 192.168.3.172 192.168.3.170 SIP
>> > Status: 489 Event Package Not Supported
>> > CSeq: 1 SUBSCRIBE
>> > User-Agent: X-Lite
>> >
>> > No. Time Source Destination Protocol Info
>> > 311 395.641067 192.168.3.170 192.168.3.172 SIP
>> > Status: 489 Event Package Not Supported
>> > CSeq: 1 SUBSCRIBE
>> > User-Agent: X-Lite
>> >
>> > No. Time Source Destination Protocol Info
>> > 312 395.946974 192.168.3.172 192.168.3.170 SIP/XML
>> > Request:PUBLISH sip:Klaas at 192.168.3.170
>> > CSeq: 1 PUBLISH
>> > Expires: 3600
>> > Content-Type: application/pidf+xml
>> > User-Agent: X-Lite
>> > Event: presence
>> >
>> > No. Time Source Destination Protocol Info
>> > 313 395.949651 192.168.3.170 192.168.3.172 ICMP
>> > Destination unreachable (Port unreachable)
>> > Internet Control Message Protocol
>> >
>> >
>> > Kinds regards,
>> >
>> > Kc
>> >
>> > On 2/5/07, Daniel-Constantin Mierla <daniel at voice-system.ro> wrote:
>> >> Hello,
>> >>
>> >> presence.winfo should be supported. Cesc could you send some netork
>> >> trace to watch a bit?
>> >>
>> >> The issue with strlen might be there. I will have a look in these 
>> days.
>> >>
>> >> Cheers,
>> >> Daniel
>> >>
>> >>
>> >> On 02/04/07 13:16, Nicolas Palix wrote:
>> >> > Hi,
>> >> >
>> >> > "strange event package" .winfo is RFC3857
>> >> >
>> >> > A Watcher Information Event Template-Package for
>> >> >                  the Session Initiation Protocol (SIP)
>> >> >
>> >> > http://www.ietf.org/rfc/rfc3857.txt
>> >> >
>> >> >
>> >> > Le vendredi 02 février 2007 16:54, Cesc a écrit :
>> >> >
>> >> >> Hi,
>> >> >>
>> >> >> Just add something my colleague forgot to mention and i think it
>> >> may help.
>> >> >> This error happened after the phone sends a subscribe (or was it a
>> >> >> publish?) message with a strange event package = presence.winfo 
>> (or
>> >> >> something like this).
>> >> >> The reaction of presence module (out of my head, so could be
>> >> wrong) is
>> >> >> to answer with a 484 Event package not known ...
>> >> >> Then, after a while, a timer gets called which tries to clean the
>> >> >> active watchers table ... and then ... pum! :) the seg fault here
>> >> >> attached ...
>> >> >>
>> >> >> As you can see in the bt, the problem seems to be in strlen 
>> call ...
>> >> >> probably the row_vals returned is null (?) ... and strlen I 
>> think is
>> >> >> not very robust against this sort of perversions :)
>> >> >>
>> >> >>
>> >> >>> 610 subs.event_id.len =
>> >> strlen(row_vals[event_id_col].val.str_val.s);
>> >> >>>
>> >> >> Cesc
>> >> >> PS - The work around seems to be to start openser with a clean
>> >> >> (=empty) active_watchers dbtext file ...
>> >> >>
>> >> >> On 2/2/07, Kc Ayuba <kc.ayuba at gmail.com> wrote:
>> >> >>
>> >> >>> Hi,
>> >> >>> I'm trying to use db_text database with the presence module of
>> >> >>> OpenSER(1.2.x).
>> >> >>> User agent is X-Lite(3.0). When I try to send a REGISTER 
>> message to
>> >> >>> OpenSER, OpenSER still works.
>> >> >>> But if i sent a SUBSCRIBE or a PUBLISH message, then openser
>> >> crashes.
>> >> >>> If i use the MySQL database, then everything works just fine. 
>> But i
>> >> >>> prefer to use the db_text database.
>> >> >>> Here is the core file that was generated when OpenSER crashed.
>> >> >>>
>> >> >>> Core generated:
>> >> >>>
>> >> >>> Program terminated with signal 11, Segmentation fault.
>> >> >>> #0 0xa7ced659 in msg_active_watchers_clean (ticks=100, 
>> param=0x0) at
>> >> >>> subscribe.c:610
>> >> >>> 610 subs.event_id.len =
>> >> >>> strlen(row_vals[event_id_col].val.str_val.s);
>> >> >>> (gdb) bt
>> >> >>> #0 0xa7ced659 in msg_active_watchers_clean (ticks=100, 
>> param=0x0) at
>> >> >>> subscribe.c:610
>> >> >>> #1 0x080a3f6c in timer_ticker () at timer.c:141
>> >> >>> #2 0x0806b51f in main_loop () at main.c:724
>> >> >>> #3 0x0806d43b in main (argc=3, argv=0xaff0a2e4) at main.c:1438
>> >> >>> (gdb) frame 0
>> >> >>> #0 0xa7ced659 in msg_active_watchers_clean (ticks=100, 
>> param=0x0) at
>> >> >>> subscribe.c:610
>> >> >>> 610 subs.event_id.len =
>> >> >>> strlen(row_vals[event_id_col].val.str_val.s);
>> >> >>> (gdb) list
>> >> >>> 605
>> >> >>> 606 subs.from_domain.s =
>> >> >>> row_vals[from_domain_col].val.str_val.s;
>> >> >>> 607 subs.from_domain.len =
>> >> >>> strlen(row_vals[from_domain_col].val.str_val.s);
>> >> >>> 608
>> >> >>> 609 subs.event_id.s = row_vals[event_id_col].val.str_val.s;
>> >> >>> 610 subs.event_id.len =
>> >> >>> strlen(row_vals[event_id_col].val.str_val.s);
>> >> >>> 611
>> >> >>> 612 subs.to_tag.s = row_vals[to_tag_col].val.str_val.s;
>> >> >>> 613 subs.to_tag.len =
>> >> >>> strlen(row_vals[to_tag_col].val.str_val.s);
>> >> >>> 614
>> >> >>> (gdb)
>> >> >>> 615 subs.from_tag.s = row_vals[from_tag_col].val.str_val.s;
>> >> >>> 616 subs.from_tag.len =
>> >> >>> strlen(row_vals[from_tag_col].val.str_val.s);
>> >> >>> 617
>> >> >>> 618 subs.callid.s = row_vals[callid_col].val.str_val.s;
>> >> >>> 619 subs.callid.len =
>> >> >>> strlen(row_vals[callid_col].val.str_val.s);
>> >> >>> 620
>> >> >>> 621 subs.contact.s = row_vals[contact_col].val.str_val.s;
>> >> >>> 622 subs.contact.len =
>> >> >>> strlen(row_vals[contact_col].val.str_val.s);
>> >> >>> 623
>> >> >>> 624 subs.cseq = row_vals[cseq_col].val.int_val;
>> >> >>>
>> >> >>>
>> >> >>> I really hope that someone can help me with this problem. 
>> Thanks in
>> >> >>> advance.
>> >> >>>
>> >> >>> Kind regards,
>> >> >>>
>> >> >>> Kc
>> >> >>> _______________________________________________
>> >> >>> Users mailing list
>> >> >>> Users at openser.org
>> >> >>> http://openser.org/cgi-bin/mailman/listinfo/users
>> >> >>>
>> >> >> _______________________________________________
>> >> >> Users mailing list
>> >> >> Users at openser.org
>> >> >> http://openser.org/cgi-bin/mailman/listinfo/users
>> >> >>
>> >> >
>> >> >
>> >>
>> >> _______________________________________________
>> >> Users mailing list
>> >> Users at openser.org
>> >> http://openser.org/cgi-bin/mailman/listinfo/users
>> >>
>> >
>> > _______________________________________________
>> > Users mailing list
>> > Users at openser.org
>> > http://openser.org/cgi-bin/mailman/listinfo/users
>> >
>>
>> _______________________________________________
>> Users mailing list
>> Users at openser.org
>> http://openser.org/cgi-bin/mailman/listinfo/users
>>
>




More information about the Users mailing list