List:MySQL++« Previous MessageNext Message »
From:Ankur G35 Saxena Date:September 29 2006 12:01am
Subject:I am crashing once in a while @ similar points (multi threading)
View as plain text  
Hi

   I have a program which uses multiple threads, each thread has its
own connection object, so no sharing is happening there. Now I have a
library called DBAccess which is basically all the functions I need to
run, these functions use char* as their parameters and I have
istringstream objects where i am creating queries and passing my
function as instance.str().c_str(). Anyhow When I get from a row I do
, string x = row["field"].get_string(). These are the only things I
do, I dont know if I am doing anything wrong, but here is the gdb
output, but i cant figure what it is saying about the MySQL++ lib.

Thanks for any help.

(gdb) bt
#0  0x4025e276 in std::__default_alloc_template<true, 0>::allocate(unsigned) ()
   from /usr/lib/libstdc++.so.5
#1  0x402642a8 in std::string::_Rep::_S_create(unsigned,
std::allocator<char> const&) () from /usr/lib/libstdc++.so.5
#2  0x402643d9 in std::string::_Rep::_M_clone(std::allocator<char>
const&, unsigned) () from /usr/lib/libstdc++.so.5
#3  0x40260e3d in std::string::_Rep::_M_grab(std::allocator<char>
const&, std::allocator<char> const&) () from /usr/lib/libstdc++.so.5
#4  0x40260f4c in std::string::string(std::string const&) ()
   from /usr/lib/libstdc++.so.5
#5  0x40056e8b in mysqlpp::FieldNames::init(mysqlpp::ResUse const*) (
    this=0x8113338, res=0x412add4c) at basic_string.h:187
#6  0x4006149b in ResUse (this=0x412add4c, result=0x8152008, c=0x0)
    at field_names.h:51
#7  0x4005ea9a in mysqlpp::Query::store(char const*) (this=0x412add7c,
    str=0x810196c "SELECT * FROM CommunityInfo.MSProfile WHERE
IMSI='8479697785'") at result.h:358
#8  0x4005ed32 in mysqlpp::Query::store(mysqlpp::SQLQueryParms&) (
    this=0x412add7c, p=@0x412add90) at basic_string.h:781
#9  0x0809deb2 in DBAccess::runGetSql(char*, mysqlpp::Result*, LogEntry*) (
    this=0x8120c1c,
    querystr=0x412adf8c "SELECT * FROM CommunityInfo.MSProfile WHERE
IMSI='8479697785'", resSet=0x412adf5c, Log=0x412ae52c) at query.h:309
---Type <return> to continue, or q <return> to quit---
#10 0x080b1966 in DBAccess::getMSProfile(char*, unsigned short,
MSProfile*, LogEntry*) (this=0x8120c1c, imsi=0x8123aa4 "8479697785",
state=6,
    profile=0x8152a00, Log=0x412ae52c) at Features.cpp:296
#11 0x080a11cb in DBAccess::findNumber(char*, char, char*,
RegisteredMS*, char, LogEntry*) (this=0x8120c1c, search_str=0x8152750
"8479697785",
    field_type=2 '\002', equip_id=0x8152770 "", regMS=0x81529e8,
    run_mask=25 '\031', Log=0x412ae52c) at basic_string.h:781
#12 0x08076cc8 in MsgProcessor::process_MSC_Auth_Req(CcAAAAuthReqMsg*,
sockaddr_in*) (this=0x8120c1c, msg=0x8152748, replyTo=0x8152b10)
    at MsgProcessor-Recv-MSC.cpp:550
#13 0x0805d721 in InSysController::handleRequest(char*, int, sockaddr_in*) (
    this=0x8120c1c, m=0x8152748 "\f\016,\001\001", len=1, fromwho=0x8152b10)
    at InSysController.cpp:58
#14 0x0805d4c3 in InSysController::OnThreadMessage(int, int, void*) (
    this=0x8120ab8, id=0, wParam=0, lParam=0x8152b08) at InSysController.cpp:18
#15 0x080970cd in ZThread::Run() (this=0x8120ab8) at zthread.cc:239
#16 0x08096859 in Thread_Entry_Func(void*) (arg=0x8120ab8) at zthread.cc:22
#17 0x401a62b6 in start_thread () from /lib/tls/libpthread.so.0
(gdb)



Anyone know why this might be?
Thread
I am crashing once in a while @ similar points (multi threading)Ankur G35 Saxena29 Sep
  • Re: I am crashing once in a while @ similar points (multi threading)Warren Young29 Sep