[MXS-127] disable_sescmd_history causes MaxScale to crash under load Created: 2015-05-07 Updated: 2015-06-17 Resolved: 2015-05-09 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | readwritesplit |
| Affects Version/s: | 1.1.0 |
| Fix Version/s: | 1.1.1 |
| Type: | Bug | Priority: | Major |
| Reporter: | Yves Trudeau | Assignee: | markus makela |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Linux Precise 64bits |
||
| Description |
|
When I throttle the queries like here: ( for i in `seq 1 100000`; do echo "set @test=$i;"; sleep 0.1; done ) | mysql -h 10.3.1.110 -utpcc -ptpcc tpcc MaxScale is stable and memory is stable. But if I remove the sleep, it quickly crashes and in the trace, I found it is always when the following message appears: 2015-05-06 10:57:25 [3] Backend 172.30.1.102:3306 already executing sescmd Usually after just 4 or 5 statements. From the backtrace, 2015-05-06 10:57:25 Fatal: MaxScale received fatal signal 11. Attempting backtrace. The issue seems to be at the beginning of sescmd_cursor_process_replies, if I am correct: static GWBUF* sescmd_cursor_process_replies( scur = &bref->bref_sescmd_cur; Looks like something isn't protected when the properties are removed. |
| Comments |
| Comment by Yves Trudeau [ 2015-05-07 ] | ||||||||||||
|
I fixed the issue by adding a condition for active cursor in readwritesplit.c, function route_session_write like this:
| ||||||||||||
| Comment by markus makela [ 2015-05-09 ] | ||||||||||||
|
The chain of stored session commands was pruned too short and caused possible segfaults. This was fixed by removing only session commands that were already replied to. | ||||||||||||
| Comment by Timofey Turenko [ 2015-05-12 ] | ||||||||||||
|
verified by adding test added https://github.com/mariadb-corporation/maxscale-system-test/blob/master/mxs127.cpp , closing |