List:MySQL ODBC« Previous MessageNext Message »
From:Simon Walter Date:June 4 2012 2:33am
Subject:SIGABRT & SIGSEGV when using libmyodbc
View as plain text  
Hi all,

I'm using libodbc++ which in turn uses libmyodbc. I've had no problems 
with connecting to localhost. However, when I switched to production and 
the mysql server is no local, my c++ application crashes with either 
SIGABRT or SIGSEGV. I'm attaching both back traces. It seems they are 
related and the issue is with /usr/lib/libmysqlclient_r.so.16.

I'm running Debian 6.0.4.
localhost: mysql  Ver 14.14 Distrib 5.1.61, for debian-linux-gnu (i486) 
using readline 6.1
remote host: mysql  Ver 14.14 Distrib 5.1.50, for pc-linux-gnu (x86_64) 
using readline 5.1

I think it is a threading problem as connecting to localhost on the dev 
server is very quick. However, connecting to a remote server takes more 
time and therefore we can see the issue surface.

Any comments or suggestions are welcome.

Thank you,

Simon


-- 
simonsmicrophone.com


*** glibc detected *** /home/weelz/htserve/trunk/htserve: corrupted double-linked list:
0x082b8198 ***
======= Backtrace: =========
/lib/i686/cmov/libc.so.6(+0x6b381)[0xb7cea381]
/lib/i686/cmov/libc.so.6(+0x6e51f)[0xb7ced51f]
/lib/i686/cmov/libc.so.6(__libc_malloc+0x5c)[0xb7ceed8c]
/usr/lib/libmysqlclient_r.so.16(my_malloc+0x2d)[0xac84f7cd]
/usr/lib/odbc/libmyodbc.so(SQLDriverConnect+0x91)[0xaca0d3f1]
/usr/lib/libodbc.so.1(SQLDriverConnect+0x312)[0xb5a795f2]
/usr/local/lib/libodbc++-mt.so.4(_ZN4odbc10Connection8_connectERKSst+0x5f)[0xb5baa3ff]
/usr/local/lib/libodbc++-mt.so.4(_ZN4odbc13DriverManager13getConnectionERKSs+0x45)[0xb5ba7015]
/home/weelz/htserve/trunk/./services/RestService.so(_ZN13AgentportalDB13getConnectionEv+0x21)[0xb60c1585]
/home/weelz/htserve/trunk/./services/RestService.so(_ZN13AgentportalDB7getUserEi+0x86)[0xb60c087a]
/home/weelz/htserve/trunk/./services/RestService.so(_ZN4pion7plugins11RestService7getUserEiSs+0x38)[0xb607c730]
/home/weelz/htserve/trunk/./services/RestService.so(_ZN4pion7plugins11RestServiceclERN5boost10shared_ptrINS_3net11HTTPRequestEEERNS3_INS4_13TCPConnectionEEE+0x5b9)[0xb607aef1]
/usr/local/lib/libpion-net-4.0.so(_ZN5boost6detail8function26void_function_ref_invoker2IN4pion3net10WebServiceEvRNS_10shared_ptrINS4_11HTTPRequestEEERNS6_INS4_13TCPConnectionEEEE6invokeERNS1_15function_bufferES9_SC_+0x21)[0xb7f7f4a1]
/usr/local/lib/libpion-net-4.0.so(_ZNK5boost9function2IvRNS_10shared_ptrIN4pion3net11HTTPRequestEEERNS1_INS3_13TCPConnectionEEEEclES6_S9_+0x3a)[0xb7f6b15a]
/usr/local/lib/libpion-net-4.0.so(_ZN4pion3net10HTTPServer13handleRequestERN5boost10shared_ptrINS0_11HTTPRequestEEERNS3_INS0_13TCPConnectionEEERKNS2_6system10error_codeE+0x84c)[0xb7f61fbc]
/usr/local/lib/libpion-net-4.0.so(_ZN5boost6detail8function26void_function_obj_invoker3INS_3_bi6bind_tIvNS_4_mfi3mf3IvN4pion3net10HTTPServerERNS_10shared_ptrINS8_11HTTPRequestEEERNSA_INS8_13TCPConnectionEEERKNS_6system10error_codeEEENS3_5list4INS3_5valueIPS9_EENS_3argILi1EEENSQ_ILi2EEENSQ_ILi3EEEEEEEvSC_SF_SK_E6invokeERNS1_15function_bufferESC_SF_SK_+0x32)[0xb7f65192]
/usr/local/lib/libpion-net-4.0.so(_ZN4pion3net17HTTPRequestReader15finishedReadingERKN5boost6system10error_codeE+0xb2)[0xb7f6b242]
/usr/local/lib/libpion-net-4.0.so(_ZN4pion3net10HTTPReader12consumeBytesEv+0x58d)[0xb7f5e11d]
/usr/local/lib/libpion-net-4.0.so(_ZN4pion3net10HTTPReader12consumeBytesERKN5boost6system10error_codeEj+0x3f7)[0xb7f5ea37]
/usr/local/lib/libpion-net-4.0.so(_ZN5boost4asio6detail23reactive_socket_recv_opINS0_17mutable_buffers_1ENS_3_bi6bind_tIvNS_4_mfi3mf2IvN4pion3net10HTTPReaderERKNS_6system10error_codeEjEENS4_5list3INS4_5valueINS_10shared_ptrINS9_17HTTPRequestReaderEEEEEPFNS_3argILi1EEEvEPFNSM_ILi2EEEvEEEEEE11do_completeEPNS1_15task_io_serviceEPNS1_25task_io_service_operationESE_j+0xd6)[0xb7f66af6]
/usr/local/lib/libpion-net-4.0.so(_ZN5boost4asio6detail13epoll_reactor16descriptor_state11do_completeEPNS1_15task_io_serviceEPNS1_25task_io_service_operationERKNS_6system10error_codeEj+0x1a0)[0xb7f405e0]
/usr/local/lib/libpion-common-4.0.so(_ZN5boost4asio6detail15task_io_service3runERNS_6system10error_codeE+0x45b)[0xb7fca30b]
/usr/local/lib/libpion-common-4.0.so(_ZN4pion13PionScheduler18processServiceWorkERN5boost4asio10io_serviceE+0x75)[0xb7fbfa65]
/usr/local/lib/libpion-common-4.0.so(_ZN5boost6detail11thread_dataINS_3_bi6bind_tIvNS_4_mfi3mf1IvN4pion13PionSchedulerERNS_4asio10io_serviceEEENS2_5list2INS2_5valueIPNS6_26PionSingleServiceSchedulerEEENS_17reference_wrapperIS9_EEEEEEE3runEv+0x38)[0xb7fc0938]
/usr/local/lib/libboost_thread.so.1.48.0(+0xc2a6)[0xb7c732a6]
/lib/i686/cmov/libpthread.so.0(+0x5955)[0xb7a2e955]
/lib/i686/cmov/libc.so.6(clone+0x5e)[0xb7d4b5ee]
======= Memory map: ========
08048000-08072000 r-xp 00000000 fe:00 3000983    /home/weelz/htserve/trunk/htserve
08072000-08073000 rw-p 00029000 fe:00 3000983    /home/weelz/htserve/trunk/htserve
08073000-0830d000 rw-p 00000000 00:00 0          [heap]
abe00000-abe21000 rw-p 00000000 00:00 0
abe21000-abf00000 ---p 00000000 00:00 0
abf58000-abfa6000 r-xp 00000000 fe:00 1051050    /usr/lib/odbc/libtdsodbc.so
abfa6000-abfa8000 rw-p 0004e000 fe:00 1051050    /usr/lib/odbc/libtdsodbc.so
abfa8000-abfb8000 r-xp 00000000 fe:00 3842765    /lib/i686/cmov/libresolv-2.11.3.so
abfb8000-abfb9000 r--p 00010000 fe:00 3842765    /lib/i686/cmov/libresolv-2.11.3.so
abfb9000-abfba000 rw-p 00011000 fe:00 3842765    /lib/i686/cmov/libresolv-2.11.3.so
abfba000-abfbc000 rw-p 00000000 00:00 0
abfbc000-abfc0000 r-xp 00000000 fe:00 3842780    /lib/i686/cmov/libnss_dns-2.11.3.so
abfc0000-abfc1000 r--p 00004000 fe:00 3842780    /lib/i686/cmov/libnss_dns-2.11.3.so
abfc1000-abfc2000 rw-p 00005000 fe:00 3842780    /lib/i686/cmov/libnss_dns-2.11.3.so
abfc2000-abfc3000 ---p 00000000 00:00 0
abfc3000-ac7c3000 rw-p 00000000 00:00 0
ac7c3000-ac7d1000 r-xp 00000000 fe:00 1097729    /usr/lib/libodbcinst.so.1.0.0
ac7d1000-ac7d2000 rw-p 0000d000 fe:00 1097729    /usr/lib/libodbcinst.so.1.0.0
ac7d2000-ac7db000 r-xp 00000000 fe:00 3842764    /lib/i686/cmov/libcrypt-2.11.3.so
ac7db000-ac7dc000 r--p 00008000 fe:00 3842764    /lib/i686/cmov/libcrypt-2.11.3.so
ac7dc000-ac7dd000 rw-p 00009000 fe:00 3842764    /lib/i686/cmov/libcrypt-2.11.3.so
ac7dd000-ac804000 rw-p 00000000 00:00 0
ac804000-ac9b7000 r-xp 00000000 fe:00 320529     /usr/lib/libmysqlclient_r.so.16.0.0
ac9b7000-ac9bb000 r--p 001b2000 fe:00 320529     /usr/lib/libmysqlclient_r.so.16.0.0
ac9bb000-aca00000 rw-p 001b6000 fe:00 320529     /usr/lib/libmysqlclient_r.so.16.0.0
aca00000-aca01000 rw-p 00000000 00:00 0
aca01000-aca34000 r-xp 00000000 fe:00 1049351    /usr/lib/odbc/libmyodbc.so
aca34000-aca40000 rw-p 00032000 fe:00 1049351    /usr/lib/odbc/libmyodbc.so
aca40000-aca4a000 r-xp 00000000 fe:00 3842766    /lib/i686/cmov/libnss_files-2.11.3.so
aca4a000-aca4b000 r--p 00009000 fe:00 3842766    /lib/i686/cmov/libnss_files-2.11.3.so
aca4b000-aca4c000 rw-p 0000a000 fe:00 3842766    /lib/i686/cmov/libnss_files-2.11.3.so
aca4c000-aca54000 r-xp 00000000 fe:00 3842759    /lib/i686/cmov/libnss_nis-2.11.3.so
aca54000-aca55000 r--p 00008000 fe:00 3842759    /lib/i686/cmov/libnss_nis-2.11.3.so
aca55000-aca56000 rw-p 00009000 fe:00 3842759    /lib/i686/cmov/libnss_nis-2.11.3.so
aca56000-aca69000 r-xp 00000000 fe:00 3842763    /lib/i686/cmov/libnsl-2.11.3.so
aca69000-aca6a000 r--p 00012000 fe:00 3842763    /lib/i686/cmov/libnsl-2.11.3.so
aca6a000-aca6b000 rw-p 00013000 fe:00 3842763    /lib/i686/cmov/libnsl-2.11.3.so
aca6b000-aca6d000 rw-p 00000000 00:00 0
aca6d000-aca73000 r-xp 00000000 fe:00 3842781    /lib/i686/cmov/libnss_compat-2.11.3.so
aca73000-aca74000 r--p 00006000 fe:00 3842781    /lib/i686/cmov/libnss_compat-2.11.3.so
aca74000-aca75000 rw-p 00007000 fe:00 3842781    /lib/i686/cmov/libnss_compat-2.11.3.so
aca7e000-aca7f000 rw-s 00000000 00:04 32769      /SYSV7900c942 (deleted)
aca7f000-aca80000 ---p 00000000 00:00 0
aca80000-ad280000 rw-p 00000000 00:00 0
ad280000-ad281000 ---p 00000000 00:00 0
ad281000-ada81000 rw-p 00000000 00:00 0
ada81000-ada82000 ---p 00000000 00:00 0
ada82000-ae282000 rw-p 00000000 00:00 0
ae282000-ae283000 ---p 00000000 00:00 0
ae283000-aea83000 rw-p 00000000 00:00 0
aea83000-aea84000 ---p 00000000 00:00 0
aea84000-af284000 rw-p 00000000 00:00 0
af284000-af285000 ---p 00000000 00:00 0
af285000-afa85000 rw-p 00000000 00:00 0
afa85000-afa86000 ---p 00000000 00:00 0
afa86000-b0286000 rw-p 00000000 00:00 0
b0286000-b0287000 ---p 00000000 00:00 0
b0287000-b59df000 rw-p 00000000 00:00 0
b59df000-b5a2d000 r-xp 00000000 fe:00 1131711   
/usr/local/share/pion/plugins/FileService.so
b5a2d000-b5a2f000 rw-p 0004e000 fe:00 1131711   
/usr/local/share/pion/plugins/FileService.so
b5a2f000-b5a5d000 r-xp 00000000 fe:00 1131708   
/usr/local/share/pion/plugins/LogService.so
b5a5d000-b5a5f000 rw-p 0002d000 fe:00 1131708   
/usr/local/share/pion/plugins/LogService.so
b5a5f000-b5a66000 r-xp 00000000 fe:00 325782     /usr/lib/libltdl.so.7.2.1
b5a66000-b5a67000 rw-p 00007000 fe:00 325782     /usr/lib/libltdl.so.7.2.1
b5a67000-b5ac8000 r-xp 00000000 fe:00 1097731    /usr/lib/libodbc.so.1.0.0
b5ac8000-b5acc000 rw-p 00061000 fe:00 1097731    /usr/lib/libodbc.so.1.0.0
b5acc000-b5acd000 rw-p 00000000 00:00 0
b5acd000-b5b8e000 r-xp 00000000 fe:00 3293278    /usr/local/lib/libboost_log.so.1.48.0
b5b8e000-b5b92000 rw-p 000c1000 fe:00 3293278    /usr/local/lib/libboost_log.so.1.48.0
b5b92000-b5be5000 r-xp 00000000 fe:00 336056     /usr/local/lib/libodbc++-mt.so.4.0.0
b5be5000-b5be6000 rw-p 00053000 fe:00 336056     /usr/local/lib/libodbc++-mt.so.4.0.0
b5beb000-b5bec000 r-xp 00000000 fe:00 1450303    /usr/lib/gconv/ISO8859-1.so
b5bec000-b5bed000 r--p 00001000 fe:00 1450303    /usr/lib/gconv/ISO8859-1.so
b5bed000-b5bee000 rw-p 00002000 fe:00 1450303    /usr/lib/gconv/ISO8859-1.so
b5bee000-b5bef000 rw-p 00000000 00:00 0
b5bef000-b65ce000 r-xp 00000000 fe:00 3302083   
/home/weelz/htserve/trunk/services/RestService.so
b65ce000-b65f3000 rw-p 009de000 fe:00 3302083   
/home/weelz/htserve/trunk/services/RestService.so
b65f3000-b6768000 r--p 00000000 fe:00 336038     /usr/lib/locale/locale-archive
b6768000-b676b000 rw-p 00000000 00:00 0
b676b000-b6772000 r-xp 00000000 fe:00 3842778    /lib/i686/cmov/librt-2.11.3.so
b6772000-b6773000 r--p 00006000 fe:00 3842778    /lib/i686/cmov/librt-2.11.3.so
b6773000-b6774000 rw-p 00007000 fe:00 3842778    /lib/i686/cmov/librt-2.11.3.so
b6774000-b6776000 r-xp 00000000 fe:00 3842760    /lib/i686/cmov/libdl-2.11.3.so
b6776000-b6777000 r--p 00001000 fe:00 3842760    /lib/i686/cmov/libdl-2.11.3.so
b6777000-b6778000 rw-p 00002000 fe:00 3842760    /lib/i686/cmov/libdl-2.11.3.so
b6778000-b6779000 rw-p 00000000 00:00 0
b6779000-b6789000 r-xp 00000000 fe:00 3825666    /lib/libbz2.so.1.0.4
b6789000-b678a000 rw-p 00010000 fe:00 3825666    /lib/libbz2.so.1.0.4
b678a000-b679d000 r-xp 00000000 fe:00 320590     /usr/lib/libz.so.1.2.3.4
b679d000-b679e000 rw-p 00013000 fe:00 320590     /usr/lib/libz.so.1.2.3.4
b679e000-b67b6000 r-xp 00000000 fe:00 3293276   
/usr/local/lib/libboost_iostreams.so.1.48.0
b67b6000-b67b7000 rw-p 00017000 fe:00 3293276   
/usr/local/lib/libboost_iostreams.so.1.48.0
Program received signal SIGABRT, Aborted.
[Switching to Thread 0xad27fb70 (LWP 30170)]
0xb7fe2424 in __kernel_vsyscall ()
(gdb)



[Switching to Thread 0xad27fb70 (LWP 30170)]
0xb7fe2424 in __kernel_vsyscall ()
(gdb) bt
#0  0xb7fe2424 in __kernel_vsyscall ()
#1  0xb7ca9781 in raise () from /lib/i686/cmov/libc.so.6
#2  0xb7cacbb2 in abort () from /lib/i686/cmov/libc.so.6
#3  0xb7ce0285 in ?? () from /lib/i686/cmov/libc.so.6
#4  0xb7cea381 in ?? () from /lib/i686/cmov/libc.so.6
#5  0xb7ced51f in ?? () from /lib/i686/cmov/libc.so.6
#6  0xb7ceed8c in malloc () from /lib/i686/cmov/libc.so.6
#7  0xac84f7cd in my_malloc () from /usr/lib/libmysqlclient_r.so.16
#8  0xaca0d3f1 in SQLDriverConnect () from /usr/lib/odbc/libmyodbc.so
#9  0xb5a795f2 in SQLDriverConnect () from /usr/lib/libodbc.so.1
#10 0xb5baa3ff in odbc::Connection::_connect (this=0x8298a60, connectString=...,
drvcompl=<value optimized out>) at connection.cpp:227
#11 0xb5ba7015 in odbc::DriverManager::getConnection (connectString=...) at
drivermanager.cpp:231
#12 0xb60c1585 in AgentportalDB::getConnection (this=0xad27de1c) at AgentportalDB.cpp:96
#13 0xb60c087a in AgentportalDB::getUser (this=0xad27de1c, userid=388) at
AgentportalDB.cpp:19
#14 0xb607c730 in pion::plugins::RestService::getUser (this=0x8085ff8, userid=388,
hash=...) at RestService.cpp:182
#15 0xb607aef1 in pion::plugins::RestService::operator() (this=0x8085ff8, request=...,
tcp_conn=...) at RestService.cpp:47
#16 0xb7f7f4a1 in
boost::detail::function::void_function_ref_invoker2<pion::net::WebService, void,
boost::shared_ptr<pion::net::HTTPRequest>&,
boost::shared_ptr<pion::net::TCPConnection>&>::invoke (function_obj_ptr=...,
    a0=..., a1=...) at /usr/local/include/boost/function/function_template.hpp:188
#17 0xb7f6b15a in boost::function2<void,
boost::shared_ptr<pion::net::HTTPRequest>&,
boost::shared_ptr<pion::net::TCPConnection>&>::operator()(boost::shared_ptr<pion::net::HTTPRequest>&,
boost::shared_ptr<pion::net::TCPConnection>&) const () from
/usr/local/lib/libpion-net-4.0.so
#18 0xb7f61fbc in pion::net::HTTPServer::handleRequest (this=0xbffff26c, http_request=...,
tcp_conn=..., ec=...) at HTTPServer.cpp:92
#19 0xb7f65192 in boost::_mfi::mf3<void, pion::net::HTTPServer,
boost::shared_ptr<pion::net::HTTPRequest>&,
boost::shared_ptr<pion::net::TCPConnection>&, boost::system::error_code
const&>::operator() (function_obj_ptr=...,
    a0=..., a1=..., a2=...) at /usr/local/include/boost/bind/mem_fn_template.hpp:393
#20 operator()<boost::_mfi::mf3<void, pion::net::HTTPServer,
pion::net::HTTPRequestPtr&, pion::net::TCPConnectionPtr&, const
boost::system::error_code&>,
boost::_bi::list3<boost::shared_ptr<pion::net::HTTPRequest>&,
boost::shared_ptr<pion::net::TCPConnection>&, const
boost::system::error_code&> > (function_obj_ptr=..., a0=..., a1=..., a2=...) at
/usr/local/include/boost/bind/bind.hpp:457
#21 operator()<boost::shared_ptr<pion::net::HTTPRequest>,
boost::shared_ptr<pion::net::TCPConnection>, const boost::system::error_code>
(function_obj_ptr=..., a0=..., a1=..., a2=...)
    at /usr/local/include/boost/bind/bind_template.hpp:116
#22 boost::detail::function::void_function_obj_invoker3<boost::_bi::bind_t<void,
boost::_mfi::mf3<void, pion::net::HTTPServer,
boost::shared_ptr<pion::net::HTTPRequest>&,
boost::shared_ptr<pion::net::TCPConnection>&, boost::system::error_code
const&>, boost::_bi::list4<boost::_bi::value<pion::net::HTTPServer*>,
boost::arg<1>, boost::arg<2>, boost::arg<3> > >, void,
boost::shared_ptr<pion::net::HTTPRequest>,
boost::shared_ptr<pion::net::TCPConnection>, boost::system::error_code
const&>::invoke (function_obj_ptr=..., a0=..., a1=..., a2=...) at
/usr/local/include/boost/function/function_template.hpp:153
#23 0xb7f6b242 in pion::net::HTTPRequestReader::finishedReading(boost::system::error_code
const&) () from /usr/local/lib/libpion-net-4.0.so
#24 0xb7f5e11d in pion::net::HTTPReader::consumeBytes (this=0x82acc68) at
HTTPReader.cpp:116
#25 0xb7f5ea37 in pion::net::HTTPReader::consumeBytes (this=0x82acc68, read_error=...,
bytes_read=450) at HTTPReader.cpp:62
#26 0xb7f66af6 in
boost::asio::detail::reactive_socket_recv_op<boost::asio::mutable_buffers_1,
boost::_bi::bind_t<void, boost::_mfi::mf2<void, pion::net::HTTPReader,
boost::system::error_code const&, unsigned int>,
boost::_bi::list3<boost::_bi::value<boost::shared_ptr<pion::net::HTTPRequestReader>
>, boost::arg<1> (*)(), boost::arg<2> (*)()> >
>::do_complete(boost::asio::detail::task_io_service*,
boost::asio::detail::task_io_service_operation*, boost::system::error_code const&,
unsigned int) () from /usr/local/lib/libpion-net-4.0.so
#27 0xb7f405e0 in boost::asio::detail::task_io_service_operation::complete
(owner=0x80834a8, base=0x80903a8, ec=..., bytes_transferred=5) at
/usr/local/include/boost/asio/detail/task_io_service_operation.hpp:37
#28 boost::asio::detail::epoll_reactor::descriptor_state::do_complete (owner=0x80834a8,
base=0x80903a8, ec=..., bytes_transferred=5) at
/usr/local/include/boost/asio/detail/impl/epoll_reactor.ipp:655
#29 0xb7fca30b in
boost::asio::detail::task_io_service::run(boost::system::error_code&) () from
/usr/local/lib/libpion-common-4.0.so
#30 0xb7fbfa65 in boost::asio::io_service::run (this=0xbffff278, service=...) at
/usr/local/include/boost/asio/impl/io_service.ipp:59
#31 pion::PionScheduler::processServiceWork (this=0xbffff278, service=...) at
PionScheduler.cpp:118
#32 0xb7fc0938 in call<pion::PionSingleServiceScheduler*, boost::asio::io_service>
(this=0x80901c8) at /usr/local/include/boost/bind/mem_fn_template.hpp:156
#33 operator()<pion::PionSingleServiceScheduler*> (this=0x80901c8) at
/usr/local/include/boost/bind/mem_fn_template.hpp:171
#34 operator()<boost::_mfi::mf1<void, pion::PionScheduler,
boost::asio::io_service&>, boost::_bi::list0> (this=0x80901c8) at
/usr/local/include/boost/bind/bind.hpp:313
#35 boost::_bi::bind_t<void, boost::_mfi::mf1<void, pion::PionScheduler,
boost::asio::io_service&>,
boost::_bi::list2<boost::_bi::value<pion::PionSingleServiceScheduler*>,
boost::reference_wrapper<boost::asio::io_service> > >::operator()
(this=0x80901c8) at /usr/local/include/boost/bind/bind_template.hpp:20
#36 boost::detail::thread_data<boost::_bi::bind_t<void, boost::_mfi::mf1<void,
pion::PionScheduler, boost::asio::io_service&>,
boost::_bi::list2<boost::_bi::value<pion::PionSingleServiceScheduler*>,
boost::reference_wrapper<boost::asio::io_service> > > >::run
(this=0x80901c8) at /usr/local/include/boost/thread/detail/thread.hpp:61
#37 0xb7c732a6 in thread_proxy () from /usr/local/lib/libboost_thread.so.1.48.0
#38 0xb7a2e955 in start_thread () from /lib/i686/cmov/libpthread.so.0
#39 0xb7d4b5ee in clone () from /lib/i686/cmov/libc.so.6
(gdb)

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xad27fb70 (LWP 28253)]
0xac85856e in list_add () from /usr/lib/libmysqlclient_r.so.16
(gdb) bt
#0  0xac85856e in list_add () from /usr/lib/libmysqlclient_r.so.16
#1  0xaca1aff9 in my_SQLAllocConnect () from /usr/lib/odbc/libmyodbc.so
#2  0xaca1b134 in SQLAllocConnect () from /usr/lib/odbc/libmyodbc.so
#3  0xb5a745b2 in ?? () from /usr/lib/libodbc.so.1
#4  0xb5a79584 in SQLDriverConnect () from /usr/lib/libodbc.so.1
#5  0xb5baa3ff in odbc::Connection::_connect (this=0x82aaf68, connectString=..., drvcompl=<value optimized out>) at connection.cpp:227
#6  0xb5ba7015 in odbc::DriverManager::getConnection (connectString=...) at drivermanager.cpp:231
#7  0xb60c1585 in AgentportalDB::getConnection (this=0xad27de1c) at AgentportalDB.cpp:96
#8  0xb60c087a in AgentportalDB::getUser (this=0xad27de1c, userid=96) at AgentportalDB.cpp:19
#9  0xb607c730 in pion::plugins::RestService::getUser (this=0x8085ff8, userid=96, hash=...) at RestService.cpp:182
#10 0xb607aef1 in pion::plugins::RestService::operator() (this=0x8085ff8, request=..., tcp_conn=...) at RestService.cpp:47
#11 0xb7f7f4a1 in boost::detail::function::void_function_ref_invoker2<pion::net::WebService, void, boost::shared_ptr<pion::net::HTTPRequest>&, boost::shared_ptr<pion::net::TCPConnection>&>::invoke (function_obj_ptr=...,
    a0=..., a1=...) at /usr/local/include/boost/function/function_template.hpp:188
#12 0xb7f6b15a in boost::function2<void, boost::shared_ptr<pion::net::HTTPRequest>&, boost::shared_ptr<pion::net::TCPConnection>&>::operator()(boost::shared_ptr<pion::net::HTTPRequest>&, boost::shared_ptr<pion::net::TCPConnection>&) const () from /usr/local/lib/libpion-net-4.0.so
#13 0xb7f61fbc in pion::net::HTTPServer::handleRequest (this=0xbffff26c, http_request=..., tcp_conn=..., ec=...) at HTTPServer.cpp:92
#14 0xb7f65192 in boost::_mfi::mf3<void, pion::net::HTTPServer, boost::shared_ptr<pion::net::HTTPRequest>&, boost::shared_ptr<pion::net::TCPConnection>&, boost::system::error_code const&>::operator() (function_obj_ptr=...,
    a0=..., a1=..., a2=...) at /usr/local/include/boost/bind/mem_fn_template.hpp:393
#15 operator()<boost::_mfi::mf3<void, pion::net::HTTPServer, pion::net::HTTPRequestPtr&, pion::net::TCPConnectionPtr&, const boost::system::error_code&>, boost::_bi::list3<boost::shared_ptr<pion::net::HTTPRequest>&, boost::shared_ptr<pion::net::TCPConnection>&, const boost::system::error_code&> > (function_obj_ptr=..., a0=..., a1=..., a2=...) at /usr/local/include/boost/bind/bind.hpp:457
#16 operator()<boost::shared_ptr<pion::net::HTTPRequest>, boost::shared_ptr<pion::net::TCPConnection>, const boost::system::error_code> (function_obj_ptr=..., a0=..., a1=..., a2=...)
    at /usr/local/include/boost/bind/bind_template.hpp:116
#17 boost::detail::function::void_function_obj_invoker3<boost::_bi::bind_t<void, boost::_mfi::mf3<void, pion::net::HTTPServer, boost::shared_ptr<pion::net::HTTPRequest>&, boost::shared_ptr<pion::net::TCPConnection>&, boost::system::error_code const&>, boost::_bi::list4<boost::_bi::value<pion::net::HTTPServer*>, boost::arg<1>, boost::arg<2>, boost::arg<3> > >, void, boost::shared_ptr<pion::net::HTTPRequest>, boost::shared_ptr<pion::net::TCPConnection>, boost::system::error_code const&>::invoke (function_obj_ptr=..., a0=..., a1=..., a2=...) at /usr/local/include/boost/function/function_template.hpp:153
#18 0xb7f6b242 in pion::net::HTTPRequestReader::finishedReading(boost::system::error_code const&) () from /usr/local/lib/libpion-net-4.0.so
#19 0xb7f5e11d in pion::net::HTTPReader::consumeBytes (this=0x82839e0) at HTTPReader.cpp:116
#20 0xb7f5ea37 in pion::net::HTTPReader::consumeBytes (this=0x82839e0, read_error=..., bytes_read=440) at HTTPReader.cpp:62
#21 0xb7f66af6 in boost::asio::detail::reactive_socket_recv_op<boost::asio::mutable_buffers_1, boost::_bi::bind_t<void, boost::_mfi::mf2<void, pion::net::HTTPReader, boost::system::error_code const&, unsigned int>, boost::_bi::list3<boost::_bi::value<boost::shared_ptr<pion::net::HTTPRequestReader> >, boost::arg<1> (*)(), boost::arg<2> (*)()> > >::do_complete(boost::asio::detail::task_io_service*, boost::asio::detail::task_io_service_operation*, boost::system::error_code const&, unsigned int) () from /usr/local/lib/libpion-net-4.0.so
#22 0xb7f405e0 in boost::asio::detail::task_io_service_operation::complete (owner=0x80834a8, base=0x82b8058, ec=..., bytes_transferred=5) at /usr/local/include/boost/asio/detail/task_io_service_operation.hpp:37
#23 boost::asio::detail::epoll_reactor::descriptor_state::do_complete (owner=0x80834a8, base=0x82b8058, ec=..., bytes_transferred=5) at /usr/local/include/boost/asio/detail/impl/epoll_reactor.ipp:655
#24 0xb7fca30b in boost::asio::detail::task_io_service::run(boost::system::error_code&) () from /usr/local/lib/libpion-common-4.0.so
#25 0xb7fbfa65 in boost::asio::io_service::run (this=0xbffff278, service=...) at /usr/local/include/boost/asio/impl/io_service.ipp:59
#26 pion::PionScheduler::processServiceWork (this=0xbffff278, service=...) at PionScheduler.cpp:118
#27 0xb7fc0938 in call<pion::PionSingleServiceScheduler*, boost::asio::io_service> (this=0x80901c8) at /usr/local/include/boost/bind/mem_fn_template.hpp:156
#28 operator()<pion::PionSingleServiceScheduler*> (this=0x80901c8) at /usr/local/include/boost/bind/mem_fn_template.hpp:171
#29 operator()<boost::_mfi::mf1<void, pion::PionScheduler, boost::asio::io_service&>, boost::_bi::list0> (this=0x80901c8) at /usr/local/include/boost/bind/bind.hpp:313
#30 boost::_bi::bind_t<void, boost::_mfi::mf1<void, pion::PionScheduler, boost::asio::io_service&>, boost::_bi::list2<boost::_bi::value<pion::PionSingleServiceScheduler*>, boost::reference_wrapper<boost::asio::io_service> > >::operator() (this=0x80901c8) at /usr/local/include/boost/bind/bind_template.hpp:20
#31 boost::detail::thread_data<boost::_bi::bind_t<void, boost::_mfi::mf1<void, pion::PionScheduler, boost::asio::io_service&>, boost::_bi::list2<boost::_bi::value<pion::PionSingleServiceScheduler*>, boost::reference_wrapper<boost::asio::io_service> > > >::run (this=0x80901c8) at /usr/local/include/boost/thread/detail/thread.hpp:61
#32 0xb7c732a6 in thread_proxy () from /usr/local/lib/libboost_thread.so.1.48.0
#33 0xb7a2e955 in start_thread () from /lib/i686/cmov/libpthread.so.0
#34 0xb7d4b5ee in clone () from /lib/i686/cmov/libc.so.6
(gdb) quit
Thread
SIGABRT & SIGSEGV when using libmyodbcSimon Walter4 Jun
  • Re: SIGABRT & SIGSEGV when using libmyodbcSimon Walter4 Jun