[SR-Users] Kamailo crashes with auth_radius module

Daniel-Constantin Mierla miconda at gmail.com
Wed Nov 18 14:20:22 CET 2015


Hello,

you don't have the debug symbols installed -- you need to install
kamailio-dbg package, then get the backtrace again.

On the other hand, the trace suggests an issue in libfreeradius-client
library

Cheers,
Daniel

On 18/11/15 14:01, Volkan Oransoy wrote:
> Hi Daniel,
>
> Here is the output:
>
>     (gdb) file /usr/sbin/kamailio
>     Reading symbols from /usr/sbin/kamailio...(no debugging symbols
>     found)...done.
>     (gdb) bt full
>     #0  0x00007fa044bd5920 in ?? ()
>     No symbol table info available.
>     #1  0x00007fa03e240bc9 in ?? ()
>     No symbol table info available.
>     #2  0x0000000000000000 in ?? ()
>     No symbol table info available.
>     (gdb) core /core
>     [New LWP 7065]
>     [Thread debugging using libthread_db enabled]
>     Using host libthread_db library
>     "/lib/x86_64-linux-gnu/libthread_db.so.1".
>     Core was generated by `/usr/sbin/kamailio -P /var/run/kamailio.pid
>     -f /etc/kamailio//kamailio.cfg'.
>     Program terminated with signal SIGSEGV, Segmentation fault.
>     #0  __strncpy_sse2_unaligned () at
>     ../sysdeps/x86_64/multiarch/strcpy-sse2-unaligned.S:63
>     63      ../sysdeps/x86_64/multiarch/strcpy-sse2-unaligned.S: No
>     such file or directory.
>     (gdb) bt full
>     #0  __strncpy_sse2_unaligned () at
>     ../sysdeps/x86_64/multiarch/strcpy-sse2-unaligned.S:63
>     No locals.
>     #1  0x00007fa03e240bc9 in rc_send_server () from
>     /usr/lib/x86_64-linux-gnu/libfreeradius-client.so.2
>     No symbol table info available.
>     #2  0x00007fa03e23fd9c in rc_aaa () from
>     /usr/lib/x86_64-linux-gnu/libfreeradius-client.so.2
>     No symbol table info available.
>     #3  0x00007fa03e240036 in rc_auth () from
>     /usr/lib/x86_64-linux-gnu/libfreeradius-client.so.2
>     No symbol table info available.
>     #4  0x00007fa03e44e544 in radius_authorize_sterman () from
>     /usr/lib/x86_64-linux-gnu/kamailio/modules/auth_radius.so
>     No symbol table info available.
>     #5  0x00007fa03e455dfe in radius_www_authorize_1 () from
>     /usr/lib/x86_64-linux-gnu/kamailio/modules/auth_radius.so
>     No symbol table info available.
>     #6  0x00000000005355c0 in do_action ()
>     No symbol table info available.
>     #7  0x00000000005341f8 in run_actions ()
>     No symbol table info available.
>     #8  0x000000000053fff7 in run_actions_safe ()
>     No symbol table info available.
>     #9  0x00000000004245c8 in rval_get_int ()
>     No symbol table info available.
>     #10 0x0000000000429734 in rval_expr_eval_int ()
>     No symbol table info available.
>     #11 0x000000000042981e in rval_expr_eval_int ()
>     No symbol table info available.
>     #12 0x0000000000535aa7 in do_action ()
>     No symbol table info available.
>     #13 0x00000000005341f8 in run_actions ()
>     No symbol table info available.
>     #14 0x0000000000535af6 in do_action ()
>     No symbol table info available.
>     #15 0x00000000005341f8 in run_actions ()
>     No symbol table info available.
>     #16 0x0000000000535cb3 in do_action ()
>     No symbol table info available.
>     #17 0x00000000005341f8 in run_actions ()
>     No symbol table info available.
>     #18 0x0000000000540095 in run_top_route ()
>     No symbol table info available.
>     #19 0x0000000000540ff6 in receive_msg ()
>     No symbol table info available.
>     #20 0x000000000047fd91 in udp_rcv_loop ()
>     No symbol table info available.
>     #21 0x0000000000504f43 in main_loop ()
>     No symbol table info available.
>     #22 0x000000000041c250 in main ()
>     No symbol table info available.
>     (gdb) info locals
>     No locals.
>     (gdb) list
>     58      in ../sysdeps/x86_64/multiarch/strcpy-sse2-unaligned.S
>     (gdb)
>
>
> Regards,
>
> /Volkan
>
> 2015-11-18 11:48 GMT+02:00 Daniel-Constantin Mierla <miconda at gmail.com
> <mailto:miconda at gmail.com>>:
>
>     Hello,
>
>     the logs show that you got a core dump:
>
>     "Nov 18 11:30:27 sip /usr/sbin/kamailio[6934]: ALERT: <core>
>     [main.c:731]: handle_sigs(): core was generated"
>
>     Can you send the output of the following commands from gdb with
>     the core file:
>
>     bt full
>     info locals
>     list
>
>     Cheers,
>     Daniel
>
>
>     On 18/11/15 10:43, Volkan Oransoy wrote:
>>     Hi,
>>
>>     I try to enable auth_radius module with my kamailo box. But it
>>      crashes on the first REGISTER request. 
>>
>>     I have enabled it with this two lines.
>>     loadmodule "auth_radius.so"
>>     modparam("auth_radius", "radius_config",
>>     "/etc/radiusclient/radiusclient.conf")
>>
>>     This is the authentication part of my script.
>>             if (is_method("REGISTER"))
>>             {
>>                     if (!radius_www_authorize("$td")) {
>>                             switch ($rc) {
>>                             case -7:
>>                                     send_reply("500", "Server
>>     Internal Error");
>>                                     exit;
>>                             case -1:
>>                                     send_reply("400", "Bad Request");
>>                                     exit;
>>                             default:
>>                     };
>>                     if (defined($avp(digest_challenge)) &&
>>                             ($avp(digest_challenge) != "")) {
>>                             append_to_reply("$avp(digest_challenge)");
>>                     };
>>                     send_reply("401", "Unauthorized");
>>                     exit;
>>                     };
>>             }
>>
>>
>>     And in the /etc/radiusclient/dictionary file, I included sip and
>>     kamailio dictionaries.
>>     $INCLUDE dictionary.sip
>>     $INCLUDE dictionary.kamailio
>>
>>     Service succesfully starts but it crashes on the first REGISTER
>>     request.
>>
>>     Nov 18 11:30:27 sip kernel: [159645.360105] traps: kamailio[6941]
>>     general protection ip:7f89b1660920 sp:7ffc8d3bac78 error:0 in
>>     libc-2.19.so <http://libc-2.19.so>[7f89b15cb000+19f000]
>>     Nov 18 11:30:27 sip /usr/sbin/kamailio[6961]: CRITICAL: <core>
>>     [pass_fd.c:275]: receive_fd(): EOF on 17
>>     Nov 18 11:30:27 sip /usr/sbin/kamailio[6934]: ALERT: <core>
>>     [main.c:728]: handle_sigs(): child process 6941 exited by a signal 11
>>     Nov 18 11:30:27 sip /usr/sbin/kamailio[6934]: ALERT: <core>
>>     [main.c:731]: handle_sigs(): core was generated
>>     Nov 18 11:30:27 sip /usr/sbin/kamailio[6934]: INFO: <core>
>>     [main.c:743]: handle_sigs(): terminating due to SIGCHLD
>>     Nov 18 11:30:27 sip /usr/sbin/kamailio[6961]: INFO: <core>
>>     [main.c:794]: sig_usr(): signal 15 received
>>     Nov 18 11:30:27 sip /usr/sbin/kamailio[6959]: INFO: <core>
>>     [main.c:794]: sig_usr(): signal 15 received
>>     Nov 18 11:30:27 sip /usr/sbin/kamailio[6951]: INFO: <core>
>>     [main.c:794]: sig_usr(): signal 15 received
>>     Nov 18 11:30:27 sip /usr/sbin/kamailio[6936]: INFO: <core>
>>     [main.c:794]: sig_usr(): signal 15 received
>>     Nov 18 11:30:27 sip /usr/sbin/kamailio[6948]: INFO: <core>
>>     [main.c:794]: sig_usr(): signal 15 received
>>     Nov 18 11:30:27 sip /usr/sbin/kamailio[6944]: INFO: <core>
>>     [main.c:794]: sig_usr(): signal 15 received
>>     Nov 18 11:30:27 sip /usr/sbin/kamailio[6937]: INFO: <core>
>>     [main.c:794]: sig_usr(): signal 15 received
>>     Nov 18 11:30:27 sip /usr/sbin/kamailio[6953]: INFO: <core>
>>     [main.c:794]: sig_usr(): signal 15 received
>>     Nov 18 11:30:27 sip /usr/sbin/kamailio[6945]: INFO: <core>
>>     [main.c:794]: sig_usr(): signal 15 received
>>     Nov 18 11:30:27 sip /usr/sbin/kamailio[6938]: INFO: <core>
>>     [main.c:794]: sig_usr(): signal 15 received
>>     Nov 18 11:30:27 sip /usr/sbin/kamailio[6955]: INFO: <core>
>>     [main.c:794]: sig_usr(): signal 15 received
>>     Nov 18 11:30:27 sip /usr/sbin/kamailio[6943]: INFO: <core>
>>     [main.c:794]: sig_usr(): signal 15 received
>>     Nov 18 11:30:27 sip /usr/sbin/kamailio[6942]: INFO: <core>
>>     [main.c:794]: sig_usr(): signal 15 received
>>     Nov 18 11:30:27 sip /usr/sbin/kamailio[6957]: INFO: <core>
>>     [main.c:794]: sig_usr(): signal 15 received
>>     Nov 18 11:30:27 sip /usr/sbin/kamailio[6939]: INFO: <core>
>>     [main.c:794]: sig_usr(): signal 15 received
>>     Nov 18 11:30:27 sip /usr/sbin/kamailio[6940]: INFO: <core>
>>     [main.c:794]: sig_usr(): signal 15 received
>>     Nov 18 11:30:27 sip /usr/sbin/kamailio[6934]: INFO: <core>
>>     [sctp_core.c:53]: sctp_core_destroy(): SCTP API not initialized
>>
>>     Thanks,
>>
>>
>>     _______________________________________________
>>     SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>>     sr-users at lists.sip-router.org <mailto:sr-users at lists.sip-router.org>
>>     http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>     -- 
>     Daniel-Constantin Mierla
>     http://twitter.com/#!/miconda <http://twitter.com/#%21/miconda> - http://www.linkedin.com/in/miconda
>     Book: SIP Routing With Kamailio - http://www.asipto.com
>     Kamailio Advanced Training, Nov 30-Dec 2, Berlin - http://asipto.com/kat
>
>
>     _______________________________________________
>     SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing
>     list
>     sr-users at lists.sip-router.org <mailto:sr-users at lists.sip-router.org>
>     http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Book: SIP Routing With Kamailio - http://www.asipto.com
Kamailio Advanced Training, Nov 30-Dec 2, Berlin - http://asipto.com/kat

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20151118/73e01edd/attachment.html>


More information about the sr-users mailing list