[MXS-270] Crash with MySQLBackend protocol module Created: 2015-07-15 Updated: 2015-09-17 Resolved: 2015-08-19 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | mariadbbackend, readwritesplit |
| Affects Version/s: | 1.1.1 |
| Fix Version/s: | 1.2.1 |
| Type: | Bug | Priority: | Blocker |
| Reporter: | markus makela | Assignee: | markus makela |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
CentOS 7 |
||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Description |
|
MaxScale crashes with the following configuration soon after startup.
Stack trace from the crash.
|
| Comments |
| Comment by markus makela [ 2015-07-15 ] |
|
I was not able to reproduce this crash in the same environment. |
| Comment by Dipti Joshi (Inactive) [ 2015-08-16 ] |
|
markus makela Can you please locate the line number where the crash occurred based on stack trace (libMySQLBackend.so(+0x514b) [0x7f1038a1614b])? |
| Comment by markus makela [ 2015-08-16 ] |
|
It seem the crash happened on line 1608 in mysql_backend.c if the stack trace is correct. This is a place where a NULL pointer could possibly cause a segmentation fault if the network has sent a packet with an odd length. I still haven't been able to reproduce this error but I've added checks for possible NULL values in the mysql_backend.c. |
| Comment by Dipti Joshi (Inactive) [ 2015-08-16 ] |
|
markus makela line 1608 in which branch ? |
| Comment by markus makela [ 2015-08-17 ] |
|
On the 1.1.1 tag on git. |
| Comment by markus makela [ 2015-08-19 ] |
|
Added a test which can reproduce the error. The test assumes MaxScale is listening on the same host to port 4006 and uses readwritesplit. Compile with c++ -g -lmysqlclient test.cc |
| Comment by markus makela [ 2015-08-19 ] |
|
Fixed by storing the partial response in the DCB read queue. |