{"action":"created","issue":{"url":"https://api.github.com/repos/OpenSIPS/opensips/issues/902","repository_url":"https://api.github.com/repos/OpenSIPS/opensips","labels_url":"https://api.github.com/repos/OpenSIPS/opensips/issues/902/labels{/name}","comments_url":"https://api.github.com/repos/OpenSIPS/opensips/issues/902/comments","events_url":"https://api.github.com/repos/OpenSIPS/opensips/issues/902/events","html_url":"https://github.com/OpenSIPS/opensips/issues/902","id":159395095,"number":902,"title":"Opensips 1.11 crash using statistics module","user":{"login":"fedorna","id":19169002,"avatar_url":"https://avatars.githubusercontent.com/u/19169002?v=3","gravatar_id":"","url":"https://api.github.com/users/fedorna","html_url":"https://github.com/fedorna","followers_url":"https://api.github.com/users/fedorna/followers","following_url":"https://api.github.com/users/fedorna/following{/other_user}","gists_url":"https://api.github.com/users/fedorna/gists{/gist_id}","starred_url":"https://api.github.com/users/fedorna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fedorna/subscriptions","organizations_url":"https://api.github.com/users/fedorna/orgs","repos_url":"https://api.github.com/users/fedorna/repos","events_url":"https://api.github.com/users/fedorna/events{/privacy}","received_events_url":"https://api.github.com/users/fedorna/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/OpenSIPS/opensips/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"bogdan-iancu","id":3973594,"avatar_url":"https://avatars.githubusercontent.com/u/3973594?v=3","gravatar_id":"","url":"https://api.github.com/users/bogdan-iancu","html_url":"https://github.com/bogdan-iancu","followers_url":"https://api.github.com/users/bogdan-iancu/followers","following_url":"https://api.github.com/users/bogdan-iancu/following{/other_user}","gists_url":"https://api.github.com/users/bogdan-iancu/gists{/gist_id}","starred_url":"https://api.github.com/users/bogdan-iancu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bogdan-iancu/subscriptions","organizations_url":"https://api.github.com/users/bogdan-iancu/orgs","repos_url":"https://api.github.com/users/bogdan-iancu/repos","events_url":"https://api.github.com/users/bogdan-iancu/events{/privacy}","received_events_url":"https://api.github.com/users/bogdan-iancu/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/OpenSIPS/opensips/milestones/7","html_url":"https://github.com/OpenSIPS/opensips/milestones/1.11.7","labels_url":"https://api.github.com/repos/OpenSIPS/opensips/milestones/7/labels","id":414606,"number":7,"title":"1.11.7","description":"","creator":{"login":"razvancrainea","id":1511224,"avatar_url":"https://avatars.githubusercontent.com/u/1511224?v=3","gravatar_id":"","url":"https://api.github.com/users/razvancrainea","html_url":"https://github.com/razvancrainea","followers_url":"https://api.github.com/users/razvancrainea/followers","following_url":"https://api.github.com/users/razvancrainea/following{/other_user}","gists_url":"https://api.github.com/users/razvancrainea/gists{/gist_id}","starred_url":"https://api.github.com/users/razvancrainea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/razvancrainea/subscriptions","organizations_url":"https://api.github.com/users/razvancrainea/orgs","repos_url":"https://api.github.com/users/razvancrainea/repos","events_url":"https://api.github.com/users/razvancrainea/events{/privacy}","received_events_url":"https://api.github.com/users/razvancrainea/received_events","type":"User","site_admin":false},"open_issues":11,"closed_issues":81,"state":"open","created_at":"2013-08-29T09:34:21Z","updated_at":"2016-06-09T16:52:07Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2016-06-09T12:25:46Z","updated_at":"2016-06-10T14:49:23Z","closed_at":null,"body":"Hello, using versión 1.11, I've checked out last commit just in case, I'm getting a core when I try to use statistics module.\r\n\r\nJust adding this line in the config script, at the beginning of \"route\" block makes opensips crash: xlog(\"The TCP load is $stat(tcp-load) \\n\");\r\n\r\nI've compiled opensips with DBG_QM_MALLOC, but I cannot start opensips if I set memlog=1 in the config script. So, with memlog=0, this is the syslog:\r\n\r\n2016-06-08T17:53:14.154646-03:00 toro /home/gc/local/opensips/sbin/opensips[17407]: CRITICAL:core:qm_free: freeing already freed pointer, first free: statistics.c: get_stat_name(401) - aborting\r\n2016-06-08T17:53:15.450021-03:00 toro /home/gc/local/opensips/sbin/opensips[17422]: NOTICE:core:io_wait_loop_epoll: EPOLLIN(read) event: epoll_wait() set event EPOLLHUP - connection closed by the remote peer!\r\n2016-06-08T17:53:15.450039-03:00 toro /home/gc/local/opensips/sbin/opensips[17422]: CRITICAL:core:receive_fd: EOF on 17\r\n2016-06-08T17:53:15.450130-03:00 toro /home/gc/local/opensips/sbin/opensips[17402]: INFO:core:handle_sigs: child process 17407 exited by a signal 6\r\n2016-06-08T17:53:15.450151-03:00 toro /home/gc/local/opensips/sbin/opensips[17402]: INFO:core:handle_sigs: core was generated\r\n2016-06-08T17:53:15.450203-03:00 toro /home/gc/local/opensips/sbin/opensips[17402]: INFO:core:handle_sigs: terminating due to SIGCHLD\r\n2016-06-08T17:53:15.450239-03:00 toro /home/gc/local/opensips/sbin/opensips[17422]: INFO:core:sig_usr: signal 15 received\r\n2016-06-08T17:53:15.450258-03:00 toro /home/gc/local/opensips/sbin/opensips[17420]: INFO:core:sig_usr: signal 15 received\r\n2016-06-08T17:53:15.450265-03:00 toro /home/gc/local/opensips/sbin/opensips[17421]: INFO:core:sig_usr: signal 15 received\r\n2016-06-08T17:53:15.450276-03:00 toro /home/gc/local/opensips/sbin/opensips[17411]: INFO:core:sig_usr: signal 15 received\r\n2016-06-08T17:53:15.450284-03:00 toro /home/gc/local/opensips/sbin/opensips[17410]: INFO:core:sig_usr: signal 15 received\r\n2016-06-08T17:53:15.450333-03:00 toro /home/gc/local/opensips/sbin/opensips[17415]: INFO:core:sig_usr: signal 15 received\r\n2016-06-08T17:53:15.451922-03:00 toro /home/gc/local/opensips/sbin/opensips[17414]: INFO:core:sig_usr: signal 15 received\r\n2016-06-08T17:53:15.452055-03:00 toro /home/gc/local/opensips/sbin/opensips[17413]: INFO:core:sig_usr: signal 15 received\r\n2016-06-08T17:53:15.452523-03:00 toro /home/gc/local/opensips/sbin/opensips[17404]: INFO:core:sig_usr: signal 15 received\r\n2016-06-08T17:53:15.452937-03:00 toro /home/gc/local/opensips/sbin/opensips[17405]: INFO:core:sig_usr: signal 15 received\r\n2016-06-08T17:53:15.453444-03:00 toro /home/gc/local/opensips/sbin/opensips[17406]: INFO:core:sig_usr: signal 15 received\r\n2016-06-08T17:53:15.453613-03:00 toro /home/gc/local/opensips/sbin/opensips[17412]: INFO:core:sig_usr: signal 15 received\r\n2016-06-08T17:53:15.453906-03:00 toro /home/gc/local/opensips/sbin/opensips[17418]: INFO:core:sig_usr: signal 15 received\r\n2016-06-08T17:53:15.456665-03:00 toro /home/gc/local/opensips/sbin/opensips[17419]: INFO:core:sig_usr: signal 15 received\r\n2016-06-08T17:53:15.456975-03:00 toro /home/gc/local/opensips/sbin/opensips[17403]: INFO:core:sig_usr: signal 15 received\r\n2016-06-08T17:53:15.457439-03:00 toro /home/gc/local/opensips/sbin/opensips[17417]: INFO:core:sig_usr: signal 15 received\r\n2016-06-08T17:53:15.458215-03:00 toro /home/gc/local/opensips/sbin/opensips[17416]: INFO:core:sig_usr: signal 15 received\r\n2016-06-08T17:53:15.458951-03:00 toro /home/gc/local/opensips/sbin/opensips[17402]: INFO:core:cleanup: cleanup\r\n2016-06-08T17:53:15.458962-03:00 toro /home/gc/local/opensips/sbin/opensips[17402]: NOTICE:event_rabbitmq:destroy: destroy module ...\r\n2016-06-08T17:53:15.458975-03:00 toro /home/gc/local/opensips/sbin/opensips[17402]: NOTICE:event_datagram:destroy: destroy module ...\r\n\r\n\r\ncore bt:\r\n\r\nGNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1\r\nCopyright (C) 2014 Free Software Foundation, Inc.\r\nLicense GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\r\nThis is free software: you are free to change and redistribute it.\r\nThere is NO WARRANTY, to the extent permitted by law.  Type \"show copying\"\r\nand \"show warranty\" for details.\r\nThis GDB was configured as \"x86_64-linux-gnu\".\r\nType \"show configuration\" for configuration details.\r\nFor bug reporting instructions, please see:\r\n<http://www.gnu.org/software/gdb/bugs/>.\r\nFind the GDB manual and other documentation resources online at:\r\n<http://www.gnu.org/software/gdb/documentation/>.\r\nFor help, type \"help\".\r\nType \"apropos word\" to search for commands related to \"word\"...\r\nReading symbols from /home/gc/local/opensips/sbin/opensips...done.\r\n[New LWP 17407]\r\n[Thread debugging using libthread_db enabled]\r\nUsing host libthread_db library \"/lib/x86_64-linux-gnu/libthread_db.so.1\".\r\nCore was generated by `/home/gc/local/opensips/sbin/opensips -P /home/gc/local/opensips/var/run/opensi'.\r\nProgram terminated with signal SIGABRT, Aborted.\r\n#0  0x00007f9f14855cc9 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56\r\n56\t../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.\r\n(gdb) bt\r\n#0  0x00007f9f14855cc9 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56\r\n#1  0x00007f9f148590d8 in __GI_abort () at abort.c:89\r\n#2  0x0000000000513221 in qm_free (qm=<optimized out>, p=<optimized out>, file=file@entry=0x7f9f0b9acc9f \"statistics.c\",\r\n    func=func@entry=0x7f9f0b9accec <__FUNCTION__.8223> \"get_stat_name\", line=line@entry=401) at mem/q_malloc.c:453\r\n#3  0x00007f9f0b9abc9f in get_stat_name (stat=<synthetic pointer>, create=0, name=0x7f9f1449f800, msg=<optimized out>) at statistics.c:401\r\n#4  pv_get_stat (msg=<optimized out>, param=0x7f9f1449f800, res=0x7fff05756c80) at statistics.c:442\r\n#5  0x0000000000478e3c in pv_get_spec_value (msg=<optimized out>, sp=0x7f9f1449f7e8, value=0x7fff05756c80) at pvar.c:3910\r\n#6  0x000000000047df56 in pv_printf (msg=0x0, list=0x7f9f1449f7d8, buf=0x7f9f144b6e60 \"\", len=0x7fff05756ce0) at pvar.c:3986\r\n#7  0x000000000051037c in xl_print_log (len=<optimized out>, list=<optimized out>, msg=<optimized out>) at xlog.c:67\r\n#8  xlog_1 (msg=0x7f9f144b9ec8, frm=0x7f9f1449f7d8 \"`8F\\024\\237\\177\", str2=0x6 <error: Cannot access memory at address 0x6>) at xlog.c:116\r\n#9  0x000000000041eb56 in do_action (a=a@entry=0x7f9f14463940, msg=msg@entry=0x7f9f144b9ec8) at action.c:1629\r\n#10 0x00000000004216dd in run_action_list (msg=<optimized out>, a=<optimized out>) at action.c:172\r\n#11 run_actions (msg=0x7f9f144b9ec8, a=<optimized out>) at action.c:137\r\n#12 run_top_route (a=<optimized out>, msg=msg@entry=0x7f9f144b9ec8) at action.c:212\r\n#13 0x000000000048a31b in receive_msg (buf=<optimized out>, len=<optimized out>, rcv_info=rcv_info@entry=0x7fff057574d0) at receive.c:172\r\n#14 0x000000000050932d in udp_rcv_loop () at udp_server.c:422\r\n#15 0x000000000041713f in main_loop () at main.c:929\r\n#16 main (argc=<optimized out>, argv=<optimized out>) at main.c:1613\r\n(gdb)\r\n\r\nThanks in advance\r\nFederico"},"comment":{"url":"https://api.github.com/repos/OpenSIPS/opensips/issues/comments/225203243","html_url":"https://github.com/OpenSIPS/opensips/issues/902#issuecomment-225203243","issue_url":"https://api.github.com/repos/OpenSIPS/opensips/issues/902","id":225203243,"user":{"login":"fedorna","id":19169002,"avatar_url":"https://avatars.githubusercontent.com/u/19169002?v=3","gravatar_id":"","url":"https://api.github.com/users/fedorna","html_url":"https://github.com/fedorna","followers_url":"https://api.github.com/users/fedorna/followers","following_url":"https://api.github.com/users/fedorna/following{/other_user}","gists_url":"https://api.github.com/users/fedorna/gists{/gist_id}","starred_url":"https://api.github.com/users/fedorna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fedorna/subscriptions","organizations_url":"https://api.github.com/users/fedorna/orgs","repos_url":"https://api.github.com/users/fedorna/repos","events_url":"https://api.github.com/users/fedorna/events{/privacy}","received_events_url":"https://api.github.com/users/fedorna/received_events","type":"User","site_admin":false},"created_at":"2016-06-10T14:49:22Z","updated_at":"2016-06-10T14:49:22Z","body":"Hi  @bogdan-iancu , thanks for you quick response! \r\n\r\nJust in case, I've just installed it again from scratch, this are the steps I've done:\r\n\r\ngc@toro:~/sources$ git clone https://github.com/OpenSIPS/opensips.git -b 1.11 opensips_1_11\r\n\r\nmake menuconfig -> enable regex, db_postgres and event_rabbitmq (by default excluded modules). Check USE_TLS, check DBG_QM_MALLOC, uncheck F_MALLOC\r\n\r\ngc@toro:~/sources/opensips_1_11$ make prefix=/home/gc/local/opensips/ all\r\ngc@toro:~/sources/opensips_1_11$ make prefix=/home/gc/local/opensips/ install\r\n\r\nOur opensips is working as a proxy/load balancer, but doing the REGISTER with auth/auth_db modules.\r\n\r\nThis is the output you asked:\r\n\r\nversion: opensips 1.11.7-tls (x86_64/linux)\r\nflags: STATS: On, USE_IPV6, USE_TCP, USE_TLS, DISABLE_NAGLE, USE_MCAST, SHM_MEM, SHM_MMAP, PKG_MALLOC, DBG_QM_MALLOC, FAST_LOCK-ADAPTIVE_WAIT\r\nADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535\r\npoll method support: poll, epoll_lt, epoll_et, sigio_rt, select.\r\ngit revision: f923d2f\r\nmain.c compiled on 11:30:40 Jun 10 2016 with gcc 4.8\r\n\r\nIf compiled with DBG_QM_MALLOC option, the crash goes after a REGISTER. If compiled with F_MALLOC (default), the crash is after an INVITE.\r\n\r\nMany Thanks!\r\nFederico"}}
{"actor":{"display_login":"fedorna"}}