Can you install the debug symbols for kamailio as well? There should be a kamailio-dbg package or so ...
Then take again the backtrace, it should provide more information -- file and line for each frame, ...
Cheers, Daniel
On 09.01.18 21:21, jenus@cyberchaos.nl wrote:
Daniel,
Just upgraded to 5.1 but kamailio now generates a core file. I'm running debian 8.10. It seems to crash on liblua5.1.so.0 :
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Core was generated by `kamailio -m 1500'. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x00007f30c17f25a0 in ?? () from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0 (gdb) backtrace #0 0x00007f30c17f25a0 in ?? () from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0 #1 0x00007f30c17f3b62 in ?? () from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0 #2 0x00007f30c17e6040 in lua_settable () from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0 #3 0x00007f30c17f6412 in luaL_findtable () from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0 #4 0x00007f30c17f6581 in luaL_openlib () from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0 #5 0x00007f30c1a40870 in lua_sr_kemi_register_libs () from /usr/lib/x86_64-linux-gnu/kamailio/modules/app_lua.so #6 0x00007f30c1a8b107 in lua_sr_openlibs () from /usr/lib/x86_64-linux-gnu/kamailio/modules/app_lua.so #7 0x00007f30c1a8b7c1 in lua_sr_init_probe () from /usr/lib/x86_64-linux-gnu/kamailio/modules/app_lua.so #8 0x00007f30c1a1797d in ?? () from /usr/lib/x86_64-linux-gnu/kamailio/modules/app_lua.so #9 0x0000000000549944 in ?? () #10 0x0000000000549c72 in init_child () #11 0x0000000000421498 in main_loop () #12 0x000000000042aab9 in main ()
Thanks,
Jan
jenus@cyberchaos.nl schreef op 2018-01-09 20:53:
Daniel,
Currently running kamailio 5.0.5.
Jan
Daniel-Constantin Mierla schreef op 2018-01-09 13:27:
Hello,
what version of kamailio are you using?
Cheers, Daniel
On 07.01.18 22:14, jenus@cyberchaos.nl wrote:
Hello,
I'm doing some tests with a lua script and app_lua. I'm using sr.sqlops.query to insert records into the database but would like to test the exit status of the sql query. In kamailio i can do:
if(!sql_query("kamailio", "INSERT INTO subscriber ..."))
Is there some kind of exit status for the lua function sr.sqlops.query in order to do the same check in lua? In other words, is it possible to check if a sql query was successful in lua? The result seems to be nill in all cases for a INSERT in lua using sr.sqlops.query.
Thanks,
Jan Hazenberg
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Daniel,
Here is the backtrace.
(gdb) backtrace #0 0x00007fe41140e067 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 #1 0x00007fe41140f448 in __GI_abort () at abort.c:89 #2 0x00007fe41144c1b4 in __libc_message (do_abort=do_abort@entry=1, fmt=fmt@entry=0x7fe411541210 "*** Error in `%s': %s: 0x%s ***\n") at ../sysdeps/posix/libc_fatal.c:175 #3 0x00007fe41145198e in malloc_printerr (action=1, str=0x7fe41153d42a "realloc(): invalid next size", ptr=<optimized out>) at malloc.c:4996 #4 0x00007fe41145476b in _int_realloc (av=av@entry=0x7fe41177e620 <main_arena>, oldp=oldp@entry=0x21789c0, oldsize=oldsize@entry=736, nb=nb@entry=1552) at malloc.c:4234 #5 0x00007fe411455769 in __GI___libc_realloc (oldmem=0x21789d0, bytes=1536) at malloc.c:3029 #6 0x00007fe40c460cae in ?? () from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0 #7 0x00007fe40c45c9aa in ?? () from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0 #8 0x00007fe40c46166d in ?? () from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0 #9 0x00007fe40c4640b3 in ?? () from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0 #10 0x00007fe40c45ccd1 in ?? () from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0 #11 0x00007fe40c45c92e in ?? () from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0 #12 0x00007fe40c45d7bb in ?? () from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0 #13 0x00007fe40c45d8c2 in ?? () from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0 #14 0x00007fe40c459528 in lua_load () from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0 #15 0x00007fe40c469d8c in luaL_loadbuffer () from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0 #16 0x00007fe40c6fe7d7 in lua_sr_init_probe () at app_lua_api.c:228 #17 0x00007fe40c68a97d in child_init (rank=-127) at app_lua_mod.c:197 #18 0x0000000000549944 in init_mod_child (m=0x7fe410c3b998, rank=-127) at core/sr_module.c:938 #19 0x0000000000549662 in init_mod_child (m=0x7fe410c3bec0, rank=-127) at core/sr_module.c:935 #20 0x0000000000549662 in init_mod_child (m=0x7fe410c3c708, rank=-127) at core/sr_module.c:935 #21 0x0000000000549662 in init_mod_child (m=0x7fe410c3cd78, rank=-127) at core/sr_module.c:935 #22 0x0000000000549662 in init_mod_child (m=0x7fe410c3d360, rank=-127) at core/sr_module.c:935 #23 0x0000000000549662 in init_mod_child (m=0x7fe410c3e1e8, rank=-127) at core/sr_module.c:935 #24 0x0000000000549662 in init_mod_child (m=0x7fe410c3e938, rank=-127) at core/sr_module.c:935 #25 0x0000000000549662 in init_mod_child (m=0x7fe410c3f4c8, rank=-127) at core/sr_module.c:935 #26 0x0000000000549662 in init_mod_child (m=0x7fe410c3fca0, rank=-127) at core/sr_module.c:935 #27 0x0000000000549662 in init_mod_child (m=0x7fe410c40118, rank=-127) at core/sr_module.c:935 #28 0x0000000000549662 in init_mod_child (m=0x7fe410c40780, rank=-127) at core/sr_module.c:935 #29 0x0000000000549662 in init_mod_child (m=0x7fe410c422f8, rank=-127) at core/sr_module.c:935 #30 0x0000000000549662 in init_mod_child (m=0x7fe410c42968, rank=-127) at core/sr_module.c:935 #31 0x0000000000549662 in init_mod_child (m=0x7fe410c42e50, rank=-127) at core/sr_module.c:935 #32 0x0000000000549662 in init_mod_child (m=0x7fe410c43b48, rank=-127) at core/sr_module.c:935 #33 0x0000000000549662 in init_mod_child (m=0x7fe410c43f20, rank=-127) at core/sr_module.c:935 #34 0x0000000000549662 in init_mod_child (m=0x7fe410c446e0, rank=-127) at core/sr_module.c:935 #35 0x0000000000549662 in init_mod_child (m=0x7fe410c44bd0, rank=-127) at core/sr_module.c:935 #36 0x0000000000549662 in init_mod_child (m=0x7fe410c44ec8, rank=-127) at core/sr_module.c:935 #37 0x0000000000549662 in init_mod_child (m=0x7fe410c45378, rank=-127) at core/sr_module.c:935 #38 0x0000000000549662 in init_mod_child (m=0x7fe410c458f0, rank=-127) at core/sr_module.c:935 #39 0x0000000000549662 in init_mod_child (m=0x7fe410c45e48, rank=-127) at core/sr_module.c:935 #40 0x0000000000549662 in init_mod_child (m=0x7fe410c464e8, rank=-127) at core/sr_module.c:935 #41 0x0000000000549662 in init_mod_child (m=0x7fe410c47278, rank=-127) at core/sr_module.c:935 #42 0x0000000000549662 in init_mod_child (m=0x7fe410c476f0, rank=-127) at core/sr_module.c:935 #43 0x0000000000549662 in init_mod_child (m=0x7fe410c47b68, rank=-127) at core/sr_module.c:935 #44 0x0000000000549c72 in init_child (rank=-127) at core/sr_module.c:964 #45 0x0000000000422c1c in main_loop () at main.c:1576 #46 0x000000000042aab9 in main (argc=3, argv=0x7ffe17f0e788) at main.c:2646
Jan
Daniel-Constantin Mierla schreef op 2018-01-09 22:21:
Can you install the debug symbols for kamailio as well? There should be a kamailio-dbg package or so ...
Then take again the backtrace, it should provide more information -- file and line for each frame, ...
Cheers, Daniel
On 09.01.18 21:21, jenus@cyberchaos.nl wrote:
Daniel,
Just upgraded to 5.1 but kamailio now generates a core file. I'm running debian 8.10. It seems to crash on liblua5.1.so.0 :
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Core was generated by `kamailio -m 1500'. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x00007f30c17f25a0 in ?? () from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0 (gdb) backtrace #0 0x00007f30c17f25a0 in ?? () from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0 #1 0x00007f30c17f3b62 in ?? () from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0 #2 0x00007f30c17e6040 in lua_settable () from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0 #3 0x00007f30c17f6412 in luaL_findtable () from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0 #4 0x00007f30c17f6581 in luaL_openlib () from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0 #5 0x00007f30c1a40870 in lua_sr_kemi_register_libs () from /usr/lib/x86_64-linux-gnu/kamailio/modules/app_lua.so #6 0x00007f30c1a8b107 in lua_sr_openlibs () from /usr/lib/x86_64-linux-gnu/kamailio/modules/app_lua.so #7 0x00007f30c1a8b7c1 in lua_sr_init_probe () from /usr/lib/x86_64-linux-gnu/kamailio/modules/app_lua.so #8 0x00007f30c1a1797d in ?? () from /usr/lib/x86_64-linux-gnu/kamailio/modules/app_lua.so #9 0x0000000000549944 in ?? () #10 0x0000000000549c72 in init_child () #11 0x0000000000421498 in main_loop () #12 0x000000000042aab9 in main ()
Thanks,
Jan
jenus@cyberchaos.nl schreef op 2018-01-09 20:53:
Daniel,
Currently running kamailio 5.0.5.
Jan
Daniel-Constantin Mierla schreef op 2018-01-09 13:27:
Hello,
what version of kamailio are you using?
Cheers, Daniel
On 07.01.18 22:14, jenus@cyberchaos.nl wrote:
Hello,
I'm doing some tests with a lua script and app_lua. I'm using sr.sqlops.query to insert records into the database but would like to test the exit status of the sql query. In kamailio i can do:
if(!sql_query("kamailio", "INSERT INTO subscriber ..."))
Is there some kind of exit status for the lua function sr.sqlops.query in order to do the same check in lua? In other words, is it possible to check if a sql query was successful in lua? The result seems to be nill in all cases for a INSERT in lua using sr.sqlops.query.
Thanks,
Jan Hazenberg
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users