We have a constant running Linux application with 2 threads, a (query)producer and (query)consumer. Every 2-3 days a crash occurs. Here is the gdb backtrace of the core file:
#0 0x006bf910 in my_malloc () from /usr/lib/mysql/libmysqlclient_r.so.15
#1 0x006c2caa in memdup_root () from /usr/lib/mysql/libmysqlclient_r.so.15
#2 0x006e6b23 in unpack_fields () from /usr/lib/mysql/libmysqlclient_r.so.15
#3 0x006e70b3 in mysql_read_default_options () from /usr/lib/mysql/libmysqlclient_r.so.15
#4 0x006e54f4 in mysql_free_result () from /usr/lib/mysql/libmysqlclient_r.so.15
#5 0x080d8698 in MYSQL_OBJ::Exec (this=0x899abe0,
qry=0x89a2fb8 "SELECT * FROM conntbl WHERE (id1='57783' AND id2='41508') OR (id1='41508' AND id2='57783')")
at [login to view URL]
#6 0x080db4ae in MYSQL_OBJ::RunNextQuery_ifLastResult_isProcessed (this=0x899abe0) at [login to view URL]
#7 0x080f0c4c in SqlThread (ptr=0x80fa2bf) at [login to view URL]
#8 0x00c8d73b in __pthread_initialize_minimal_internal () from /lib/libpthread.so.0
#9 0x00c0bcfe in tdestroy_recurse () from /lib/libc.so.6
We need a threadprogramming/mysql api expert, who helps us to remove this bug.
I have done programs with multithreading in C (Linux) and also used the mysql client api. If I can get access to the code and to the server and have gdb on it at the time or crash, I can analyze the situation and provide the solution to you.
Thanks