OpenSIPS / opensips

OpenSIPS is a GPL implementation of a multi-functionality SIP Server that targets to deliver a high-level technical solution (performance, security and quality) to be used in professional SIP server platforms.
https://opensips.org
Other
1.26k stars 576 forks source link

[CRASH] Clusterer + Postgres + OpenSSL TLS #3441

Open Sda79 opened 1 month ago

Sda79 commented 1 month ago

OpenSIPS version you are running

version: opensips 3.4.7 (x86_64/linux)
flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, HP_MALLOC, DBG_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535
poll method support: poll, epoll, sigio_rt, select.
git revision: 3b773aee9
main.c compiled on  with gcc 13

Crash Core Dump https://drive.google.com/file/d/1zlWCrAp3kliv-9vIJggRAscqaMMEFG9E/view?usp=sharing

Describe the traffic that generated the bug The bug occurs with TLS and clusterer modules together with OpenSSL during Opensips startup.

To Reproduce

Setup a running PostgreSQL server (I didn't try with MySQL). Setup a 1 node cluster by populating the clusterer table. Start OpenSIPS with this configuration file :

####### Global Parameters #########

log_level=3
xlog_level=3
stderror_enabled=yes
syslog_enabled=yes
syslog_facility=LOG_LOCAL0
udp_workers=4
mpath="/usr/lib/x86_64-linux-gnu/opensips/modules/"
disable_core_dump=no

socket=udp:127.0.0.1:5060
socket=tcp:127.0.0.1:5060
socket=tls:127.0.0.1:5061
socket=bin:10.93.10.32:5566

####### Modules Section ########

loadmodule "proto_bin.so"
loadmodule "proto_tcp.so"
loadmodule "proto_udp.so"
loadmodule "tls_openssl.so"
loadmodule "tls_mgm.so"
modparam("tls_mgm", "tls_library", "openssl")
modparam("tls_mgm", "server_domain", "example")
modparam("tls_mgm", "match_ip_address", "[example]127.0.0.1:5061")
modparam("tls_mgm", "match_sip_domain", "[example]opensips.org")
modparam("tls_mgm", "tls_method", "[example]TLSv1_2")
modparam("tls_mgm", "certificate", "[example]/etc/opensips/tls/rootCA/cacert.pem")
modparam("tls_mgm", "private_key", "[example]/etc/opensips/tls/rootCA/private/cakey.pem")
modparam("tls_mgm", "ca_dir", "[example]/etc/ssl/certs")
modparam("tls_mgm", "verify_cert", "[example]0")
loadmodule "proto_tls.so"

#### Database modules
loadmodule "db_postgres.so"
modparam("db_postgres", "use_tls", 0)

#### Cluster module
loadmodule "clusterer.so"
modparam("clusterer", "db_url", "postgres://opensips:opensipsrw@10.93.8.16:5432/opensips")
modparam("clusterer", "my_node_id", 1)

# main request routing logic

route{  
    xlog("test\n");
}

Relevant System Logs

CRITICAL:core:sig_usr: segfault in process pid

OS/environment information

github-actions[bot] commented 2 weeks ago

Any updates here? No progress has been made in the last 15 days, marking as stale. Will close this issue if no further updates are made in the next 30 days.