[OpenSIPS-Users] db_mysql error, crash
Jacek Konieczny
jajcus at jajcus.net
Fri Mar 27 09:06:39 CET 2009
Hello,
On Wed, Mar 25, 2009 at 09:36:42AM -0400, Jeff Pyle wrote:
> I woke up this morning to this on Opensips 1.5.0:
The log:
Mar 27 08:22:52 gtw1-ms opensips[14929]: ERROR:core:re_init_statement: failed while mysql_stmt_prepare: Unknown prepared statement handler (3) given to mysql_stmt_close
Mar 27 08:22:52 gtw1-ms opensips[14929]: ERROR:core:db_mysql_do_prepared_query: failed to re-init statement!
Mar 27 08:22:52 gtw1-ms opensips[14929]: ERROR:core:acc_db_request: failed to insert into database
Then two requests handled and:
Mar 27 08:23:14 gtw1-ms opensips[14949]: CRITICAL:core:receive_fd: EOF on 10
Mar 27 08:23:14 gtw1-ms opensips[14914]: INFO:core:handle_sigs: child process 14931 exited by a signal 11
Mar 27 08:23:14 gtw1-ms opensips[14914]: INFO:core:handle_sigs: core was generated
Mar 27 08:23:14 gtw1-ms opensips[14914]: INFO:core:handle_sigs: terminating due to SIGCHLD
Mar 27 08:23:14 gtw1-ms opensips[14925]: INFO:core:sig_usr: signal 15 received
Mar 27 08:23:14 gtw1-ms opensips[14937]: INFO:core:sig_usr: signal 15 received
And what GDB shows on the core file:
Core was generated by `opensips'.
Program terminated with signal 11, Segmentation fault.
#0 0xb7b673bd in mysql_stmt_result_metadata (stmt=0x828cb50) at libmysql.c:2254
2254 result->methods= stmt->mysql->methods;
(gdb) bt
#0 0xb7b673bd in mysql_stmt_result_metadata (stmt=0x828cb50) at libmysql.c:2254
#1 0xb7cb6f43 in db_mysql_do_prepared_query (conn=0x8191f38, query=0xb7ccdf08, v=0xbfde5608, n=1, uv=0x0,
un=0) at dbase.c:432
#2 0xb7cb84a7 in db_mysql_query (_h=0x8191f38, _k=0xbfde5638, _op=0x0, _v=0xbfde5608, _c=0x8195ed0, _n=1,
_nc=2, _o=0x0, _r=0xbfde5654) at dbase.c:676
#3 0xb79d6e72 in authorize (_m=0x8194948, _realm=<value optimized out>, _table=<value optimized out>,
_hftype=HDR_AUTHORIZATION_T) at authorize.c:107
#4 0x08054ba3 in do_action (a=0x8183a60, msg=0x8194948) at action.c:962
#5 0x08053903 in run_action_list (a=0x8183a60, msg=0x8194948) at action.c:139
#6 0x08096a57 in eval_expr (e=0x8183ac8, msg=0x8194948, val=0x0) at route.c:1189
#7 0x080965c5 in eval_expr (e=0x8183af0, msg=0x8194948, val=0x0) at route.c:1502
#8 0x08096602 in eval_expr (e=0x8183b18, msg=0x8194948, val=0x0) at route.c:1507
#9 0x08054bd2 in do_action (a=0x8184460, msg=0x8194948) at action.c:689
#10 0x08053903 in run_action_list (a=0x8184460, msg=0x8194948) at action.c:139
#11 0x080571c9 in do_action (a=0x81844c8, msg=0x8194948) at action.c:712
#12 0x08053903 in run_action_list (a=0x8182c80, msg=0x8194948) at action.c:139
#13 0x08057f27 in run_top_route (a=0x8182c80, msg=0x8194948) at action.c:119
#14 0x0808b951 in receive_msg (
buf=0x8157be0 "REGISTER sip:sip-gtw1.axeos.nl SIP/2.0\r\nVia: SIP/2.0/UDP 83.98.196.74:5060;branch=z9hG4bK4aa5f9e2;rport\r\nFrom: <sip:demo2_pbx at sip-gtw1.axeos.nl>;tag=as14f8aa61\r\nTo: <sip:demo2_pbx at sip-gtw1.axeos.nl>\r\n"..., len=671, rcv_info=0xbfde6544) at receive.c:165
#15 0x080bf625 in udp_rcv_loop () at udp_server.c:449
#16 0x08069e99 in main (argc=1, argv=0xbfde6704) at main.c:779
(gdb) print stmt->mysql
$2 = (MYSQL *) 0x0
(gdb) up
#1 0xb7cb6f43 in db_mysql_do_prepared_query (conn=0x8191f38, query=0xb7ccdf08, v=0xbfde5608, n=1, uv=0x0, un=0) at dbase.c:432
432 CON_RESULT(conn) = mysql_stmt_result_metadata(ctx->stmt);
Greets,
Jacek
More information about the Users
mailing list