Merge lp:~gl-az/percona-server/5.5-bug1053342 into lp:percona-server/5.5
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Laurynas Biveinis | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 316 | ||||
Proposed branch: | lp:~gl-az/percona-server/5.5-bug1053342 | ||||
Merge into: | lp:percona-server/5.5 | ||||
Diff against target: |
11 lines (+1/-1) 1 file modified
Percona-Server/sql/log_event.h (+1/-1) |
||||
To merge this branch: | bzr merge lp:~gl-az/percona-server/5.5-bug1053342 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Laurynas Biveinis (community) | Approve | ||
Review via email: mp+128562@code.launchpad.net |
Description of the change
Fixed upstream slave crash bug http://
Issue was due to the thd->mem_root heap being released prematurely during the processing of deferred events.
In sql/log_
The problem lies in the way User_var_
Changing User_var_
http://
No MTR test case was added due to the non-deterministic nature of the failure.
Valgrind report before:
==7905== Memcheck, a memory error detector
==7905== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
==7905== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
==7905== Command: ./bin/mysqld --defaults-
==7905== Parent PID: 7359
==7905==
==7905== Thread 20:
==7905== Invalid read of size 8
==7905== at 0x596588: check_single_
==7905== by 0x59667E: check_one_
==7905== by 0x597785: update_
==7905== by 0x59C670: mysql_execute_
==7905== by 0x5A061F: mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_parse.cc:5811)
==7905== by 0x76B703: Query_log_
==7905== by 0x76BC8E: Query_log_
==7905== by 0x52DFC8: apply_event_
==7905== by 0x53756B: exec_relay_
==7905== by 0x5386BB: handle_slave_sql (slave.cc:3385)
==7905== by 0x33D2607850: start_thread (in /lib64/
==7905== by 0x33D1EE811C: clone (in /lib64/
==7905== Address 0x14fca620 is 608 bytes inside a block of size 8,208 free'd
==7905== at 0x4A069D9: free (vg_replace_
==7905== by 0x7F4CDE: my_free (my_malloc.c:128)
==7905== by 0x7EDBE4: free_root (my_alloc.c:371)
==7905== by 0x763E73: User_var_
==7905== by 0x63AFC7: Deferred_
==7905== by 0x763F6E: slave_execute_
==7905== by 0x5A0054: mysql_execute_
==7905== by 0x5A061F: mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_parse.cc:5811)
==7905== by 0x76B703: Query_log_
==7905== by 0x76BC8E: Query_log_
==7905== by 0x52DFC8: apply_event_
==7905== by 0x53756B: exec_relay_
==7905==
==7905== Invalid read of size 8
==7905== at 0x59659B: check_single_
==7905== by 0x59667E: check_one_
==7905== by 0x597785: update_
==7905== by 0x59C670: mysql_execute_
==7905== by 0x5A061F: mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_parse.cc:5811)
==7905== by 0x76B703: Query_log_
==7905== by 0x76BC8E: Query_log_
==7905== by 0x52DFC8: apply_event_
==7905== by 0x53756B: exec_relay_
==7905== by 0x5386BB: handle_slave_sql (slave.cc:3385)
==7905== by 0x33D2607850: start_thread (in /lib64/
==7905== by 0x33D1EE811C: clone (in /lib64/
==7905== Address 0x14fca5e0 is 544 bytes inside a block of size 8,208 free'd
==7905== at 0x4A069D9: free (vg_replace_
==7905== by 0x7F4CDE: my_free (my_malloc.c:128)
==7905== by 0x7EDBE4: free_root (my_alloc.c:371)
==7905== by 0x763E73: User_var_
==7905== by 0x63AFC7: Deferred_
==7905== by 0x763F6E: slave_execute_
==7905== by 0x5A0054: mysql_execute_
==7905== by 0x5A061F: mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_parse.cc:5811)
==7905== by 0x76B703: Query_log_
==7905== by 0x76BC8E: Query_log_
==7905== by 0x52DFC8: apply_event_
==7905== by 0x53756B: exec_relay_
... snip ...
==7905== Invalid write of size 4
==7905== at 0x70281C: Item_func_
==7905== by 0x70066E: Item_func:
==7905== by 0x700548: Item_func:
==7905== by 0x700548: Item_func:
==7905== by 0x700A56: Item_func_
==7905== by 0x553F5B: setup_fields(THD*, Item**, List<Item>&, enum_mark_columns, List<Item>*, bool) (sql_base.cc:7949)
==7905== by 0x6164BC: mysql_update(THD*, TABLE_LIST*, List<Item>&, List<Item>&, Item*, unsigned int, st_order*, unsigned long long, enum_duplicates, bool, unsigned long long*, unsigned long long*) (sql_update.cc:362)
==7905== by 0x59C73B: mysql_execute_
==7905== by 0x5A061F: mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_parse.cc:5811)
==7905== by 0x76B703: Query_log_
==7905== by 0x76BC8E: Query_log_
==7905== by 0x52DFC8: apply_event_
==7905== Address 0x150df750 is 2,816 bytes inside a block of size 8,160 free'd
==7905== at 0x4A069D9: free (vg_replace_
==7905== by 0x7F4CDE: my_free (my_malloc.c:128)
==7905== by 0x7EDBE4: free_root (my_alloc.c:371)
==7905== by 0x763E73: User_var_
==7905== by 0x63AFC7: Deferred_
==7905== by 0x763F6E: slave_execute_
==7905== by 0x5A0054: mysql_execute_
==7905== by 0x5A061F: mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_parse.cc:5811)
==7905== by 0x76B703: Query_log_
==7905== by 0x76BC8E: Query_log_
==7905== by 0x52DFC8: apply_event_
==7905== by 0x53756B: exec_relay_
==7905==
==7905==
==7905== HEAP SUMMARY:
==7905== in use at exit: 0 bytes in 0 blocks
==7905== total heap usage: 58,496 allocs, 58,496 frees, 58,071,208 bytes allocated
==7905==
==7905== All heap blocks were freed -- no leaks are possible
==7905==
==7905== For counts of detected and suppressed errors, rerun with: -v
==7905== ERROR SUMMARY: 15434 errors from 758 contexts (suppressed: 4 from 4)
Valgrind report after:
==11123== Memcheck, a memory error detector
==11123== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
==11123== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
==11123== Command: ./bin/mysqld --defaults-
==11123== Parent PID: 7359
==11123==
==11123==
==11123== HEAP SUMMARY:
==11123== in use at exit: 0 bytes in 0 blocks
==11123== total heap usage: 57,056 allocs, 57,056 frees, 54,847,051 bytes allocated
==11123==
==11123== All heap blocks were freed -- no leaks are possible
==11123==
==11123== For counts of detected and suppressed errors, rerun with: -v
==11123== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 4 from 4)
26461