Hello,
I have recently upgraded from MySQL 5.0.77 to 5.5 and a few of my servers where the
program runs full time have crashed with a segmentation fault. It takes some days to
happen and the multi-threaded program is running optimized in production environments so
I don't have a lot of information and it's hard to debug.
Is there a known incompatibility with newer versions of MySQL?
I've recompiled mysql++ 3.1.0 to link with libmysqlclient.so.18 and also recompiled my
program. All my threads are using:
mysqlpp::Connection::thread_start();
Interesting fact, MySQL 5.5 does not use a separated libmysqlclient_r.so library anymore
and the problem looks like a thread safety issue.
I can see that in all cases, it happened in mysqlpp object's destructor (double delete?):
Server 1
---------
2012-02-06 05:56:15: [ERROR] Query error: Lost connection to MySQL server during query
2012-02-06 05:56:16: [ERROR] 1: 0x2b3f35e39a67 <+47550487042663>
(/usr/lib64/libmysqlclient.so.18)
2012-02-06 05:56:16: [ERROR] 2: 0x2b3f35e39e34 <my_net_read+420>
(/usr/lib64/libmysqlclient.so.18)
2012-02-06 05:56:16: [ERROR] 3: 0x2b3f35e33d8a <cli_safe_read+42>
(/usr/lib64/libmysqlclient.so.18)
2012-02-06 05:56:16: [ERROR] 4: 0x2b3f35e344f7 <+47550487020791>
(/usr/lib64/libmysqlclient.so.18)
2012-02-06 05:56:16: [ERROR] 5: 0x2b3f35e31ce6 <mysql_real_query+38>
(/usr/lib64/libmysqlclient.so.18)
2012-02-06 05:56:16: [ERROR] 6: 0x2b3f34f6fdab <mysqlpp::Query::use(char const*,
unsigned long)+123> (/usr/lib64/libmysqlpp.so.3)
2012-02-06 05:56:16: [ERROR] 7: 0x9bf238 <vtable for mysqlpp::Query+56>
(bin/GalaxieAudioEngine)
2012-02-06 05:56:16: [ERROR] 8: 0x563b60 <mysqlpp::Query::~Query()+0>
(bin/GalaxieAudioEngine)
2012-02-06 05:56:16: [ERROR] End of stack trace.
Server 2
---------
2012-02-04 02:35:25: [ERROR] 1: 0x2b57d6e9754d
<mysqlpp::Connection::~Connection()+45> (/usr/lib64/libmysqlpp.so.3)
Server 3
----------
2012-02-06 06:25:10: [ERROR] 1: 0x2b9634aaf185 <mysqlpp::DBDriver::~DBDriver()+85>
(/usr/lib64/libmysqlpp.so.3)
I use CentOS 5.6.
Thanks,
Sebastien Darveau