sippy / rtpproxy

The RTPproxy is a high-performance software proxy for RTP streams that can work together with Sippy B2BUA, Kamailio, OpenSIPS and SER.
http://rtpproxy.org
BSD 2-Clause "Simplified" License
418 stars 115 forks source link

rtpproxy causes crashes of OpenSIPS server #82

Closed zenichev closed 5 years ago

zenichev commented 5 years ago

Hi there! Recently I've started to experience problems with crashes of OpenSIPS server. What I did is, that I migrated rtpproxy to the latest master's branch version that was (at the moment of migration) - 2.2.alpha.2af612e.

What happens is that, OpenSIP's child (worker process) responsible for rtpproxy sends sig term to the paternal process and OpenSIPS just dies.

So it looks like this:

Mar 29 09:55:09 <some_name> opensips[24108]: INFO:rtpproxy:rtpp_test: rtp proxy </var/run/rtpproxy/rtpproxy.sock> found, support for it enabled
Mar 29 10:02:48 <some_name> opensips[24108]: CRITICAL:core:sig_usr: segfault in process pid: 24108, id: 35
Mar 29 10:02:48 <some_name> opensips[24136]: CRITICAL:core:handle_worker: dead child 35 (EOF received), pid 24108
Mar 29 10:02:48 <some_name> opensips[24064]: INFO:core:handle_sigs: child process 24108 exited by a signal 11

And this is a constant thing, so each time opensips crashes, child that crashed, has PID of rtpproxy service process (not sure how to describe this better, but I hope it's descriptive for you).

Operating System: Ubuntu 18.04.2 LTS OpenSIPS installation: official opensips git other relevant information: rtpproxy version 2.2.alpha.2af612e - strange that it contains 'alpha' mark, since it's taken from official rtpproxy master branch.

What I think of, is that it's somehow related to timed out sessions since of no audio for quite a while within a certain dialog. Why I consider this version, is because the timestamp for the last update of rtpp_notify_socket file, matches a time of child's crashing. So it has something to do with it.

This is rtpproxy module configuration

loadmodule "rtpproxy.so"
modparam("rtpproxy", "rtpproxy_sock", "/var/run/rtpproxy/rtpproxy.sock")
modparam("rtpproxy", "rtpp_notify_socket", "/var/run/rtpproxy/rtpproxy_timeout.sock")
modparam("rtpproxy", "rtpproxy_autobridge", 1)
modparam("rtpproxy", "nortpproxy_str", "")

The start row of rtpproxy:

/usr/local/bin/rtpproxy -p /var/run/rtpproxy/rtpproxy.pid -s unix:/var/run/rtpproxy/rtpproxy.sock -u opensips opensips -n unix:/var/run/rtpproxy/rtpproxy_timeout.sock -f -l <ip.address.here> -m 9000 -M 14000 -d INFO LOG_LOCAL5

I wonder if I should try to disable this parameter for start row -n unix:/var/run/rtpproxy/rtpproxy_timeout.sock and this option for rtpproxy module modparam("rtpproxy", "rtpp_notify_socket", "/var/run/rtpproxy/rtpproxy_timeout.sock")

And a good question, which rtpproxy version is considered as the most stable for now? Can you advise one? Because it looks like the one from the master git branch, doesn't look much stable.. at least for our setup.

Thanks for your attention and I really appreciate any useful hints! So looking forward!

razvancrainea commented 5 years ago

This seems to be a problem related to opensips, rather than rtpproxy. A similar report was done on the opensips issue tracker, which is now closed. If this problem persist, please open a bug report there, containing information about the core file. In the meantime, I will close this ticket.