Re: [Sqlrelay-discussion] [run time error] accessing mysql db using SQL relay & c++ ( linux, mysql,
Brought to you by:
mused
|
From: David M. <dav...@fi...> - 2005-12-13 19:35:09
|
Well, I see where it's crashing, but it's not obvious why. It looks
like memcpy() is causing the crash. That can happen when the source or
destination buffer pointers are invalid or the length is too long. That
usually happens when a buffer overrun somewhere else in the app
overwrites one of them with some garbage value. Those are notoriously
hard to track down. The only sure-fire way is to link ElectricFence
into your app. It'll cause the app to crash on the exact instruction
that overran the buffer. ElectricFence will make your app use a lot of
memory though, so it may or may not be possible to use it.
What language is your app written in? If it's c/c++ then there could be
a bug in it that's causing the crash. If it's something else, then
there is likely a bug in SQL Relay causing the crash. Either way, it'll
help narrow it down. It would also help to know the query that caused
the crash, and whether running that query always causes it to crash or
just after it's been running for a while.
David Muse
dav...@fi...
On Mon, 2005-12-05 at 17:21 +0900, =EB=B0=95=EC=A4=80=ED=9D=AC wrote:
> Hi
>=20
> =20
>=20
> I am working on setting up an multithreaded application with below os
> & library.
>=20
> =20
>=20
> OS: linux fc3
>=20
> Compiler: gcc 3.4.2 20041017
>=20
> Mysql-4.1.15
>=20
> Rudiments-0.28.2
>=20
> Sqlrelay-0.36.4
>=20
> =20
>=20
> For stress test. Concurrent 50 transaction loop 1000000 count.
>=20
> One day after, our application abnormal terminationtion with dump.
>=20
> 50 x 2856 transaction succeded.
>=20
> =20
>=20
> Below, gdb bactrace result.
>=20
> Any ideas? Whats it looking for?
>=20
> =20
>=20
> Thanks!
>=20
> ***************************************************
>=20
> =20
>=20
> (gdb) bt
>=20
> #0 0x001b04dc in memcpy () from /lib/tls/libc.so.6
>=20
> #1 0xf6e3869c in rudiments::rawbuffer::copy ()
>=20
> from /usr/local/firstworks/lib/librudiments-0.28.2.so.1
>=20
> #2 0xf6e1be1c in rudiments::filedescriptor::bufferedRead ()
>=20
> from /usr/local/firstworks/lib/librudiments-0.28.2.so.1
>=20
> #3 0xf6e1b720 in rudiments::filedescriptor::read ()
>=20
> from /usr/local/firstworks/lib/librudiments-0.28.2.so.1
>=20
> #4 0xf6fb8233 in sqlrcursor::getString ()
>=20
> from /usr/local/firstworks/lib/libsqlrclient-0.36.4.so.1
>=20
> #5 0xf6fb91fb in sqlrcursor::parseOutputBinds ()
>=20
> from /usr/local/firstworks/lib/libsqlrclient-0.36.4.so.1
>=20
> #6 0xf6fb77a7 in sqlrcursor::processResultSet ()
>=20
> from /usr/local/firstworks/lib/libsqlrclient-0.36.4.so.1
>=20
> #7 0xf6fb637c in sqlrcursor::runQuery ()
>=20
> from /usr/local/firstworks/lib/libsqlrclient-0.36.4.so.1
>=20
> #8 0xf6fb5aff in sqlrcursor::executeQuery ()
>=20
> from /usr/local/firstworks/lib/libsqlrclient-0.36.4.so.1
>=20
> #9 0xf6fb59e3 in sqlrcursor::sendQuery ()
>=20
> from /usr/local/firstworks/lib/libsqlrclient-0.36.4.so.1
>=20
> #10 0x08057e3b in CPxDB::get_contents (this=3D0x8bda688, aQuery=3D
>=20
> {static npos =3D 4294967295, _M_dataplus =3D
> {<std::allocator<char>> =3D {<__gnu_cxx::new_allocator<char>> =3D {<No
> data fields>}, <No data fields>}, _M_p =3D 0xc90f5034 "select Contents
> from ContentsTbl where Id in
> ('7975a859-1c30-a8d3-f807-3ade5511da7a','11d36c03-9978-02a6-126d-be5f23=
85b81e','51627791-31ed-69e2-4a62-0a9966749997','c5e7087a-4ba3-83ea-71c4-1=
0bca8059919"...}}, contents=3D@0x8f5723e0)
>=20
> at src/PxDB.cpp:167
>=20
> #11 0x0804cd99 in CPxThread::contents (this=3D0x8bdb088) at
> src/PxThread.cpp:424
>=20
> #12 0x0804c222 in CPxThread::transaction (this=3D0x8bdb088)
>=20
> at src/PxThread.cpp:228
>=20
> #13 0x0804be98 in CPxThread::responder (th_arg=3D0x8bdb088)
>=20
> at src/PxThread.cpp:150
>=20
> #14 0x0038b1d5 in start_thread () from /lib/tls/libpthread.so.0
>=20
> #15 0x0020c2da in clone () from /lib/tls/libc.so.6
>=20
> =20
>=20
>=20
|