List:MySQL++« Previous MessageNext Message »
From:Alex Vishnev Date:April 24 2005 3:54pm
Subject:RE: Core dump with query->store()
View as plain text  
Chris,

Thanks for a reply. I am not quite sure why "this" is showing as 0x0 in the
backtrace below. Query::store is being defined by this complicated macro
inside the query.h (query_define1 - I believe). In any case, in my example I
print the address of query object being constructed and connection object
reference inside query object and both are valid. Also, I don't believe that
if connection object is invalid or query object would be invalid, I would
get to the next step in the backtrace Connection::store which is being
displayed properly in the backtrace. Below are the debugs from my programs:

[root@voip examples]# ./ConnectionPool
connected success
connection object connected
Connection to debit success on connect 1
connected success
connection object connected
Connection to debit success on connect 2
connected success
connection object connected
Connection to debit success on connect 3
connected success
connection object connected
Connection to debit success on connect 4
connected success
connection object connected
Connection to debit success on connect 5
connected success
connection object connected
Connection to debit success on connect 6
connected success
connection object connected
Connection to debit success on connect 7
connected success
connection object connected
Connection to debit success on connect 8
connected success
connection object connected
Connection to debit success on connect 9
connected success
connection object connected
Connection to debit success on connect 10
Size of Connections 10
// all 10 pooled connection are now constructed and appended to a vector
Size of Connections 10
getConnection: got connected
Got Connected Pooled Connection 
Connection from Pool 0xbfffe848 // Print the address of Connection of the
pool
db connected                  // check if connection object is connected()
MySQL version: 3.23.58        // connection->client_info() result
Connection 0xbfffe848		// debug line I inserted into Query
constructor to display Conection Address. It is the same as I extracted from
the pool
query object 0xbfffe600       // query object address as resulted from
con->query();
Query: show tables		// query->preview() results after query <<
"show tables";
query object 0xbfffe600       // address of query right before store();
Segmentation fault (core dumped)

The program still core dumps in the same place.

-----Original Message-----
From: Chris Frey [mailto:cdfrey@stripped] 
Sent: Saturday, April 23, 2005 4:16 PM
To: plusplus@stripped
Subject: Re: Core dump with query->store()

On Fri, Apr 22, 2005 at 07:12:54PM -0400, Alex Vishnev wrote:
> Back trace looks like this:
> 
> #0  0xb73abaaa in _int_malloc () from /lib/tls/libc.so.6
> #1  0xb73aadfd in malloc () from /lib/tls/libc.so.6
> #2  0xb75943fe in my_malloc () from /usr/lib/mysql/libmysqlclient_r.so.10
> #3  0xb7592915 in my_net_init () from
/usr/lib/mysql/libmysqlclient_r.so.10
> #4  0xb7590228 in mysql_real_connect () from
> /usr/lib/mysql/libmysqlclient_r.so.10
> #5  0xb7590d55 in mysql_real_connect () from
> /usr/lib/mysql/libmysqlclient_r.so.10
> #6  0xb758f148 in simple_command () from
> /usr/lib/mysql/libmysqlclient_r.so.10
> #7  0xb7591450 in mysql_real_query () from
> /usr/lib/mysql/libmysqlclient_r.so.10
> #8  0xb75911e5 in mysql_query () from
/usr/lib/mysql/libmysqlclient_r.so.10
> #9  0xb7568586 in mysqlpp::Connection::store(std::string const&, bool)
> (this=0xbfffc6c8, str=@0xbfffc280, throw_excptns=false)
>     at basic_string.h:781
> #10 0xb756f816 in mysqlpp::Query::store(mysqlpp::SQLQueryParms&)
(this=0x0,
> p=@0xbfffc50c) at connection.h:142

You might want to look here first.  The 'this' pointer shouldn't be 0.
Perhaps your cache has a bug.


> #11 0x0804c208 in DnisCacheMgr::cacheData(mysqlpp::Connection*)
> (this=0x8053300, con=0xbfffc6c8) at query.h:90
> #12 0x08050159 in void CacheManager::bla<DnisCacheMgr>(DnisCacheMgr*)
> (this=0xbfffc680, mgr=0x806bfd8) at CacheManager.h:48
> #13 0x0804facf in main (argc=1, argv=0xbfffc964) at CacheManager.h:34

- Chris


-- 
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe:
http://lists.mysql.com/plusplus?unsub=1



Thread
Core dump with query->store()Alex Vishnev23 Apr
  • Re: Core dump with query->store()Chris Frey23 Apr
    • RE: Core dump with query->store()Alex Vishnev24 Apr
      • Re: Core dump with query->store()Chris Frey25 Apr
      • Re: Core dump with query->store()Warren Young25 Apr