[SR-Users] Segmentation fault when loading dialplan

Javier Gallart jgallartm at gmail.com
Thu Nov 25 16:54:50 CET 2010


Hi Daniel

I completely reinstalled the OS and installed the latest kamailio git, but
the problem persists, although no core is generated now. Apparently it does
not depend on the db engine, same thing happens for mysql and postgres. You
can see the full log here: http://pastebin.ca/2002031
The architechture details are:
Ubuntu 10.04.1 LTS \n \l
Linux kam-test 2.6.32-24-server #39-Ubuntu SMP Wed Jul 28 06:21:40 UTC 2010
x86_64 GNU/Linux

Regards

Javi


On Wed, Nov 24, 2010 at 11:18 PM, Daniel-Constantin Mierla <
miconda at gmail.com> wrote:

>  Hello,
>
>
> On 11/23/10 12:36 PM, Javier Gallart wrote:
>
> Hi,
>
>  same result after adding a second row in the table.
>
> I just did a configuration file with dialplan and a record like you showed
> and it started ok. My log messages are pasted next:
>
>  0(10267) DEBUG: db_mysql [km_res.c:136]: use DB1_STRING result type
>  0(10267) DEBUG: db_mysql [km_dbase.c:354]: converting row 0 of 1 count 1
>  0(10267) DEBUG: <core> [db_row.c:119]: allocate 160 bytes for row values
> at 0x82f53f4
>  0(10267) DEBUG: <core> [db_val.c:73]: converting INT [1]
>  0(10267) DEBUG: <core> [db_val.c:73]: converting INT [1]
>  0(10267) DEBUG: <core> [db_val.c:73]: converting INT [1]
>  0(10267) DEBUG: <core> [db_val.c:117]: converting STRING [^00]
>  0(10267) DEBUG: <core> [db_val.c:73]: converting INT [0]
>  0(10267) DEBUG: <core> [db_val.c:117]: converting STRING [^00]
>  0(10267) DEBUG: <core> [db_val.c:117]: converting STRING [011]
>  0(10267) DEBUG: <core> [db_val.c:117]: converting STRING [dp1]
>  0(10267) DEBUG: dialplan [dp_db.c:387]: build_rule
>  0(10267) DEBUG: dialplan [dp_db.c:447]: attrs are dp1
>  0(10267) DEBUG: dialplan [dp_db.c:493]: new dpl_id 1
>  0(10267) DEBUG: dialplan [dp_db.c:506]: new index , len 0
>  0(10267) DEBUG: dialplan [dp_db.c:542]: added the rule id 1 index 0 pr 1
> next (nil) to the index with 0 len
>  0(10267) DEBUG: <core> [db_res.c:54]: freeing 1 rows
>
> Is it a fresh installation or an update over an older installation? If is
> the second, can you doublecheck to see if all modules were compiled and
> installed at the same time and are no longer older versions?
>
> Also, what is your operating system and architecture type?
>
> I tried with both master/devel and 3.1 branches.
>
> Thanks,
> Daniel
>
>
>
>  Regards
>
>  Javier
>
> On Tue, Nov 23, 2010 at 11:17 AM, Daniel-Constantin Mierla <
> miconda at gmail.com> wrote:
>
>>  Thanks, I will look over it and try to reproduce in the lab, it may take
>> a bit since I am pretty much time offline these days.
>>
>> Can you add a second rule and see what happens? At the first sight of the
>> debug messages, the result from database is ok, should not be a null value
>> there.
>>
>> Cheers,
>>  Daniel
>>
>>
>> On 11/23/10 10:38 AM, Javier Gallart wrote:
>>
>> Thanks Daniel
>>
>>  you can find both the gdb and ./kamailio output at
>> http://pastebin.ca/1999786
>>
>>  Regards
>>
>>  Javier
>>
>> On Mon, Nov 22, 2010 at 10:19 PM, Daniel-Constantin Mierla <
>> miconda at gmail.com> wrote:
>>
>>>  Hello,
>>>
>>>
>>> On 11/22/10 5:32 PM, Javier Gallart wrote:
>>>
>>> Hello
>>>
>>>  I'd like to do some tests with the dialplan module, but Kamailio is
>>> crashing when it loads it. Actually the module is properly loaded if the
>>> table is empty, but it fails when a row is added; so I guess it's related
>>> with the way I've inserted the values. A core file is generated:
>>>
>>>  Core was generated by `./kamailio -f ../etc/kamailio/kamailio.cfg'.
>>> Program terminated with signal 11, Segmentation fault.
>>> #0  build_rule (values=0x0) at dp_db.c:439
>>>  439 new_rule->dpid = VAL_INT(values);
>>>
>>>  this looks a bit strange at first sight, 'values' parameter is NULL and
>>> should not happen. Besides that, in build_rule() functions there are other
>>> uses of 'values' before line 439, so the crash should have been earlier.
>>>
>>> Please send full backtrace of the core, in gdb, run 'bt' command (or
>>> better 'bt full').
>>>
>>> Also, if this reproducible, run:
>>>
>>> ./kamailio -f ../etc/kamailio/kamailio.cfg -E -dddd
>>>
>>> and send the output.
>>>
>>> Cheers,
>>> Daniel
>>>
>>>
>>>  This is the relevant config:
>>>
>>>  #----- dialplan params ---
>>> modparam("dialplan", "db_url", "mysql://xxxx:yyyyy@localhost/db")
>>> modparam("dialplan", "table_name", "dialplan")
>>> modparam("dialplan", "dpid_col", "dpid")
>>> modparam("dialplan", "attrs_pvar", "$avp(s:dp_attrs)")
>>>
>>>  mysql> describe dialplan;
>>>
>>> +-----------+------------------+------+-----+---------+----------------+
>>> | Field     | Type             | Null | Key | Default | Extra          |
>>> +-----------+------------------+------+-----+---------+----------------+
>>> | id        | int(10) unsigned | NO   | PRI | NULL    | auto_increment |
>>> | dpid      | int(11)          | NO   |     | NULL    |                |
>>> | pr        | int(11)          | NO   |     | NULL    |                |
>>> | match_op  | int(11)          | NO   |     | NULL    |                |
>>> | match_exp | varchar(64)      | NO   |     | NULL    |                |
>>> | match_len | int(11)          | NO   |     | NULL    |                |
>>> | subst_exp | varchar(64)      | NO   |     | NULL    |                |
>>> | repl_exp  | varchar(32)      | NO   |     | NULL    |                |
>>> | attrs     | varchar(32)      | NO   |     | NULL    |                |
>>> +-----------+------------------+------+-----+---------+----------------+
>>> 9 rows in set (0.00 sec)
>>>
>>>  mysql> select * from dialplan;
>>>
>>> +----+------+----+----------+-----------+-----------+-----------+----------+-------+
>>> | id | dpid | pr | match_op | match_exp | match_len | subst_exp |
>>> repl_exp | attrs |
>>>
>>> +----+------+----+----------+-----------+-----------+-----------+----------+-------+
>>> |  1 |    1 |  1 |        1 | ^00       |         0 | ^00       | 011
>>>  | dp1   |
>>>
>>> +----+------+----+----------+-----------+-----------+-----------+----------+-------+
>>> 1 row in set (0.00 sec)
>>>
>>>  I'm probably making some stupid mistake...any clue?
>>>
>>>  Thanks in advance
>>>
>>>  Javier
>>>
>>>
>>> _______________________________________________
>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing listsr-users at lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>>
>>>
>>> --
>>> Daniel-Constantin Mierla
>>> Kamailio (OpenSER) Advanced Training
>>> Jan 24-26, 2011, Irvine, CA, USAhttp://www.asipto.com
>>>
>>>
>>
>> _______________________________________________
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing listsr-users at lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
>> --
>> Daniel-Constantin Mierla
>> Kamailio (OpenSER) Advanced Training
>> Jan 24-26, 2011, Irvine, CA, USAhttp://www.asipto.com
>>
>>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing listsr-users at lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
> --
> Daniel-Constantin Mierla
> Kamailio (OpenSER) Advanced Training
> Jan 24-26, 2011, Irvine, CA, USAhttp://www.asipto.com
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20101125/54793322/attachment.htm>


More information about the sr-users mailing list