List:MySQL++« Previous MessageNext Message »
From:Dan Cook (dancook) Date:April 12 2011 5:58pm
Subject:Crash in DBDriver::fetch_row on a heavily loaded system...
View as plain text  
We are seeing a NULL "this" pointer in the fetch_row() call and
subsequent crash.

The system this running on is a test system which is "heavily" loaded
and under stress.  The Disk I/O utilization is 100%, but we are not CPU
or memory bound.  

We are using a connection pool with the timeouts set to 100 seconds on
the application side and 110 seconds on server side.

 

In the mysql slow query log we are seeing queries take 200 seconds or
more.   So my first "knee-jerk" reaction is to think we are timing out
on the query and the connection pool and server are closing the
connection.  But I would think that if there is a conversation in play -
it would keep the connection open - so I am not sure what is going on.
We are using MySQL 5.0.90 and MySQL++ 3.1 on Suse Enterprise Linux.

 

Again this system is heavily loaded test system with the disk 100%
utilized.  Under normal conditions everything is OK.    What worries me
is the NULL this pointer. The query being executed should return 0 or 1
rows.

 

Thanks, 

Dan 

 

(gdb) bt
#0  0xb7b2a7fd in std::string::clear () from /usr/lib/libstdc++.so.6
#1  0xb7463db8 in mysqlpp::DBDriver::fetch_row (this=0x0, res=0x0)
    at lib/dbdriver.h:300
#2  0xb74619fa in mysqlpp::UseQueryResult::fetch_raw_row
(this=0xaebf594c)
    at lib/result.cpp:205
#3  0xb78d9cb1 in
mysqlpp::Query::storein_sequence<std::vector<RecordingDTO,
std::allocator<RecordingDTO> > > (this=0xaebf5a9c, con=@0xaebf5ba4,
s=@0xaebf5a50)
    at
/ws-server/tempbuild-quangtr2/server/CommonLib/include/mysql++/query.h:7
53
#4  0xb78d9e45 in mysqlpp::Query::storein<RecordingDTO>
(this=0xaebf5a9c,
    con=@0xaebf5ba4, s=@0xaebf5a50)
    at
/ws-server/tempbuild-quangtr2/server/CommonLib/include/mysql++/query.h:8
78
#5  0xb78d9eb1 in mysqlpp::Query::storein<std::vector<RecordingDTO,
std::allocator<RecordingDTO> > > (this=0xaebf5a9c, con=@0xaebf5ba4)
    at
/ws-server/tempbuild-quangtr2/server/CommonLib/include/mysql++/query.h:8
59
#6  0xb789f484 in dbRecording::get (id=10266, connIn=0xaebf5cf0)
    at dbRecording.cxx:75



 

[code snippet of the "get" call above in gdb...]

 

...

  mysqlpp::Query query = conn->query();

  query << "SELECT ...  WHERE id=" << id;

  vector<RecordingDTO> res;

  query.storein(res);

 

  if (res.empty()) {

     throw mysqlpp::BadQuery("Not found");

  }

  return res[0];

 


Thread
Crash in DBDriver::fetch_row on a heavily loaded system...dancook)12 Apr
  • Re: Crash in DBDriver::fetch_row on a heavily loaded system...Adrian Cornish12 Apr
    • RE: Crash in DBDriver::fetch_row on a heavily loaded system...dancook)12 Apr
    • RE: Crash in DBDriver::fetch_row on a heavily loaded system...dancook)13 Apr
      • Re: Crash in DBDriver::fetch_row on a heavily loaded system...Warren Young13 Apr
        • Re: Crash in DBDriver::fetch_row on a heavily loaded system...Adrian Cornish13 Apr
          • Re: Crash in DBDriver::fetch_row on a heavily loaded system...Warren Young13 Apr
        • RE: Crash in DBDriver::fetch_row on a heavily loaded system...dancook)15 Apr
          • Re: Crash in DBDriver::fetch_row on a heavily loaded system...Warren Young15 Apr
            • Re: Crash in DBDriver::fetch_row on a heavily loaded system...Warren Young15 Apr
            • RE: Crash in DBDriver::fetch_row on a heavily loaded system...dancook)16 Apr
              • Re: Crash in DBDriver::fetch_row on a heavily loaded system...Warren Young16 Apr
          • SSQLS: Number of colomns in a tabledancook)19 May
            • Re: SSQLS: Number of colomns in a tableAdrian Cornish19 May
            • Re: SSQLS: Number of colomns in a tableAdrian Cornish19 May
              • Re: SSQLS: Number of colomns in a tableWarren Young19 May
                • Re: SSQLS: Number of colomns in a tableAdrian Cornish19 May
                  • RE: SSQLS: Number of colomns in a tabledancook)19 May
                  • Re: SSQLS: Number of colomns in a tableWarren Young19 May
                    • Re: SSQLS: Number of colomns in a tableWarren Young20 May
      • Re: Crash in DBDriver::fetch_row on a heavily loaded system...Adrian Cornish13 Apr
        • Re: Crash in DBDriver::fetch_row on a heavily loaded system...Warren Young13 Apr