vp_copy_table crashes on MySQL-5.5.8, vp-0.13

Bug #737266 reported by SangJin, Park
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Vertical Partitioning for MySQL
Fix Released
High
Kentoku SHIBA

Bug Description

vp_copy_table crahses on MySQL-5.5.8 + vp-0.13

vp_copy_table got into infinite loop, went out of memory.

#1340 0x00000000009b2ce6 in alloc_root (mem_root=0x1b76690, length=376) at /mysql/mysys/my_alloc.c:217
#1341 0x000000000052c11d in Sql_alloc::operator new (size=376, mem_root=0x1b76690) at /mysql/sql/sql_list.h:50
#1342 0x000000000058b781 in Warning_info::push_warning (this=0x1b76690, thd=0x1b73bb0, sql_errno=5, sqlstate=0xa17c51 "HY000", level=WARN_LEVEL_ERROR, msg=0x48288ca0 "Out of memory (Needed 2016 bytes)") at /mysql/sql/sql_error.cc:550
#1343 0x0000000000580620 in THD::raise_condition (this=0x1b73bb0, sql_errno=5, sqlstate=0xa17c51 "HY000", level=WARN_LEVEL_ERROR, msg=0x48288ca0 "Out of memory (Needed 2016 bytes)") at /mysql/sql/sql_class.cc:863
#1344 0x0000000000526b10 in my_message_sql (error=5, str=0x48288ca0 "Out of memory (Needed 2016 bytes)", MyFlags=100) at /mysql/sql/mysqld.cc:2832
#1345 0x00000000009b4f32 in my_error (nr=5, MyFlags=100) at /mysql/mysys/my_error.c:96
#1346 0x00000000009bc240 in my_malloc (size=2016, my_flags=1040) at /mysql/mysys/my_malloc.c:51
#1347 0x00000000009b2ce6 in alloc_root (mem_root=0x1b76690, length=376) at /mysql/mysys/my_alloc.c:217
#1348 0x000000000052c11d in Sql_alloc::operator new (size=376, mem_root=0x1b76690) at /mysql/sql/sql_list.h:50
#1349 0x000000000058b781 in Warning_info::push_warning (this=0x1b76690, thd=0x1b73bb0, sql_errno=5, sqlstate=0xa17c51 "HY000", level=WARN_LEVEL_ERROR, msg=0x48289170 "Out of memory (Needed 2232 bytes)") at /mysql/sql/sql_error.cc:550
#1350 0x0000000000580620 in THD::raise_condition (this=0x1b73bb0, sql_errno=5, sqlstate=0xa17c51 "HY000", level=WARN_LEVEL_ERROR, msg=0x48289170 "Out of memory (Needed 2232 bytes)") at /mysql/sql/sql_class.cc:863
#1351 0x0000000000526b10 in my_message_sql (error=5, str=0x48289170 "Out of memory (Needed 2232 bytes)", MyFlags=100) at /mysql/sql/mysqld.cc:2832
#1352 0x00000000009b4f32 in my_error (nr=5, MyFlags=100) at /mysql/mysys/my_error.c:96
#1353 0x00000000009bc240 in my_malloc (size=2232, my_flags=16) at /mysql/mysys/my_malloc.c:51
#1354 0x000000000056b9e5 in open_table (thd=0x1b73bb0, table_list=0x1c098a0, mem_root=0x48289aa0, ot_ctx=0x48289ae0) at /mysql/sql/sql_base.cc:3043
#1355 0x000000000056c221 in open_and_process_table (thd=0x1b73bb0, lex=0x1b75508, tables=0x1c098a0, counter=0x48289bdc, flags=0, prelocking_strategy=0x48289c10, has_prelocking_list=false, ot_ctx=0x48289ae0, new_frm_mem=0x48289aa0) at /mysql/sql/sql_base.cc:4382
#1356 0x000000000056c98a in open_tables (thd=0x1b73bb0, start=0x48289bb0, counter=0x48289bdc, flags=0, prelocking_strategy=0x48289c10) at /mysql/sql/sql_base.cc:4822
#1357 0x000000000056ce57 in open_and_lock_tables (thd=0x1b73bb0, tables=0x1c0f5d8, derived=false, flags=0, prelocking_strategy=0x48289c10) at /mysql/sql/sql_base.cc:5425
#1358 0x000000000055fbad in open_and_lock_tables (thd=0x1b73bb0, tables=0x1c0f5d8, derived=false, flags=0) at /mysql/sql/sql_base.h:475
#1359 0x00002aaaab9b631b in vp_copy_tables_body (initid=0x1c01648, args=0x1c01608, is_null=0x1c01679 "", error=0x1c01678 "") at /mysql/storage/vp/vp_copy_tables.cc:1041
#1360 0x00002aaaab9b2ef3 in vp_copy_tables (initid=0x1c01648, args=0x1c01608, is_null=0x1c01679 "", error=0x1c01678 "") at /mysql/storage/vp/vp_udf.cc:28
#1361 0x000000000073caef in udf_handler::val_int (this=0x1c015f8, null_value=0x1c0159b "") at /mysql/sql/sql_udf.h:108
#1362 0x000000000072b8b8 in Item_func_udf_int::val_int (this=0x1c01548) at /mysql/sql/item_func.cc:3457
#1363 0x00000000006e8f68 in Item::send (this=0x1c01548, protocol=0x1b74050, buffer=0x4828bb50) at /mysql/sql/item.cc:5882
#1364 0x000000000053247b in Protocol::send_result_set_row (this=0x1b74050, row_items=0x1b75ce0) at /mysql/sql/protocol.cc:850
#1365 0x000000000057eaad in select_send::send_data (this=0x1c017c8, items=...) at /mysql/sql/sql_class.cc:1828
#1366 0x00000000005f0a49 in JOIN::exec (this=0x1c017e8) at /mysql/sql/sql_select.cc:1859
#1367 0x00000000005ed912 in mysql_select (thd=0x1b73bb0, rref_pointer_array=0x1b75da8, tables=0x0, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x1c017c8, unit=0x1b755b8, select_lex=0x1b75bd8) at /mysql/sql/sql_select.cc:2570
#1368 0x00000000005f271f in handle_select (thd=0x1b73bb0, lex=0x1b75508, result=0x1c017c8, setup_tables_done_option=0) at /mysql/sql/sql_select.cc:297
#1369 0x00000000005a5bc4 in execute_sqlcom_select (thd=0x1b73bb0, all_tables=0x0) at /mysql/sql/sql_parse.cc:4452
#1370 0x00000000005a68ba in mysql_execute_command (thd=0x1b73bb0) at /mysql/sql/sql_parse.cc:2046
#1371 0x00000000005aca42 in mysql_parse (thd=0x1b73bb0, rawbuf=0x1c011e0 "select vp_copy_tables('tbl_a', 'tbl_a2', 'tbl_a3')", length=50, parser_state=0x4828da00) at /mysql/sql/sql_parse.cc:5496
#1372 0x00000000005ad9c3 in dispatch_command (command=COM_QUERY, thd=0x1b73bb0, packet=0x1bf91b1 "", packet_length=50) at /mysql/sql/sql_parse.cc:1032
#1373 0x00000000005aebbd in do_command (thd=0x1b73bb0) at /mysql/sql/sql_parse.cc:772
#1374 0x0000000000662028 in do_handle_one_connection (thd_arg=0x1b73bb0) at /mysql/sql/sql_connect.cc:745
#1375 0x000000000066211b in handle_one_connection (arg=0x1b73bb0) at /mysql/sql/sql_connect.cc:684
#1376 0x000000385380673d in start_thread () from /lib64/libpthread.so.0
#1377 0x00000038530d3f6d in clone () from /lib64/libc.so.6

vp_copy_tables_body calls open_and_lock_tables twice,
so the 2nd calling vp_ha::extra(HA_EXTRA_ADD_CHILDREN_LIST) cause table_list->next_global linked list loop.

Changed in vpformysql:
assignee: nobody → Kentoku SHIBA (kentokushiba)
Revision history for this message
Kentoku SHIBA (kentokushiba) wrote :

Thank you for a bug report!

Please use this attached file for avoiding this problem.

Changed in vpformysql:
status: New → In Progress
importance: Undecided → High
Revision history for this message
Kentoku SHIBA (kentokushiba) wrote :

Released with 0.14.

Changed in vpformysql:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers