[SR-Users] Issue while initiating database of my new module in kamailio

Jagdeep S jagdes at gmail.com
Sat Dec 3 06:35:10 CET 2011


Hi All,

I am trying to create a new module under the kamailio source base, as
part of understanding the framework. But when i start the Kamailio, i
am seeing a core dump occuring when my new module is getting initiated
and when the database is getting initialised. PFA the files attached
containing the config file and source files used for creating module
files.

I am using the "DEFAULT_DB_URL" as database uri. The core dump
backtrace shows that the module init fails at the following point:
(gdb) bt
#0  0x00000000 in ?? ()
#1  0x00ef390d in child_init (rank=9172352) at my_mod.c:239
#2  0x081226be in init_mod (m=0xb7515a04) at sr_module.c:922
#3  0x08122630 in init_mod (m=0xb7515c78) at sr_module.c:919

The line 239 in my module file points to the child-init function which
initializes the database connectivity ==> "mymod_dbh =
mymod_dbf.init(&db_url);"

I have written the module using the template provided under the
kamailio website. All the parameters are defined properly. Have no
idea as to what is going wrong.

I tried debugging the core dump using gdb but of no much help. I am
not able to run the gdb during runti sr-users at lists.sip-router.orgme
due to which i am not able to add break points and check. Not sure
what the problem is. That's why i generated core dump file and
analysed the backtrace, but i can't add break points and run it again
as the executable is not involved.

Can anyone please let me know what is the issue is or any pointers if
i have missed some part of the code due to which the connectivity to
db is not happening. Due to this i am not able to proceed further with
the testing of my new module. Also any tips on how to do get the gdb
debugging during runtime will also be very helpful.

Any help is appreciated :).

-- 
Jagdeep S
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Kamailio_files.zip
Type: application/zip
Size: 11230 bytes
Desc: not available
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20111203/fcb7817d/attachment-0001.zip>


More information about the sr-users mailing list