Bug #75994 | Crash on ps_thread_info / sys usage | ||
---|---|---|---|
Submitted: | 22 Feb 2015 10:26 | Modified: | 4 May 2015 12:37 |
Reporter: | Daniël van Eeden (OCA) | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Optimizer | Severity: | S2 (Serious) |
Version: | 5.7.6-m16, 5.7.7 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | crash, sys |
[22 Feb 2015 10:26]
Daniël van Eeden
[22 Feb 2015 10:33]
Daniël van Eeden
From the core file: Program terminated with signal SIGSEGV, Segmentation fault. #0 0x00007f643bc642c1 in __pthread_kill (threadid=<optimized out>, signo=11) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:61 61 ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c: No such file or directory. (gdb) bt #0 0x00007f643bc642c1 in __pthread_kill (threadid=<optimized out>, signo=11) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:61 #1 0x00000000006f3cb4 in handle_fatal_signal (sig=11) at /export/home/pb2/build/sb_0-14375196-1423567394.7/mysql-5.7.6-m16/sql/signal_handler.cc:220 #2 <signal handler called> #3 st_select_lex::simplify_joins (this=0x7f63f8973950, thd=0x7f63f8000b40, join_list=0x7f63f8973af0, top=true, in_sj=false, cond=0x7f63f8973a28, changelog=0x7f6423ceadcc) at /export/home/pb2/build/sb_0-14375196-1423567394.7/mysql-5.7.6-m16/sql/sql_resolver.cc:1492 #4 0x0000000000b21242 in st_select_lex::apply_local_transforms (this=0x7f63f8973950, thd=0x7f63f8000b40, prune=false) at /export/home/pb2/build/sb_0-14375196-1423567394.7/mysql-5.7.6-m16/sql/sql_resolver.cc:428 #5 0x0000000000ae642b in JOIN::optimize (this=0x7f63f8aa97d8) at /export/home/pb2/build/sb_0-14375196-1423567394.7/mysql-5.7.6-m16/sql/sql_optimizer.cc:162 #6 0x0000000000b29f3a in st_select_lex::optimize (this=0x7f63f8973950, thd=0x7f63f8000b40) at /export/home/pb2/build/sb_0-14375196-1423567394.7/mysql-5.7.6-m16/sql/sql_select.cc:1000 #7 0x0000000000b6a68e in st_select_lex_unit::optimize (this=0x7f63f8974dd8, thd=0x7f63f8000b40) at /export/home/pb2/build/sb_0-14375196-1423567394.7/mysql-5.7.6-m16/sql/sql_union.cc:660 #8 0x0000000000a1d0a8 in Item_subselect::exec (this=0x7f63f89b10d0) at /export/home/pb2/build/sb_0-14375196-1423567394.7/mysql-5.7.6-m16/sql/item_subselect.cc:580 #9 0x0000000000a1972d in Item_singlerow_subselect::val_str (this=0x7f63f89b10d0, str=<optimized out>) at /export/home/pb2/build/sb_0-14375196-1423567394.7/mysql-5.7.6-m16/sql/item_subselect.cc:1244 #10 0x000000000073f523 in Item::save_in_field (this=0x7f63f89b10d0, field=0x7f63f8a42a48, no_conversions=false) at /export/home/pb2/build/sb_0-14375196-1423567394.7/mysql-5.7.6-m16/sql/item.cc:6439 #11 0x0000000000a73204 in sp_eval_expr (thd=0x7f63f8000b40, result_field=0x7f63f8a42a48, expr_item_ptr=<optimized out>) at /export/home/pb2/build/sb_0-14375196-1423567394.7/mysql-5.7.6-m16/sql/sp.cc:2729 #12 0x0000000000a7e44a in set_variable (value=<optimized out>, var_idx=<optimized out>, thd=0x7f63f8000b40, this=<optimized out>) at /export/home/pb2/build/sb_0-14375196-1423567394.7/mysql-5.7.6-m16/sql/sp_rcontext.h:156 #13 sp_instr_set::exec_core (this=0x7f63f89b37b8, thd=0x7f63f8000b40, nextp=<optimized out>) at /export/home/pb2/build/sb_0-14375196-1423567394.7/mysql-5.7.6-m16/sql/sp_instr.cc:950 #14 0x0000000000a7ead5 in sp_lex_instr::reset_lex_and_exec_core (this=0x7f63f89b37b8, thd=0x7f63f8000b40, nextp=0x7f6423cebf78, open_tables=<optimized out>) at /export/home/pb2/build/sb_0-14375196-1423567394.7/mysql-5.7.6-m16/sql/sp_instr.cc:364 #15 0x0000000000a80c14 in sp_lex_instr::validate_lex_and_execute_core (this=0x7f63f89b37b8, thd=0x7f63f8000b40, nextp=0x7f6423cebf78, open_tables=true) at /export/home/pb2/build/sb_0-14375196-1423567394.7/mysql-5.7.6-m16/sql/sp_instr.cc:658 #16 0x0000000000a799f3 in sp_head::execute (this=0x7f63f8928a90, thd=0x7f63f8000b40, merge_da_on_success=true) at /export/home/pb2/build/sb_0-14375196-1423567394.7/mysql-5.7.6-m16/sql/sp_head.cc:782 #17 0x0000000000a7b419 in sp_head::execute_function (this=0x7f63f8928a90, thd=0x7f63f8000b40, argp=0x7f63f8005fa0, argcount=0, return_value_fld=<optimized out>) at /export/home/pb2/build/sb_0-14375196-1423567394.7/mysql-5.7.6-m16/sql/sp_head.cc:1272 #18 0x000000000079621a in Item_func_sp::execute_impl (this=0x7f63f8005ef8, thd=0x7f63f8000b40) at /export/home/pb2/build/sb_0-14375196-1423567394.7/mysql-5.7.6-m16/sql/item_func.cc:8143 #19 0x000000000079b377 in Item_func_sp::execute (this=0x7f63f8005ef8) at /export/home/pb2/build/sb_0-14375196-1423567394.7/mysql-5.7.6-m16/sql/item_func.cc:8074 #20 0x00000000007a62c0 in Item_func_sp::val_str(String*) () #21 0x000000000073c2d1 in Item::send (this=0x7f63f8005ef8, protocol=0x7f63f8001068, buffer=0x7f6423ced4e0) at /export/home/pb2/build/sb_0-14375196-1423567394.7/mysql-5.7.6-m16/sql/item.cc:7025 #22 0x0000000000a62939 in Protocol::send_result_set_row (this=0x7f63f8001068, row_items=<optimized out>) at /export/home/pb2/build/sb_0-14375196-1423567394.7/mysql-5.7.6-m16/sql/protocol.cc:1009 #23 0x0000000000aa9a87 in select_send::send_data (this=0x7f63f8a65780, items=...) at /export/home/pb2/build/sb_0-14375196-1423567394.7/mysql-5.7.6-m16/sql/sql_class.cc:2813 #24 0x0000000000ac3691 in JOIN::exec (this=0x7f63f8a41030) at /export/home/pb2/build/sb_0-14375196-1423567394.7/mysql-5.7.6-m16/sql/sql_executor.cc:154 #25 0x0000000000b2a208 in handle_query (thd=0x7f63f8000b40, lex=0x7f63f8002a20, result=0x7f63f8a65780, added_options=1, removed_options=0) at /export/home/pb2/build/sb_0-14375196-1423567394.7/mysql-5.7.6-m16/sql/sql_select.cc:180 #26 0x0000000000aecb93 in execute_sqlcom_select (thd=0x7f63f8000b40, all_tables=<optimized out>) at /export/home/pb2/build/sb_0-14375196-1423567394.7/mysql-5.7.6-m16/sql/sql_parse.cc:4712 #27 0x0000000000aedd00 in mysql_execute_command (thd=0x7f63f8000b40) at /export/home/pb2/build/sb_0-14375196-1423567394.7/mysql-5.7.6-m16/sql/sql_parse.cc:2450 #28 0x0000000000af1c18 in mysql_parse (thd=0x7f63f8000b40, parser_state=<optimized out>) at /export/home/pb2/build/sb_0-14375196-1423567394.7/mysql-5.7.6-m16/sql/sql_parse.cc:5129 #29 0x0000000000af3158 in dispatch_command (command=COM_QUERY, thd=0x7f63f8000b40, packet=0x7f63f8009c21 "", packet_length=24) at /export/home/pb2/build/sb_0-14375196-1423567394.7/mysql-5.7.6-m16/sql/sql_parse.cc:1249 #30 0x0000000000bb5e74 in handle_connection (arg=<optimized out>) at /export/home/pb2/build/sb_0-14375196-1423567394.7/mysql-5.7.6-m16/sql/conn_handler/connection_handler_per_thread.cc:298 #31 0x0000000000f760ba in pfs_spawn_thread (arg=0x3964c20) at /export/home/pb2/build/sb_0-14375196-1423567394.7/mysql-5.7.6-m16/storage/perfschema/pfs.cc:2147 #32 0x00007f643bc5f0a5 in start_thread (arg=0x7f6423cef700) at pthread_create.c:309 #33 0x00007f643a91988d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
[23 Feb 2015 7:42]
MySQL Verification Team
Hello Daniël, Thank you for the report. Thanks, Umesh
[23 Feb 2015 7:42]
MySQL Verification Team
// Build and startup details bin/mysql_install_db --basedir=/export/umesh/mysql-5.7.7 --datadir=/export/umesh/mysql-5.7.7/75994 -v bin/mysqld --basedir=/export/umesh/mysql-5.7.7 --datadir=/export/umesh/mysql-5.7.7/75994 --sql_mode=ONLY_FULL_GROUP_BY --core-file --socket=/tmp/mysql_ushastry.sock --port=15000 --log-error=/export/umesh/mysql-5.7.7/75994/log.err 2>&1 & # Build commit: daf92c9c2c19d9c14233832c6e8824130c77531d date: 2015-02-17 18:24:25 +0530 build-date: 2015-02-17 13:59:50 +0100 short: daf92c9 branch: mysql-5.7 MySQL source 5.7.7 // Loaded http://www.markleith.co.uk/wp-content/uploads/2015/02/ps_thread_info.txt in the 'test' database. Then loaded sys_1.3.0_57_inline.sql (git b8cc207) (gdb) bt #0 0x00007fe8a172b771 in pthread_kill () from /lib64/libpthread.so.0 #1 0x000000000072ebb4 in handle_fatal_signal (sig=11) at /export/home/pb2/build/sb_0-14451182-1424180565.6/mysqlcom-pro-5.7.7-rc/sql/signal_handler.cc:220 #2 <signal handler called> #3 st_select_lex::simplify_joins (this=<optimized out>, thd=<optimized out>, join_list=<optimized out>, top=<optimized out>, in_sj=<optimized out>, cond=0x7fe85006f190, changelog=0x7fe889c2ae1c) at /export/home/pb2/build/sb_0-14451182-1424180565.6/mysqlcom-pro-5.7.7-rc/sql/sql_resolver.cc:1487 #4 0x0000000000bb83f2 in st_select_lex::apply_local_transforms (this=0x7fe85006f0b8, thd=0x7fe850011d80, prune=false) at /export/home/pb2/build/sb_0-14451182-1424180565.6/mysqlcom-pro-5.7.7-rc/sql/sql_resolver.cc:423 #5 0x0000000000b7be0b in JOIN::optimize (this=0x7fe85012ec88) at /export/home/pb2/build/sb_0-14451182-1424180565.6/mysqlcom-pro-5.7.7-rc/sql/sql_optimizer.cc:163 #6 0x0000000000bc04fa in st_select_lex::optimize (this=0x7fe85006f0b8, thd=0x7fe850011d80) at /export/home/pb2/build/sb_0-14451182-1424180565.6/mysqlcom-pro-5.7.7-rc/sql/sql_select.cc:1000 #7 0x0000000000c008ce in st_select_lex_unit::optimize (this=0x7fe8500704d8, thd=0x7fe850011d80) at /export/home/pb2/build/sb_0-14451182-1424180565.6/mysqlcom-pro-5.7.7-rc/sql/sql_union.cc:660 #8 0x0000000000aa83e8 in Item_subselect::exec (this=0x7fe8500ac7d0) at /export/home/pb2/build/sb_0-14451182-1424180565.6/mysqlcom-pro-5.7.7-rc/sql/item_subselect.cc:580 #9 0x0000000000aa451d in Item_singlerow_subselect::val_str (this=0x7fe8500abad0, str=<optimized out>) at /export/home/pb2/build/sb_0-14451182-1424180565.6/mysqlcom-pro-5.7.7-rc/sql/item_subselect.cc:1244 #10 0x000000000077f033 in Item::save_in_field (this=0x7fe8500ac7d0, field=0x7fe85002bf68, no_conversions=false) at /export/home/pb2/build/sb_0-14451182-1424180565.6/mysqlcom-pro-5.7.7-rc/sql/item.cc:6439 #11 0x0000000000b01818 in sp_eval_expr (thd=0x7fe850011d80, result_field=0x7fe85002bf68, expr_item_ptr=<optimized out>) at /export/home/pb2/build/sb_0-14451182-1424180565.6/mysqlcom-pro-5.7.7-rc/sql/sp.cc:2729 #12 0x0000000000b0d77a in set_variable (value=<optimized out>, var_idx=<optimized out>, thd=<optimized out>, this=<optimized out>) at /export/home/pb2/build/sb_0-14451182-1424180565.6/mysqlcom-pro-5.7.7-rc/sql/sp_rcontext.h:156 #13 sp_instr_set::exec_core (this=0x7fe8500aeeb8, thd=0x1, nextp=<optimized out>) at /export/home/pb2/build/sb_0-14451182-1424180565.6/mysqlcom-pro-5.7.7-rc/sql/sp_instr.cc:950 #14 0x0000000000b0eca5 in sp_lex_instr::reset_lex_and_exec_core (this=0x7fe8500aeeb8, thd=0x7fe850011d80, nextp=0x7fe889c2bfb8, open_tables=<optimized out>) at /export/home/pb2/build/sb_0-14451182-1424180565.6/mysqlcom-pro-5.7.7-rc/sql/sp_instr.cc:364 #15 0x0000000000b0f6e6 in sp_lex_instr::validate_lex_and_execute_core (this=0x7fe8500aeeb8, thd=0x7fe850011d80, nextp=0x7fe889c2bfb8, open_tables=<optimized out>) at /export/home/pb2/build/sb_0-14451182-1424180565.6/mysqlcom-pro-5.7.7-rc/sql/sp_instr.cc:658 #16 0x0000000000b082c3 in sp_head::execute (this=0x7fe8500268f0, thd=0x7fe850011d80, merge_da_on_success=<optimized out>) at /export/home/pb2/build/sb_0-14451182-1424180565.6/mysqlcom-pro-5.7.7-rc/sql/sp_head.cc:782 #17 0x0000000000b09469 in sp_head::execute_function (this=<optimized out>, thd=0x7fe850011d80, argp=<optimized out>, argcount=<optimized out>, return_value_fld=<optimized out>) at /export/home/pb2/build/sb_0-14451182-1424180565.6/mysqlcom-pro-5.7.7-rc/sql/sp_head.cc:1272 #18 0x00000000007d944a in Item_func_sp::execute_impl (this=0x7fe8500026d8, thd=0x7fe850011d80) at /export/home/pb2/build/sb_0-14451182-1424180565.6/mysqlcom-pro-5.7.7-rc/sql/item_func.cc:8143 #19 0x00000000007de547 in Item_func_sp::execute (this=0x7fe8500026d8) at /export/home/pb2/build/sb_0-14451182-1424180565.6/mysqlcom-pro-5.7.7-rc/sql/item_func.cc:8074 #20 0x00000000007e9a51 in Item_func_sp::val_str(String*) () #21 0x000000000077bbb1 in Item::send (this=0x7fe8500026d8, protocol=0x7fe8500122a8, buffer=0x7fe889c2d520) at /export/home/pb2/build/sb_0-14451182-1424180565.6/mysqlcom-pro-5.7.7-rc/sql/item.cc:7025 #22 0x0000000000af0d79 in Protocol::send_result_set_row (this=0x7fe8500122a8, row_items=<optimized out>) at /export/home/pb2/build/sb_0-14451182-1424180565.6/mysqlcom-pro-5.7.7-rc/sql/protocol.cc:1009 #23 0x0000000000b3a677 in select_send::send_data (this=0x7fe8500ecda0, items=...) at /export/home/pb2/build/sb_0-14451182-1424180565.6/mysqlcom-pro-5.7.7-rc/sql/sql_class.cc:2813 #24 0x0000000000b57369 in JOIN::exec (this=0x7fe85002a550) at /export/home/pb2/build/sb_0-14451182-1424180565.6/mysqlcom-pro-5.7.7-rc/sql/sql_executor.cc:154 #25 0x0000000000bc07c8 in handle_query (thd=0x7fe850011d80, lex=0x7fe850013c60, result=0x7fe8500ecda0, added_options=<optimized out>, removed_options=<optimized out>) at /export/home/pb2/build/sb_0-14451182-1424180565.6/mysqlcom-pro-5.7.7-rc/sql/sql_select.cc:180 #26 0x0000000000b8223b in execute_sqlcom_select (thd=0x7fe850011d80, all_tables=<optimized out>) at /export/home/pb2/build/sb_0-14451182-1424180565.6/mysqlcom-pro-5.7.7-rc/sql/sql_parse.cc:4737 #27 0x0000000000b83a4d in mysql_execute_command (thd=0x7fe850011d80) at /export/home/pb2/build/sb_0-14451182-1424180565.6/mysqlcom-pro-5.7.7-rc/sql/sql_parse.cc:2450 #28 0x0000000000b879d8 in mysql_parse (thd=0x7fe850011d80, parser_state=<optimized out>) at /export/home/pb2/build/sb_0-14451182-1424180565.6/mysqlcom-pro-5.7.7-rc/sql/sql_parse.cc:5154 #29 0x0000000000b88ef8 in dispatch_command (command=COM_QUERY, thd=0x7fe850011d80, packet=<optimized out>, packet_length=<optimized out>) at /export/home/pb2/build/sb_0-14451182-1424180565.6/mysqlcom-pro-5.7.7-rc/sql/sql_parse.cc:1249 #30 0x0000000000c4da04 in handle_connection (arg=<optimized out>) at /export/home/pb2/build/sb_0-14451182-1424180565.6/mysqlcom-pro-5.7.7-rc/sql/conn_handler/connection_handler_per_thread.cc:298 #31 0x0000000001031f1a in pfs_spawn_thread (arg=<optimized out>) at /export/home/pb2/build/sb_0-14451182-1424180565.6/mysqlcom-pro-5.7.7-rc/storage/perfschema/pfs.cc:2147 #32 0x00007fe8a1726df3 in start_thread () from /lib64/libpthread.so.0 #33 0x00007fe8a03f247d in clone () from /lib64/libc.so.6
[4 May 2015 12:37]
Paul DuBois
Noted in 5.7.8, 5.8.0 changelogs. For a SET = (subquery) statement within a stored procedure, the server could exit if a subquery transformation was performed.