List:MySQL++« Previous MessageNext Message »
From:Sebastien Darveau Date:February 7 2012 7:09pm
Subject:RE: Segmentation Fault after upgrading to MySQL 5.5
View as plain text  
I don't know if this is related but it's very easy to reproduce. Getting a connection from
a connection pool when mysql server has been shut down.  I get this:

Thread [16] 26141 (Suspended : Signal : SIGPIPE:Broken pipe)	
	__kernel_vsyscall() at 0x772402	
	write() at 0x48f08b	
	vio_write() at viosocket.c:122 0xf19fab	
	net_real_write() at 0xf06ebb	
	net_flush() at 0xf07328	
	net_write_command() at 0xf074a3	
	cli_advanced_command() at client.c:841 0xf045b6	
	mysql_close() at client.c:3,740 0xf01643	
	mysqlpp::DBDriver::disconnect() at dbdriver.cpp:143 0x3968b1	
	mysqlpp::Connection::disconnect() at connection.cpp:155 0x39201a	
	~Connection() at connection.cpp:66 0x392060	
	SimpleConnectionPool::destroy() at SimpleConnectionPool.cpp:46 0xe91a6c	
	mysqlpp::ConnectionPool::remove() at cpool.cpp:187 0x394b44	
	mysqlpp::ConnectionPool::remove_old_connections() at cpool.cpp:202 0x394c6c	
	mysqlpp::ConnectionPool::grab() at cpool.cpp:129 0x394ed3	
	SimpleConnectionPool::GetConnection() at SimpleConnectionPool.cpp:21 0xe91d90	

Steps to reproduce:
	- grab a connection from the pool
	- stop mysql server
	- grab another connection from the pool

No exception are thrown, the program crashes.

Is this specific to version 3.1.0? Or can it be the same problem as the one mentioned


Sébastien Darveau

-----Original Message-----
From: Sebastien Darveau [mailto:SDarveau@stripped] 
Sent: 6 février 2012 11:51
To: plusplus@stripped
Subject: Segmentation Fault after upgrading to MySQL 5.5


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 and also recompiled my
program. All my threads are using:

Interesting fact, MySQL 5.5 does not use a separated 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>
2012-02-06 05:56:16: [ERROR]  2: 0x2b3f35e39e34 <my_net_read+420>
2012-02-06 05:56:16: [ERROR]  3: 0x2b3f35e33d8a <cli_safe_read+42>
2012-02-06 05:56:16: [ERROR]  4: 0x2b3f35e344f7 <+47550487020791>
2012-02-06 05:56:16: [ERROR]  5: 0x2b3f35e31ce6 <mysql_real_query+38>
2012-02-06 05:56:16: [ERROR]  6: 0x2b3f34f6fdab <mysqlpp::Query::use(char const*,
unsigned long)+123> (/usr/lib64/
2012-02-06 05:56:16: [ERROR]  7: 0x9bf238 <vtable for mysqlpp::Query+56>
2012-02-06 05:56:16: [ERROR]  8: 0x563b60 <mysqlpp::Query::~Query()+0>
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/

Server 3
2012-02-06 06:25:10: [ERROR]  1: 0x2b9634aaf185 <mysqlpp::DBDriver::~DBDriver()+85>

I use CentOS 5.6.

Sebastien Darveau

MySQL++ Mailing List
For list archives:
To unsubscribe:

Segmentation Fault after upgrading to MySQL 5.5Sebastien Darveau6 Feb
  • RE: Segmentation Fault after upgrading to MySQL 5.5Sebastien Darveau7 Feb
    • RE: Segmentation Fault after upgrading to MySQL 5.5Dino Korah7 Feb
      • RE: Segmentation Fault after upgrading to MySQL 5.5Sebastien Darveau7 Feb
    • Re: Segmentation Fault after upgrading to MySQL 5.5Warren Young9 Feb