[SR-Users] Segfault when trying to send MESSAGE through websocket with jsSIP
Daniel-Constantin Mierla
miconda at gmail.com
Wed Apr 9 23:17:09 CEST 2014
The crash was not related to websocket at all, but to usage of
uac_reg_lookup() when you don't set reg_db_url parameter for uac module.
So, my question is why are you using uac_reg_lookup()? Because it is
useless if you dont set reg_db_url and you don't have records in uacreg
database table. This function is related to the feature of kamailio to
send register to another sip server with a contact address pointing back
to kamailio.
To summarize on another words, the crash happened because the
kamailio.cfg didn't have set the expected uac module parameters by
uac_reg_lookup() function.
Cheers,
Daniel
On 09/04/14 22:56, Alex Villacís Lasso wrote:
> El 09/04/14 12:36, Daniel-Constantin Mierla escribió:
>> The safety checks were pushed to master and 4.1 branches. Can you try
>> with the latest git version and report the result?
>>
>> Cheers,
>> Daniel
>>
>> On 09/04/14 18:43, Daniel-Constantin Mierla wrote:
>>> OK, that's the reason, the _reg_htable is initialized only when
>>> reg_db_url is set, otherwise there is no source of user profile to
>>> do registration for, and no point to do uac_reg_lookup().
>>>
>>> I will add safety checks for this case.
>>>
>>> Cheers,
>>> Daniel
>>>
>>> On 09/04/14 18:30, Alex Villacís Lasso wrote:
>>>> El 09/04/14 03:11, Daniel-Constantin Mierla escribió:
>>>>> Hello,
>>>>>
>>>>> can you share here the parameters for uac module?
>>>>>
>>>> Currently there are no explicit parameters. All parameters are
>>>> currently commented out:
>>>> [root at elx3 ~]# grep uac /etc/kamailio/kamailio.cfg
>>>> loadmodule "uac.so"
>>>> #modparam("uac", "reg_db_url", DBASTURL)
>>>> # uacreg table is actually a view in DBASTURL
>>>> #modparam("uac", "reg_contact_addr", "127.0.0.1")
> The safety checks work, in the sense that the process no longer
> crashes. Before the crash, the websocket connection used to get
> disconnected after a timeout, so I am checking whether this is still
> the case now. Additionally I am getting these messages on the log:
>
> Apr 9 15:42:14 elx3 /usr/sbin/kamailio[3051]: ERROR: <core>
> [resolve.c:1733]: sip_hostport2su(): ERROR: sip_hostport2su: could not
> resolve hostname: "o0f99a1p8fp7.invalid"
> Apr 9 15:42:14 elx3 /usr/sbin/kamailio[3051]: ERROR: tm [ut.h:337]:
> uri2dst2(): failed to resolve "o0f99a1p8fp7.invalid"
> Apr 9 15:42:14 elx3 /usr/sbin/kamailio[3051]: ERROR: tm
> [t_fwd.c:1773]: t_forward_nonack(): ERROR: t_forward_nonack: failure
> to add branches
> Apr 9 15:42:14 elx3 /usr/sbin/kamailio[3051]: ERROR: sl
> [sl_funcs.c:387]: sl_reply_error(): ERROR: sl_reply_error used:
> Unresolvable destination (478/SL)
> Apr 9 15:42:19 elx3 /usr/sbin/kamailio[3103]: ERROR: uac
> [uac_reg.c:363]: reg_ht_get_byuuid(): reg hash table not initialized
> Apr 9 15:42:19 elx3 /usr/sbin/kamailio[3103]: ERROR: uac
> [uac_reg.c:363]: reg_ht_get_byuuid(): reg hash table not initialized
> Apr 9 15:43:56 elx3 /usr/sbin/kamailio[3053]: ERROR: uac
> [uac_reg.c:363]: reg_ht_get_byuuid(): reg hash table not initialized
> Apr 9 15:43:56 elx3 /usr/sbin/kamailio[3053]: ERROR: uac
> [uac_reg.c:363]: reg_ht_get_byuuid(): reg hash table not initialized
> Apr 9 15:44:10 elx3 /usr/sbin/kamailio[3053]: ERROR: uac
> [uac_reg.c:363]: reg_ht_get_byuuid(): reg hash table not initialized
> Apr 9 15:44:10 elx3 /usr/sbin/kamailio[3053]: ERROR: uac
> [uac_reg.c:363]: reg_ht_get_byuuid(): reg hash table not initialized
>
> How come nobody else using kamailio for websockets stumbled into this
> crash before?
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
More information about the sr-users
mailing list