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

Cesc cesc.santa at gmail.com
Fri Feb 2 16:54:57 CET 2007


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
>
>
>




More information about the sr-users mailing list