MySQL Forums
Forum List  »  Connector/C++

Mysql C++ connector crash issues
Posted by: santhosh edukulla
Date: November 23, 2012 07:12AM

Team,

I am trying to use mysqlclient version 16 and Mysql c++ connector to connect to the Mysql database and perform some DB operations. The code for our product relying on these libraries is already written. Mysql Server version 5.1.56. I could see that it is crashing at various occasions.

Below are few crash dumps. Any idea why these are happening? Typically during close connection and create connection.
1/ For close connection, Iam using mSqlCon->close()
2/ For create connection iam using some thing like below:
driver = get_driver_instance();
mSqlCon = driver->connect( connection_properties );

mSqlCon is of type sql::Connection *. Any help is appreciated!!


#0 0x00007f82b4f064ff in ?? () from /usr/local/lib64/mysql/libmysqlclient.so.16
#1 0x00007f82b4f06758 in net_real_write () from /usr/local/lib64/mysql/libmysqlclient.so.16
#2 0x00007f82b4f06c3b in net_flush () from /usr/local/lib64/mysql/libmysqlclient.so.16
#3 0x00007f82b4f03279 in mysql_real_connect () from /usr/local/lib64/mysql/libmysqlclient.so.16
#4 0x00007f82b4a630d7 in sql::mysql::NativeAPI::LibmysqlStaticProxy::real_connect (this=<value optimized out>, mysql=0x7f82ac041680,
host=0x7f82ac053d80 "K", user=0x4f <Address 0x4f out of bounds>, passwd=0x0, db=0x35a5d367fc14006c <Address 0x35a5d367fc14006c out of bounds>,
port=3306, unix_socket=0x7f82ac041680 "\a", client_flag=140199208425088)
at /export/home2/tmp/cteam/bs/connector-c++-64bit/src/mysql-connector-c++-1.1.1/driver/nativeapi/libmysql_static_proxy.cpp:316
#5 0x00007f82b4a649a9 in sql::mysql::NativeAPI::MySQL_NativeConnectionWrapper::connect (this=0x7f82ac0d22d0, host=<value optimized out>,
user=<value optimized out>, passwd=<value optimized out>, db=<value optimized out>, port=<value optimized out>, socket_or_pipe=...,
client_flag=140199208425088) at /build/cteam/bs/linux-x86_64/connector-common-alt-64bit/boost/include/boost-1_39/boost/smart_ptr/shared_ptr.hpp:408
#6 0x00007f82b49f8ebe in sql::mysql::MySQL_Connection::init (this=0x7f82ac0d3740, properties=...)
at /export/home2/tmp/cteam/bs/connector-c++-64bit/src/mysql-connector-c++-1.1.1/driver/mysql_uri.h:51
#7 0x00007f82b49f57b3 in MySQL_Connection (this=0x7f82ac0d3740, _driver=<value optimized out>, _proxy=<value optimized out>, properties=...)
at /export/home2/tmp/cteam/bs/connector-c++-64bit/src/mysql-connector-c++-1.1.1/driver/mysql_connection.cpp:141
#8 0x00007f82b4a062cd in sql::mysql::MySQL_Driver::connect (this=0x7f82ac0466e0, properties=...)
at /build/cteam/bs/linux-x86_64/connector-common-alt-64bit/boost/include/boost-1_39/boost/smart_ptr/scoped_ptr.hpp:96


#0 0x00007fbf785e7745 in free () from /lib64/libc.so.6
#1 0x00007fbf79b49224 in __gnu_cxx::new_allocator<sql::mysql::MySQL_DebugEnterEvent const*>::deallocate (this=<value optimized out>,
__nstart=0x7fbf740dbc76, __nfinish=0x7fbf740dbc80) at /usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/ext/new_allocator.h:86
#2 std::_Deque_base<sql::mysql::MySQL_DebugEnterEvent const*, std::allocator<sql::mysql::MySQL_DebugEnterEvent const*> >::_M_deallocate_node (
this=<value optimized out>, __nstart=0x7fbf740dbc76, __nfinish=0x7fbf740dbc80)
at /export/home2/tmp/cteam/bs/connector-c++-64bit/src/mysql-connector-c++-1.1.1/driver/mysql_debug.cpp:401
#3 std::_Deque_base<sql::mysql::MySQL_DebugEnterEvent const*, std::allocator<sql::mysql::MySQL_DebugEnterEvent const*> >::_M_destroy_nodes (
this=<value optimized out>, __nstart=0x7fbf740dbc76, __nfinish=0x7fbf740dbc80)
at /export/home2/tmp/cteam/bs/connector-c++-64bit/src/mysql-connector-c++-1.1.1/driver/mysql_debug.cpp:497
#4 0x00007fbf79b491d0 in ~_Deque_base (this=0x7fbf74049db00000, __in_chrg=<value optimized out>)
at /usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/bits/stl_deque.h:425
#5 0x00007fbf79b48def in ~MySQL_DebugLogger (this=0x7fbf740444d0, __in_chrg=<value optimized out>)
at /usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/bits/stl_deque.h:703
#6 0x00007fbf79b4829f in checked_delete<sql::mysql::MySQL_DebugLogger> (this=<value optimized out>)
at /build/cteam/bs/linux-x86_64/connector-common-alt-64bit/boost/include/boost-1_39/boost/checked_delete.hpp:34
#7 boost::detail::sp_counted_impl_p<sql::mysql::MySQL_DebugLogger>::dispose (this=<value optimized out>)
at /build/cteam/bs/linux-x86_64/connector-common-alt-64bit/boost/include/boost-1_39/boost/smart_ptr/detail/sp_counted_impl.hpp:78
#8 0x00007fbf79b3ae22 in ~MySQL_ConnectionData (this=0x7fbf740d6140, __in_chrg=<value optimized out>)
at /build/cteam/bs/linux-x86_64/connector-common-alt-64bit/boost/include/boost-1_39/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp:145
#9 ~MySQL_Connection (this=0x7fbf740d6140, __in_chrg=<value optimized out>)
at /export/home2/tmp/cteam/bs/connector-c++-64bit/src/mysql-connector-c++-1.1.1/driver/mysql_connection.cpp:162

Thanks!
Santhosh

Options: ReplyQuote


Subject
Views
Written By
Posted
Mysql C++ connector crash issues
4049
November 23, 2012 07:12AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.