we have a C++ client using mariadb connector C version 2.1.
The db is on machine A, and the client is on machine B.
There was a network failure between the two machines.
Shortly after the network failure was observed, the client coredump'd.
Thread 1 (LWP 4595):
#0 0x0000003383b387c6 in __strncpy_ssse3 () from /lib64/libc.so.6
#1 0x00007f91b1eac87b in net_write_buff (net=0x33a6500, packet=0x7f91a5a10a70 "\001", len=5) at /vob/adc/router/thirdparty/mariadb-connector/libmariadb/net.c:375
#2 0x00007f91b1eacb2c in net_write_command (net=0x33a6500, command=<optimized out>, packet=0x7f91b1ed4542 "", len=0) at /vob/adc/router/thirdparty/mariadb-connector/libmariadb/net.c:329
#3 0x00007f91b1eb21ce in mthd_my_send_cmd (mysql=0x33a6500, command=<optimized out>, arg=0x7f91b1ed4542 "", length=0, skipp_check=1 '\001', opt_arg=<optimized out>) at /vob/adc/router/thirdparty/mariadb-connector/libmariadb/libmariadb.c:593
#4 0x00007f91b1eb077a in mysql_close_slow_part (mysql=0x33a6500) at /vob/adc/router/thirdparty/mariadb-connector/libmariadb/libmariadb.c:2240
#5 0x00007f91b1eb0636 in mysql_close (mysql=0x33a6500) at /vob/adc/router/thirdparty/mariadb-connector/libmariadb/libmariadb.c:2255
#6 0x00000000008b88fd in MySqlClient::close (this=0x1fd0388) at MySqlClient.cpp:192
#7 0x00000000008b8187 in DataBaseClient<MySqlClient>::operator<< (this=0x1fd0380, sql="INSERT into MeasurementStat(statName, statValue, info_id) VALUES('memInstance', '2451320', '9448181984');") at /vob/adc/router/db_client/DataBaseClient.h:195
#8 0x00000000008b6611 in UlticomADC::MySqlWriterThread::processKPIRequest (this=0x1fb4840, kpi=0x62dff00) at /vob/adc/router/meas/MySqlWriterThread.cpp:426
#9 0x00000000008b7aec in UlticomADC::MySqlWriterThread::handleMessage (this=0x1fb4840, m=0x62dff00) at /vob/adc/router/meas/MySqlWriterThread.cpp:104
#10 0x00000000007f518b in UlticomADC::SubsystemThread::threadMain (this=0x1fb4840, pArguments=<optimized out>) at /vob/adc/router/common/SubsystemThread.cpp:117
#11 0x000000000057b36b in UlticomADC::_thread_internal_main_routine (arg=<optimized out>) at /vob/adc/router/include/Thread.h:210
#12 0x0000003383e077f1 in __nptl_setxid () from /lib64/libpthread.so.0
#13 0x0000000000000000 in ?? ()
The attachment ( tarball.tgz ) contains:
- backtrace of all threads
- important c files to match core dump
- gdb commands poking around the core dump.
The result of the core dump inspection reveals that
the code is trying to write to net->write_pos , which has a value of zero.