[CONC-220] core dump in net.c after network problem Created: 2016-12-07 Updated: 2020-03-16 Resolved: 2020-03-16 |
|
| Status: | Closed |
| Project: | MariaDB Connector/C |
| Component/s: | None |
| Affects Version/s: | 2.1 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Critical |
| Reporter: | William Reich | Assignee: | Georg Richter |
| Resolution: | Cannot Reproduce | Votes: | 0 |
| Labels: | None | ||
| Environment: |
linux 64 bit |
||
| Attachments: |
|
| Description |
|
we have a C++ client using mariadb connector C version 2.1. Thread 1 (LWP 4595): The attachment ( tarball.tgz ) contains:
The result of the core dump inspection reveals that |
| Comments |
| Comment by William Reich [ 2016-12-07 ] | |||||||||||||
|
This error is not repeatable on demand. The 'how to repeat' is unknown. | |||||||||||||
| Comment by William Reich [ 2016-12-08 ] | |||||||||||||
|
out2.out Noting that we have a broken network, the code seems to be trying to close the connection to the mysql db. Somewhere before we got here , net->buff was set to zero. So, why is the program trying to write a command onto a connection is that broken. | |||||||||||||
| Comment by William Reich [ 2016-12-13 ] | |||||||||||||
|
anybody out there ? | |||||||||||||
| Comment by Georg Richter [ 2016-12-14 ] | |||||||||||||
|
We fixed several things in mysql_close, close_slow_part and close_options - can you try to repeat the issue with latest 2.3 release please? Thanks! | |||||||||||||
| Comment by William Reich [ 2016-12-14 ] | |||||||||||||
|
sorry - I do not have the ability to experiment. Besides, the files that I supplied in this ticket from MariaDb-connector v 2.1.x ?? | |||||||||||||
| Comment by William Reich [ 2016-12-14 ] | |||||||||||||
|
the content of the variable *mysql is already provided at line 393 of file rob.out | |||||||||||||
| Comment by Georg Richter [ 2016-12-15 ] | |||||||||||||
|
Sorry, I meant mysql->net.vio - it looks like it is overwritten somehow. | |||||||||||||
| Comment by William Reich [ 2016-12-16 ] | |||||||||||||
|
the display of *net->vio is found at line 50 of the out2.out file that is attached to this ticket. | |||||||||||||
| Comment by Georg Richter [ 2016-12-16 ] | |||||||||||||
|
Some observations: 1) vio->type is VIO_CLOSED - value was assigned in function vio_close()
but p *net->vio shows another value for sd:
2) net->buff was set to 0 in function net_end().
p *net shows another value for vio:
The value for vio is exactly the same as for vio->sd: 54158592 is 0x33a6500 - so it looks like an invalid write happens somewhere: either in MariaDB Connector/C or in your application. With latest C/C 2.3 I wasn't able to reproduce the crash nor did valgrind report any invalid memory operations. | |||||||||||||
| Comment by William Reich [ 2016-12-16 ] | |||||||||||||
|
the key piece of information in this ticket is that there was a network failure. | |||||||||||||
| Comment by William Reich [ 2016-12-20 ] | |||||||||||||
|
my question from Dec 8... |