[OpenSIPS-Devel] [opensips] Core dump at db_mysql (#186)

2014-03-26 Thread apsaras
Hello

I have a fully updated Centos 5 64Bit and playing around with 1.11 Beta. I am 
using MySQL as back end version 5.5.36 and I get the following during start up 
of opensips

Mar 26 23:02:51 [32162] DBG:db_mysql:db_mysql_connect: server version is 
5.5.36-log
Mar 26 23:02:51 [32162] DBG:core:db_do_init: connection 0x2b43f21af968 inserted 
in pool as 0x2b43f21afb10
Mar 26 23:02:51 [32162] DBG:db_mysql:mysql_raise_event: MySQL status has not 
changed: connected
Mar 26 23:02:51 [32162] DBG:core:db_new_result: allocate 48 bytes for result 
set at 0x2b43f21afb70
Mar 26 23:02:51 [32162] DBG:db_mysql:db_mysql_get_columns: 1 columns returned 
from the query
Mar 26 23:02:51 [32162] DBG:core:db_allocate_columns: allocate 28 bytes for 
result columns at 0x2b43f21afbb8
Mar 26 23:02:51 [32162] DBG:db_mysql:db_mysql_get_columns: 
RES_NAMES(0x2b43f21afbc0)[0]=[table_version]
Mar 26 23:02:51 [32162] DBG:db_mysql:db_mysql_get_columns: use DB_INT result 
type
Mar 26 23:02:51 [32162] DBG:core:db_allocate_rows: allocate 48 bytes for result 
rows and values at 0x2b43f21da9a8
Mar 26 23:02:51 [32162] DBG:db_mysql:db_mysql_str2val: converting INT [9]
Mar 26 23:02:51 [32162] DBG:core:db_free_columns: freeing result columns at 
0x2b43f21afbb8
Mar 26 23:02:51 [32162] DBG:core:db_free_rows: freeing 1 rows
Mar 26 23:02:51 [32162] DBG:core:db_free_row: freeing row values at 
0x2b43f21da9b8
Mar 26 23:02:51 [32162] DBG:core:db_free_rows: freeing rows at 0x2b43f21da9a8
Mar 26 23:02:51 [32162] DBG:core:db_free_result: freeing result set at 
0x2b43f21afb70
Mar 26 23:02:51 [32162] DBG:db_mysql:mysql_raise_event: MySQL status has not 
changed: connected
Mar 26 23:02:51 [32162] DBG:core:db_new_result: allocate 48 bytes for result 
set at 0x2b43f21afb70
Mar 26 23:02:51 [32162] DBG:db_mysql:db_mysql_get_columns: 25 columns returned 
from the query
Mar 26 23:02:51 [32162] DBG:core:db_allocate_columns: allocate 700 bytes for 
result columns at 0x2b43f21da9f0
Mar 26 23:02:51 [32162] DBG:db_mysql:db_mysql_get_columns: 
RES_NAMES(0x2b43f21daab8)[0]=[dlg_id]
Mar 26 23:02:51 [32162] DBG:db_mysql:db_mysql_get_columns: use DB_BIGINT result 
type
Segmentation fault (core dumped)

Thank you for your help

---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/issues/186___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


Re: [OpenSIPS-Devel] [opensips] Core dump at db_mysql (#186)

2014-03-26 Thread Ovidiu Sas
Make sure that you use the latest version of opensips from git.
It seems that you have a core file.
Get the output of the core file:
http://www.opensips.org/Documentation/TroubleShooting-Crash

Regards,
Ovidiu Sas


On Wed, Mar 26, 2014 at 5:13 PM, apsaras  wrote:

> Hello
>
> I have a fully updated Centos 5 64Bit and playing around with 1.11 Beta. I
> am using MySQL as back end version 5.5.36 and I get the following during
> start up of opensips
>
> Mar 26 23:02:51 [32162] DBG:db_mysql:db_mysql_connect: server version is
> 5.5.36-log
> Mar 26 23:02:51 [32162] DBG:core:db_do_init: connection 0x2b43f21af968
> inserted in pool as 0x2b43f21afb10
> Mar 26 23:02:51 [32162] DBG:db_mysql:mysql_raise_event: MySQL status has
> not changed: connected
> Mar 26 23:02:51 [32162] DBG:core:db_new_result: allocate 48 bytes for
> result set at 0x2b43f21afb70
> Mar 26 23:02:51 [32162] DBG:db_mysql:db_mysql_get_columns: 1 columns
> returned from the query
> Mar 26 23:02:51 [32162] DBG:core:db_allocate_columns: allocate 28 bytes
> for result columns at 0x2b43f21afbb8
> Mar 26 23:02:51 [32162] DBG:db_mysql:db_mysql_get_columns:
> RES_NAMES(0x2b43f21afbc0)[0]=[table_version]
> Mar 26 23:02:51 [32162] DBG:db_mysql:db_mysql_get_columns: use DB_INT
> result type
> Mar 26 23:02:51 [32162] DBG:core:db_allocate_rows: allocate 48 bytes for
> result rows and values at 0x2b43f21da9a8
> Mar 26 23:02:51 [32162] DBG:db_mysql:db_mysql_str2val: converting INT [9]
> Mar 26 23:02:51 [32162] DBG:core:db_free_columns: freeing result columns
> at 0x2b43f21afbb8
> Mar 26 23:02:51 [32162] DBG:core:db_free_rows: freeing 1 rows
> Mar 26 23:02:51 [32162] DBG:core:db_free_row: freeing row values at
> 0x2b43f21da9b8
> Mar 26 23:02:51 [32162] DBG:core:db_free_rows: freeing rows at
> 0x2b43f21da9a8
> Mar 26 23:02:51 [32162] DBG:core:db_free_result: freeing result set at
> 0x2b43f21afb70
> Mar 26 23:02:51 [32162] DBG:db_mysql:mysql_raise_event: MySQL status has
> not changed: connected
> Mar 26 23:02:51 [32162] DBG:core:db_new_result: allocate 48 bytes for
> result set at 0x2b43f21afb70
> Mar 26 23:02:51 [32162] DBG:db_mysql:db_mysql_get_columns: 25 columns
> returned from the query
> Mar 26 23:02:51 [32162] DBG:core:db_allocate_columns: allocate 700 bytes
> for result columns at 0x2b43f21da9f0
> Mar 26 23:02:51 [32162] DBG:db_mysql:db_mysql_get_columns:
> RES_NAMES(0x2b43f21daab8)[0]=[dlg_id]
> Mar 26 23:02:51 [32162] DBG:db_mysql:db_mysql_get_columns: use DB_BIGINT
> result type
> Segmentation fault (core dumped)
>
> Thank you for your help
>
> --
> Reply to this email directly or view it on 
> GitHub
> .
>
> ___
> Devel mailing list
> Devel@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
>
>


-- 
VoIP Embedded, Inc.
http://www.voipembedded.com
___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


Re: [OpenSIPS-Devel] [opensips] Core dump at db_mysql (#186)

2014-03-26 Thread apsaras
(gdb) bt full
#0  0x2b43f23b3d99 in db_mysql_get_columns (_h=, 
_r=0x2b43f21afb70) at res.c:71
col = 1
fields = 
__FUNCTION__ = "db_mysql_get_columns"
#1  0x2b43f23aca49 in db_mysql_fetch_result (_h=0x2b43f21af9e8, 
_r=0x7fffd5e778f0, nrows=236) at dbase.c:986
rows = 
i = 
__FUNCTION__ = "db_mysql_fetch_result"
#2  0x2b43f376e9ec in select_entire_dialog_table (res=0x7fffd5e778f0, 
no_rows=0x7fffd5e778fc) at dlg_db_handler.c:263
query_cols = {0x2b43f39bbdb0, 0x2b43f39bbdc0, 0x2b43f39bbdd0, 
0x2b43f39bbde0, 0x2b43f39bbdf0, 0x2b43f39bbe00, 0x2b43f39bbe20, 0x2b43f39bbe10,
  0x2b43f39bbe30, 0x2b43f39bbe50, 0x2b43f39bbe40, 0x2b43f39bbe90, 
0x2b43f39bbe80, 0x2b43f39bbeb0, 0x2b43f39bbea0, 0x2b43f39bbed0, 0x2b43f39bbec0,
  0x2b43f39bbf00, 0x2b43f39bbf10, 0x2b43f39bbf20, 0x2b43f39bbe70, 
0x2b43f39bbe60, 0x2b43f39bbf30, 0x2b43f39bbee0, 0x2b43f39bbef0}
__FUNCTION__ = "select_entire_dialog_table"
#3  0x2b43f3771686 in load_dialog_info_from_db (db_url=0x2b43f39bc0d0, 
dlg_hash_size=, db_update_period=60) at 
dlg_db_handler.c:512
__FUNCTION__ = "load_dialog_info_from_db"
#4  init_dlg_db (db_url=0x2b43f39bc0d0, dlg_hash_size=, 
db_update_period=60) at dlg_db_handler.c:209
__FUNCTION__ = "init_dlg_db"
#5  0x2b43f3765ee2 in mod_init () at dialog.c:823
n = 
__FUNCTION__ = "mod_init"
#6  0x0048f102 in init_mod (m=0x2b43f21b0c88) at sr_module.c:459
__FUNCTION__ = "init_mod"
#7  0x0048f07f in init_mod (m=0x2b43f21b1100) at sr_module.c:454
__FUNCTION__ = "init_mod"
#8  0x0048f07f in init_mod (m=0x2b43f21b11d0) at sr_module.c:454
__FUNCTION__ = "init_mod"
#9  0x0048f07f in init_mod (m=0x2b43f21b12a0) at sr_module.c:454
__FUNCTION__ = "init_mod"
#10 0x0048f07f in init_mod (m=0x2b43f21b1370) at sr_module.c:454
__FUNCTION__ = "init_mod"
#11 0x0048f07f in init_mod (m=0x2b43f21b1440) at sr_module.c:454
__FUNCTION__ = "init_mod"
#12 0x0048f07f in init_mod (m=0x2b43f21b1510) at sr_module.c:454
__FUNCTION__ = "init_mod"
#13 0x0048f07f in init_mod (m=0x2b43f21b15e0) at sr_module.c:454
__FUNCTION__ = "init_mod"
#14 0x0048f07f in init_mod (m=0x2b43f21b16b0) at sr_module.c:454
__FUNCTION__ = "init_mod"
#15 0x0048f07f in init_mod (m=0x2b43f21b1780) at sr_module.c:454
__FUNCTION__ = "init_mod"
#16 0x0048f07f in init_mod (m=0x2b43f21b1850) at sr_module.c:454
__FUNCTION__ = "init_mod"
#17 0x0048f07f in init_mod (m=0x2b43f21b1920) at sr_module.c:454
__FUNCTION__ = "init_mod"
---Type  to continue, or q  to quit---
#18 0x0048f07f in init_mod (m=0x2b43f21b19f0) at sr_module.c:454
__FUNCTION__ = "init_mod"
#19 0x0048f07f in init_mod (m=0x2b43f21b1ac0) at sr_module.c:454
__FUNCTION__ = "init_mod"
#20 0x0048f07f in init_mod (m=0x2b43f21b1b90) at sr_module.c:454
__FUNCTION__ = "init_mod"
#21 0x00438178 in main (argc=, argv=0x7da2) at 
main.c:1574
cfg_log_stderr = 0
cfg_stream = 0x17f855e0
c = 
r = 
tmp = 0x55f037 "H\215\005\302\037%"
tmp_len = 
port = 0
proto = -706249344
ret = 
seed = 2606154063
rfd = 
__FUNCTION__ = "main"


---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/issues/186#issuecomment-38741216___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


Re: [OpenSIPS-Devel] [opensips] Core dump at db_mysql (#186)

2014-03-26 Thread Ovidiu Sas
Do you have the latest version from git?
Please print out the output of: opensips -V
There were some fixes related to memory a while ago and you need to make
sure that you have them.
See commit 22ca1a66d4811c620d32a1058e95f605a57ebfb3

Regards,
Ovidiu Sas
___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


Re: [OpenSIPS-Devel] [opensips] Core dump at db_mysql (#186)

2014-03-26 Thread apsaras
I just downloaded opensips_head and tested. I have the same issue

version: opensips 1.12.0dev-tls (x86_64/linux)
flags: STATS: On, USE_IPV6, USE_TCP, USE_TLS, DISABLE_NAGLE, USE_MCAST, 
SHM_MEM, 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.
git revision: ff937c8
@(#) $Id$
main.c compiled on 23:25:29 Mar 26 2014 with gcc 4.1.2

I can test with 1.11 if you want.

---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/issues/186#issuecomment-38742469___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


Re: [OpenSIPS-Devel] [opensips] Core dump at db_mysql (#186)

2014-03-26 Thread apsaras
The same issue with latest 1.11

version: opensips 1.11.0beta-tls (x86_64/linux)
flags: STATS: On, USE_IPV6, USE_TCP, USE_TLS, DISABLE_NAGLE, USE_MCAST, 
SHM_MEM, 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.
git revision: fad3491
@(#) $Id$
main.c compiled on 23:38:17 Mar 26 2014 with gcc 4.1.2


---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/issues/186#issuecomment-38743929___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


Re: [OpenSIPS-Devel] [opensips] Core dump at db_mysql (#186)

2014-03-26 Thread Ovidiu Sas
Please post the output of bt full somewhere on pastebin (one week
expiration).
Github messed up the output.
Please print also the value of fields[1].

Regards,
Ovidiu Sas


On Wed, Mar 26, 2014 at 5:43 PM, apsaras  wrote:

> The same issue with latest 1.11
>
> version: opensips 1.11.0beta-tls (x86_64/linux)
>
> flags: STATS: On, USE_IPV6, USE_TCP, USE_TLS, DISABLE_NAGLE, USE_MCAST,
> SHM_MEM, 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.
> git revision: fad3491
> @(#) $Id$
> main.c compiled on 23:38:17 Mar 26 2014 with gcc 4.1.2
>
> --
> Reply to this email directly or view it on 
> GitHub
> .
>
> ___
> Devel mailing list
> Devel@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
>
>


-- 
VoIP Embedded, Inc.
http://www.voipembedded.com
___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


Re: [OpenSIPS-Devel] [opensips] Core dump at db_mysql (#186)

2014-03-27 Thread Liviu Chircu
Do you start OpenSIPS with the default packaged memory size? (i.e. no "-M" 
parameter)

If yes, did you happen to have a full dialog table when you started? Do you see 
any errors in the OpenSIPS logs?

The latest memory fixes of today did not cover the standard memory allocators, 
as they behaved very well with my tests, at least. So we need to look at the 
problem from all sides.

Liviu

---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/issues/186#issuecomment-38839440___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


Re: [OpenSIPS-Devel] [opensips] Core dump at db_mysql (#186)

2014-03-27 Thread Bogdan Andrei IANCU
@apsaras, could you please, in frame 0, print fields[1] and *_r also ?

Thanks and regards,
Bogdan

---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/issues/186#issuecomment-38840083___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


Re: [OpenSIPS-Devel] [opensips] Core dump at db_mysql (#186)

2014-03-27 Thread apsaras
Hello Liviuchircu
No startup options
Fresh setup, no data in the database
That is what I get at log
Mar 27 21:53:07 sip kernel: opensips[727]: segfault at  rip 
2ad6859ced99 rsp 74511cd0 error 4

Hello Bogdan
How can I do that?

---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/issues/186#issuecomment-38852512___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


Re: [OpenSIPS-Devel] [opensips] Core dump at db_mysql (#186)

2014-03-27 Thread Liviu Chircu
Go to frame zero with:

frame 0

Print useful stuff with:

print fields[1]
print *_r

---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/issues/186#issuecomment-38857028___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


Re: [OpenSIPS-Devel] [opensips] Core dump at db_mysql (#186)

2014-03-27 Thread apsaras
(gdb) frame 0
#0  0x2b0f5e34fd99 in db_mysql_get_columns (_h=, 
_r=0x2b0f5e14bb70) at res.c:71
71  RES_NAMES(_r)[col]->len = strlen(fields[col].name);
(gdb) print fields[1]
Cannot access memory at address 0x78
(gdb) print *_r
$1 = {col = {names = 0x2b0f5e1769f0, types = 0x2b0f5e176c48, n = 25}, rows = 
0x0, n = 0, res_rows = 0, last_row = 0}


---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/issues/186#issuecomment-38857636___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


Re: [OpenSIPS-Devel] [opensips] Core dump at db_mysql (#186)

2014-04-06 Thread Bogdan Andrei IANCU
@apsaras let's go via the easy way - it is possible to get access to the 
machine where the crash happens ?  to investigate and eventually troubleshoot 
in a much faster way...

If possible, please send me the access info off line via email.

---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/issues/186#issuecomment-39666702___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


Re: [OpenSIPS-Devel] [opensips] Core dump at db_mysql (#186)

2014-04-06 Thread apsaras
Yes I can. I will drop you a message on Skype in a minute.

---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/issues/186#issuecomment-39667542___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


Re: [OpenSIPS-Devel] [opensips] Core dump at db_mysql (#186)

2014-04-22 Thread Bogdan Andrei IANCU
Just to update you all - this seems to be a build bug (or something really 
related to that machine) as large portions for memory are corrupted. It is not 
really DB related or so
@razvancrainea is still digging into it to see if we can get to the bottom of 
it.

---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/issues/186#issuecomment-41080418___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


Re: [OpenSIPS-Devel] [opensips] Core dump at db_mysql (#186)

2015-05-07 Thread Bogdan Andrei IANCU
Closed #186.

---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/issues/186#event-299132059___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel