Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRITICAL:tls_mgm:shm_free: #947

Closed
fedkis opened this issue Aug 19, 2016 · 4 comments
Closed

CRITICAL:tls_mgm:shm_free: #947

fedkis opened this issue Aug 19, 2016 · 4 comments
Assignees
Labels
Milestone

Comments

@fedkis
Copy link

fedkis commented Aug 19, 2016

Sometimes my opensips crashes with the follow error:

Aug 19 14:52:40 sipnet /usr/local/opensips-2.2.1/sbin/opensips[2545]: CRITICAL:tls_mgm:shm_free: #012>>> shm_free() on n
on-shm ptr 0x200000000 - aborting!#012#012It seems you have hit a programming bug.#012Please help us make OpenSIPS bette
r by reporting it at https://github.com/OpenSIPS/opensips/issues#012



(gdb) 
(gdb) 
(gdb) bt
#0  0x00007f78cc3ac5e5 in raise () from /lib64/libc.so.6
#1  0x00007f78cc3addc5 in abort () from /lib64/libc.so.6
#2  0x00007f784415b851 in shm_free (ptr=0x200000000) at ../../mem/shm_mem.h:495
#3  os_free (ptr=0x200000000) at tls.h:103
#4  0x00007f7843b6c8fd in CRYPTO_free () from /opt/local/lib/libcrypto.so.1.0.0
#5  0x00007f7843f2b646 in SSL_SESSION_free () from /opt/local/lib/libssl.so.1.0.0
#6  0x00007f7843f2930d in SSL_free () from /opt/local/lib/libssl.so.1.0.0
#7  0x00007f78438e5210 in tls_conn_clean (c=0x7f7844970c50) at ../tls_mgm/tls_conn_ops.h:148
#8  0x0000000000560356 in _tcpconn_rm (c=0x7f7844970c50) at net/net_tcp.c:688
#9  0x000000000056062a in tcpconn_destroy (tcpconn=0x7f7844970c50) at net/net_tcp.c:929
#10 0x00000000005609e9 in handle_tcp_worker (tcp_c=0x7f78c43ee770, fd_i=<value optimized out>) at net/net_tcp.c:1210
#11 0x0000000000567f59 in handle_io (repeat=0, t=5, h=<value optimized out>) at net/net_tcp.c:1391
#12 io_wait_loop_epoll (repeat=0, t=5, h=<value optimized out>) at net/../io_wait_loop.h:221
#13 0x0000000000568d43 in tcp_main_server () at net/net_tcp.c:1534
#14 0x000000000056a53e in tcp_start_processes (chd_rank=0x7ed7e8, startup_done=0x0) at net/net_tcp.c:1787
#15 0x000000000043ba1a in main_loop (argc=<value optimized out>, argv=<value optimized out>) at main.c:677
#16 main (argc=<value optimized out>, argv=<value optimized out>) at main.c:1249
@fedkis
Copy link
Author

fedkis commented Aug 19, 2016

I updated openssl to 1.0.2h and recompiled opensips 2.2.1 . The problem with TLS still exists

(gdb) bt
#0  0x00007f79ce3b682f in __strlen_sse42 () from /lib64/libc.so.6
#1  0x00007f7945e3a430 in i2d_SSL_SESSION () from /opt/local/lib/libssl.so.1.0.0
#2  0x00007f7945e02c6a in ssl3_send_newsession_ticket () from /opt/local/lib/libssl.so.1.0.0
#3  0x00007f7945e07e00 in ssl3_accept () from /opt/local/lib/libssl.so.1.0.0
#4  0x00007f7945792b04 in tls_accept (c=0x7f79467118c8, poll_events=0x0) at ../tls_mgm/tls_conn_server.h:155
#5  0x00007f794579db1f in tls_fix_read_conn (con=0x7f79467118c8, bytes_read=0x7fffadcdea1c)
    at ../tls_mgm/tls_conn_server.h:336
#6  tls_read_req (con=0x7f79467118c8, bytes_read=0x7fffadcdea1c) at proto_tls.c:388
#7  0x000000000056cf87 in handle_io (fm=<value optimized out>, idx=0, event_type=<value optimized out>)
    at net/net_tcp_proc.c:205
#8  0x000000000056d927 in io_wait_loop_epoll (repeat=0, t=2, h=<value optimized out>) at net/../io_wait_loop.h:221
#9  0x000000000056e9c2 in tcp_worker_proc (unix_sock=<value optimized out>) at net/net_tcp_proc.c:312
#10 0x000000000056a19c in tcp_start_processes (chd_rank=<value optimized out>, startup_done=<value optimized out>)
    at net/net_tcp.c:1761
#11 0x000000000043ba1a in main_loop (argc=<value optimized out>, argv=<value optimized out>) at main.c:677
#12 main (argc=<value optimized out>, argv=<value optimized out>) at main.c:1249
(gdb)  

@fedkis
Copy link
Author

fedkis commented Aug 19, 2016

version: opensips 2.2.1 (x86_64/linux)
flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, F_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_lt, epoll_et, sigio_rt, select.
main.c compiled on 15:48:09 Aug 19 2016 with gcc 4.4.7

@bogdan-iancu
Copy link
Member

Hi @fedkis , is this problem still occurring with the latest 2.2.1 release ? Is there a way to reproduce it ? What is the scenario ?

@bogdan-iancu bogdan-iancu added this to the 2.2.2 milestone Sep 30, 2016
@bogdan-iancu bogdan-iancu self-assigned this Sep 30, 2016
@bogdan-iancu
Copy link
Member

This is the same with #1013 , so let's move the discussion over there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants