On Mon, Dec 30, 2013 at 6:08 PM, Jr Richardson <jmr.richardson(a)gmail.com> wrote:
Hello,
you should enable core dumping - that should be via running 'ulimit -c
unlimited' before you start rtpproxy.
If you get the coredump, then grab the backtrace with gdb, it should
show where rtpproxy crashed. With that info, maybe we can spot a fix for it.
Hopefully rtpproxy package is with debug symbols, if not, the look for a
rtpproxy-dbg package and install it if found.
Cheers,
Daniel
On 20/12/13 18:59, Jr Richardson wrote:
> Hi All,
> root@sip-router3-ve206:/etc/kamailio# kamailio -V
> version: kamailio 4.1.0 (x86_64/linux) 350d2e
> Doing some testing, can't seem to get rtpproxy to not segfault. I've
> loaded version from deb-squeeze pkg, from source
>
http://b2bua.org/chrome/site/rtpproxy-1.2.1.tar.gz and from
>
git://sippy.git.sourceforge.net/gitroot/sippy/rtpproxy
> <http://sippy.git.sourceforge.net/gitroot/sippy/rtpproxy> (which
> should be the latest) but all versions segfault as soon as a call sets up.
> I've configured each versions control socket for both udp or unix,
> kamailio starts and sees the rtpproxy fine with no errors, but when a
> call hits, rtpproxy segfaults.
> I've run rtpproxy in the forground with degug and get this response
> (IP's washed x.x.x):
> ------------------
> DBUG:handle_command: received command "7505_12 USIEc0,101
> 0adb2f8449b8c9026f993a0a7db9ab5d(a)x.x.x.76 x.x.x.76 23388 as33dd7c98;1"
> INFO:handle_command: new session
> 0adb2f8449b8c9026f993a0a7db9ab5d(a)x.x.x.76, tag as33dd7c98;1 requested,
> type strong
> Segmentation fault
> ------------------
> root@sip-router3-ve206:/etc/kamailio# more /etc/default/rtpproxy
> # Defaults for rtpproxy
> # The control socket.
> CONTROL_SOCK="unix:/var/run/rtpproxy/rtpproxy.sock"
> # To listen on an UDP socket, uncomment this line:
> #CONTROL_SOCK="udp:127.0.0.1:7722 <http://127.0.0.1:7722>"
> # Additional options that are passed to the daemon.
> EXTRA_OPTS="-l x.x.x.20"
> kamailio.cfg:
> loadmodule "rtpproxy.so"
> modparam("rtpproxy", "rtpproxy_sock", "udp:127.0.0.1:7722
> <http://127.0.0.1:7722>")
> inside route[]
>
> add_path_received();
> rtpproxy_manage("cwei");
> record_route();
> Any guidance on further identifying the issue?
> Thanks.
> JR
I'm not very familiar with gdb, but did manage to get a core dump and
here are the results:
-------------------------------------------
root@rtpproxy:/usr/src/rtpproxy-git# gdb
/usr/src/rtpproxy-git/rtpproxy -c /usr/src/rtpproxy-git/core
GNU gdb (GDB) 7.0.1-debian
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/src/rtpproxy-git/rtpproxy...done.
[New Thread 11256]
warning: Can't read pathname for load map: Input/output error.
Reading symbols from /lib/libpthread.so.0...(no debugging symbols found)...done.
Loaded symbols for /lib/libpthread.so.0
Reading symbols from /lib/libm.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /lib/libc.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging
symbols found)...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Reading symbols from /lib/libnss_compat.so.2...(no debugging symbols
found)...done.
Loaded symbols for /lib/libnss_compat.so.2
Reading symbols from /lib/libnsl.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/libnsl.so.1
Reading symbols from /lib/libnss_nis.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/libnss_nis.so.2
Reading symbols from /lib/libnss_files.so.2...(no debugging symbols
found)...done.
Loaded symbols for /lib/libnss_files.so.2
Core was generated by `./rtpproxy -f -l x.x.x.x -s udp:x.x.x.x 7722 -p
/var/run/rtpproxy/rtp'.
Program terminated with signal 11, Segmentation fault.
#0 create_twinlistener (cf=0x7fff957ec2d0, ia=0x0, port=<value
optimized out>, fds=<value optimized out>)
at rtpp_command.c:97
97 fds[i] = socket(ia->sa_family, SOCK_DGRAM, 0);
(gdb) bt
#0 create_twinlistener (cf=0x7fff957ec2d0, ia=0x0, port=<value
optimized out>, fds=<value optimized out>)
at rtpp_command.c:97
#1 create_listener (cf=0x7fff957ec2d0, ia=0x0, port=<value optimized
out>, fds=<value optimized out>)
at rtpp_command.c:143
#2 0x000000000040967d in handle_command (cf=0x7fff957ec2d0,
controlfd=<value optimized out>,
cmd=0x7f73bf148d00, dtime=<value optimized out>) at rtpp_command.c:837
#3 0x000000000040bc9d in process_commands (cf=0x7fff957ec2d0,
controlfd_in=3, dtime=<value optimized out>)
at rtpp_command_async.c:63
#4 0x000000000040bd75 in rtpp_cmd_queue_run (arg=<value optimized
out>) at rtpp_command_async.c:92
#5 0x00007f73bff6e8ca in start_thread () from /lib/libpthread.so.0
#6 0x00007f73bfa53b6d in clone () from /lib/libc.so.6
#7 0x0000000000000000 in ?? ()
(gdb)
---------------------------------------------------------------------------------
I could not find an rtpproxy debug package and the install notes do
not tell how to compile with debugging symbols.
Thanks.
JR
So apparently rtpproxy doesn't like to be told to use 2 interfaces in
the flags (ie or ei) when only 1 interface is actually enabled for
use. This was a case of RTFM! RTPProxy seems to be working fine, once
I got the correct config parameters in kamailio.
Thanks.
JR
--
JR Richardson
Engineering for the Masses