Bug #80667 innobase_get_computed_value(dtuple_t const*, dict_v_col_t const*, dict_index_t c
Submitted: 9 Mar 2016 7:00 Modified: 17 Mar 2016 12:53
Reporter: Viswanatham Gudipati Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:8.0 OS:Any
Assigned to: CPU Architecture:Any

[9 Mar 2016 7:00] Viswanatham Gudipati
Description:
innodb.virtual_basic : This testcase has been failing sporadically with following symptoms, from 2016-01-07 17:00:39

Failure History:
http://pb2.no.oracle.com/?template=mysql_show_test_failure&test_failure_id=&test_output_id...

Failure log:
---------------
innodb.virtual_basic                     w13 [ fail ]  Found warnings/errors in server log file!
        Test ended at 2016-03-08 20:39:40
line
==27944== Thread 24:
==27944== Invalid read of size 1
==27944==    at 0x4C2E259: memcpy@@GLIBC_2.14 (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==27944==    by 0x1C1BFE9: innobase_get_computed_value(dtuple_t const*, dict_v_col_t const*, dict_index_t const*, mem_block_info_t**, mem_block_info_t*, dict_field_t const*, THD*, TABLE*) (ha_innodb.cc:20430)
==27944==    by 0x1D46D22: row_merge_buf_add(row_merge_buf_t*, dict_index_t*, dict_table_t const*, dict_table_t const*, fts_psort_t*, dtuple_t const*, row_ext_t const*, unsigned long*, mem_block_info_t*, dberr_t*, mem_block_info_t**, TABLE*, trx_t*) (row0merge.cc:608)
==27944==    by 0x1D4B7D6: row_merge_read_clustered_index(trx_t*, TABLE*, dict_table_t const*, dict_table_t const*, bool, dict_index_t**, dict_index_t*, fts_psort_t*, merge_file_t*, unsigned long const*, unsigned long, dtuple_t const*, dict_add_v_col_t const*, unsigned long const*, unsigned long, ib_sequence_t&, unsigned char*, bool, int*, ut_stage_alter_t*, TABLE*) (row0merge.cc:2183)
==27944==    by 0x1D5143A: row_merge_build_indexes(trx_t*, dict_table_t*, dict_table_t*, bool, dict_index_t**, unsigned long const*, unsigned long, TABLE*, dtuple_t const*, unsigned long const*, unsigned long, ib_sequence_t&, bool, ut_stage_alter_t*, dict_add_v_col_t const*, TABLE*) (row0merge.cc:4472)
==27944==    by 0x1C4F4D5: ha_innobase::inplace_alter_table(TABLE*, Alter_inplace_info*) (handler0alter.cc:6066)
==27944==    by 0x122A48A: handler::ha_inplace_alter_table(TABLE*, Alter_inplace_info*) (handler.h:3753)
==27944==    by 0x1221E5D: mysql_inplace_alter_table(THD*, TABLE_LIST*, TABLE*, TABLE*, Alter_inplace_info*, enum_alter_inplace_result, MDL_request*, Alter_table_ctx*) (sql_table.cc:7886)
==27944==    by 0x1226D92: mysql_alter_table(THD*, char const*, char const*, st_ha_create_information*, TABLE_LIST*, Alter_info*) (sql_table.cc:10047)
==27944==    by 0x1A07652: Sql_cmd_alter_table::execute(THD*) (sql_alter.cc:325)
==27944==    by 0x119BDE2: mysql_execute_command(THD*, bool) (sql_parse.cc:4780)
==27944==    by 0x119DCF3: mysql_parse(THD*, Parser_state*) (sql_parse.cc:5487)
==27944==    by 0x1193885: dispatch_command(THD*, COM_DATA const*, enum_server_command) (sql_parse.cc:1439)
==27944==    by 0x1192842: do_command(THD*) (sql_parse.cc:1004)
==27944==    by 0x1387656: handle_connection (connection_handler_per_thread.cc:303)
==27944==    by 0x205D44F: pfs_spawn_thread (pfs.cc:2219)
==27944==  Address 0x2962b081 is 17 bytes inside a block of size 56 free'd
==27944==    at 0x1BAC0A1: my_free (my_malloc.cc:137)
==27944==    by 0x1BA3162: free_root (my_alloc.cc:455)
==27944==    by 0x127AF94: TABLE_SHARE::destroy() (table.cc:544)
==27944==    by 0x127B076: free_table_share(TABLE_SHARE*) (table.cc:567)
==27944==    by 0x11311A0: table_def_free_entry(void*) (sql_base.cc:348)
==27944==    by 0x1B88B21: my_hash_delete(st_hash*, unsigned char*) (hash.cc:601)
==27944==    by 0x1131D01: release_table_share(TABLE_SHARE*) (sql_base.cc:771)
==27944==    by 0x127DDE6: closefrm(TABLE*, bool) (table.cc:1668)
==27944==    by 0x11322BB: intern_close_table(TABLE*) (sql_base.cc:916)
==27944==    by 0x1133487: close_thread_table(THD*, TABLE**) (sql_base.cc:1596)
==27944==    by 0x1132CF4: close_all_tables_for_name(THD*, TABLE_SHARE*, bool, TABLE*) (sql_base.cc:1314)
==27944==    by 0x1221FCF: mysql_inplace_alter_table(THD*, TABLE_LIST*, TABLE*, TABLE*, Alter_inplace_info*, enum_alter_inplace_result, MDL_request*, Alter_table_ctx*) (sql_table.cc:7940)
==27944==    by 0x1226D92: mysql_alter_table(THD*, char const*, char const*, st_ha_create_information*, TABLE_LIST*, Alter_info*) (sql_table.cc:10047)
==27944==    by 0x1197A53: mysql_execute_command(THD*, bool) (sql_parse.cc:3248)
==27944==    by 0x119DCF3: mysql_parse(THD*, Parser_state*) (sql_parse.cc:5487)
==27944==    by 0x1193885: dispatch_command(THD*, COM_DATA const*, enum_server_command) (sql_parse.cc:1439)
==27944==  Block was alloc'd at
==27944==    at 0x1BABD5A: my_malloc (my_malloc.cc:67)
==27944==    by 0x1BA2681: alloc_root (my_alloc.cc:221)
==27944==    by 0x14365FB: prepare_default_value_buffer_and_table_share(THD*, dd::Table const&, TABLE_SHARE*) (default_values.cc:350)
==27944==    by 0x1424708: fill_share_from_dd(THD*, TABLE_SHARE*, dd::Table const*) (dd_table_share.cc:663)
==27944==    by 0x142A71C: open_table_def(THD*, TABLE_SHARE*, bool, dd::Table const*) (dd_table_share.cc:2248)
==27944==    by 0x11315C3: get_table_share(THD*, TABLE_LIST*, char const*, unsigned long, bool, unsigned int) (sql_base.cc:552)
==27944==    by 0x1131A3F: get_table_share_with_discover(THD*, TABLE_LIST*, char const*, unsigned long, int*, unsigned int) (sql_base.cc:672)
==27944==    by 0x11366F4: open_table(THD*, TABLE_LIST*, Open_table_context*) (sql_base.cc:3197)
==27944==    by 0x122212F: mysql_inplace_alter_table(THD*, TABLE_LIST*, TABLE*, TABLE*, Alter_inplace_info*, enum_alter_inplace_result, MDL_request*, Alter_table_ctx*) (sql_table.cc:7968)
==27944==    by 0x1226D92: mysql_alter_table(THD*, char const*, char const*, st_ha_create_information*, TABLE_LIST*, Alter_info*) (sql_table.cc:10047)
==27944==    by 0x1197A53: mysql_execute_command(THD*, bool) (sql_parse.cc:3248)
==27944==    by 0x119DCF3: mysql_parse(THD*, Parser_state*) (sql_parse.cc:5487)
==27944==    by 0x1193885: dispatch_command(THD*, COM_DATA const*, enum_server_command) (sql_parse.cc:1439)
==27944==    by 0x1192842: do_command(THD*) (sql_parse.cc:1004)
==27944==    by 0x1387656: handle_connection (connection_handler_per_thread.cc:303)
==27944==    by 0x205D44F: pfs_spawn_thread (pfs.cc:2219)

How to repeat:
mysql-test-run.pl  --timer --debug-server --force --parallel=auto --max-test-fail=0 --parallel=20 --valgrind --valgrind-option=--gen-suppressions=all --valgrind-option=--show-reachable=yes 

Suggested fix:
Never fail
[17 Mar 2016 12:53] Daniel Price
Posted by developer:
 
Fixed as of the upcoming 5.7.13, 5.8.0 release, and here's the changelog entry:

An invalid read at innobase_get_computed_value() raised a Valgrind error.

Thank you for the bug report.
[18 Jun 2016 21:36] Omer Barnir
Posted by developer:
 
Reported version value updated to reflect release name change from 5.8 to 8.0