Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.2.4
-
None
-
x86_64 / Fedora 24
g++ (GCC) 6.3.1 20161221 (Red Hat 6.3.1-1)
Description
(cd mysql-test/ ; ./mtr --parallel=4 --force --gdb --max-test-fail=40 main.win )
|
|
Thread 6 "mysqld" received signal SIGSEGV, Segmentation fault.
|
[Switching to Thread 0x7ffff7f20300 (LWP 1890)]
|
0x0000555555b1ad9a in Prepared_statement::~Prepared_statement (this=0x7fffeab78008, __in_chrg=<optimized out>)
|
at /home/dan/repos/mariadb-server/sql/sql_prepare.cc:3677
|
3677 delete cursor;
|
(gdb) bt
|
#0 0x0000555555b1ad9a in Prepared_statement::~Prepared_statement (this=0x7fffeab78008, __in_chrg=<optimized out>)
|
at /home/dan/repos/mariadb-server/sql/sql_prepare.cc:3677
|
#1 0x0000555555b1aeea in Prepared_statement::~Prepared_statement (this=0x7fffeab78008, __in_chrg=<optimized out>)
|
at /home/dan/repos/mariadb-server/sql/sql_prepare.cc:3691
|
#2 0x0000555555ab0c93 in delete_statement_as_hash_key (key=0x7fffeab78008) at /home/dan/repos/mariadb-server/sql/sql_class.cc:3668
|
#3 0x00005555564bf1d3 in my_hash_free_elements (hash=0x7fffeaa14a40) at /home/dan/repos/mariadb-server/mysys/hash.c:123
|
#4 0x00005555564bf2fb in my_hash_reset (hash=0x7fffeaa14a40) at /home/dan/repos/mariadb-server/mysys/hash.c:166
|
#5 0x0000555555ab10f1 in Statement_map::reset (this=0x7fffeaa14a40) at /home/dan/repos/mariadb-server/sql/sql_class.cc:3800
|
#6 0x0000555555aaa39a in THD::free_connection (this=0x7fffeaa13088) at /home/dan/repos/mariadb-server/sql/sql_class.cc:1516
|
#7 0x0000555555a16c82 in unlink_thd (thd=0x7fffeaa13088) at /home/dan/repos/mariadb-server/sql/mysqld.cc:2969
|
#8 0x0000555555a1710a in one_thread_per_connection_end (thd=0x7fffeaa13088, put_in_cache=true)
|
at /home/dan/repos/mariadb-server/sql/mysqld.cc:3110
|
#9 0x0000555555c34c31 in do_handle_one_connection (connect=0x7ffff3c641a8) at /home/dan/repos/mariadb-server/sql/sql_connect.cc:1373
|
#10 0x0000555555c348d7 in handle_one_connection (arg=0x7ffff3c641a8) at /home/dan/repos/mariadb-server/sql/sql_connect.cc:1260
|
#11 0x000055555648f21b in pfs_spawn_thread (arg=0x7ffff3c37608) at /home/dan/repos/mariadb-server/storage/perfschema/pfs.cc:1862
|
#12 0x00007ffff7bc45ca in start_thread () from /lib64/libpthread.so.0
|
#13 0x00007ffff56370ed in clone () from /lib64/libc.so.6
|
|
(gdb) p *this
|
$2 = {<Statement> = {<ilink> = {_vptr.ilink = 0x555556cee830 <vtable for Prepared_statement+16>, prev = 0x0, next = 0x0}, <Query_arena> = {
|
_vptr.Query_arena = 0x555556cee868 <vtable for Prepared_statement+72>, free_list = 0x7fffeaa524a0, mem_root = 0x7fffeab78380,
|
is_backup_arena = false, is_reprepared = false, state = Query_arena::STMT_EXECUTED}, id = 2, mark_used_columns = MARK_COLUMNS_READ, name = {
|
str = 0x7fffeaa4f800 "stmtnt", length = 4}, lex = 0x7fffeab07020, query_string = {string = {
|
str = 0x7fffeaa1c6e0 "select\n pk, c,\n count(*) over w1 as CNT\nfrom t1\nwindow w1 as (partition by c order by pk\n", ' ' <repeats 14 times>, "rows between 2 preceding and 2 following)", length = 146}, cs = 0x555556e9c540 <my_charset_latin1>}, base_query = {Ptr = 0x0,
|
str_length = 0, Alloced_length = 0, extra_alloc = 0, alloced = false, thread_specific = false,
|
str_charset = 0x555556df9e20 <my_charset_bin>}, db = 0x7fffeaa4f830 "test", db_length = 4, query_cache_is_applicable = 0 '\000'},
|
thd = 0x7fffeaa13088, result = {<select_send> = {<select_result> = {<select_result_sink> = {<Sql_alloc> = {dummy_for_valgrind = false},
|
_vptr.select_result_sink = 0x555556cee8e8 <vtable for Select_fetch_protocol_binary+16>, thd = 0x7fffeaa13088}, unit = 0x0},
|
is_result_set_started = false}, protocol = {<Protocol> = {_vptr.Protocol = 0x555556ce8ea8 <vtable for Protocol_binary+16>,
|
packet = 0x7fffeaa13700, convert = 0x7fffeaa13720, field_pos = 0, field_types = 0x0, field_count = 0, thd = 0x7fffeaa13088},
|
bit_fields = 0}}, param_array = 0x0, cursor = 0x555555b6050f <sub_select_postjoin_aggr(JOIN*, st_join_table*, bool)>, packet = 0x0,
|
packet_end = 0x0, iterations = 0, param_count = 0, last_errno = 0, flags = 2, select_number_after_prepare = 1,
|
last_error = '\000' <repeats 511 times>, start_param = 0 '\000',
|
set_params = 0x555555b14c94 <insert_params_with_log(Prepared_statement*, uchar*, uchar*, uchar*, String*)>,
|
set_bulk_params = 0x555555b151a7 <insert_bulk_params(Prepared_statement*, uchar**, uchar*, bool)>,
|
set_params_from_actual_params = 0x555555b1577a <insert_params_from_actual_params_with_log(Prepared_statement*, List<Item>&, String*)>,
|
main_mem_root = {free = 0x0, used = 0x7fffeabaf2c8, pre_alloc = 0x0, min_malloc = 32, block_size = 16345, block_num = 4, first_block_usage = 0,
|
error_handler = 0x555555bfebc5 <sql_alloc_error_handler()>}, m_sql_mode = 1342177280}
|
(gdb) p cursor
|
$3 = (Server_side_cursor *) 0x555555b6050f <sub_select_postjoin_aggr(JOIN*, st_join_table*, bool)>
|
(gdb) p *cursor
|
$4 = {<Query_arena> = {_vptr.Query_arena = 0xec834853e5894855, free_list = 0x758948b87d894858, mem_root = 0x8b48ac4588d089b0,
|
is_backup_arena = 69, is_reprepared = 176, state = 186496}, <Sql_alloc> = {dummy_for_valgrind = false}, result = 0xbe0d8d481f7500c8}
|
0x0000555555b1ad73 <+139>: callq 0x55555650a8ab <_db_doprnt_>
|
0x0000555555b1ad78 <+144>: mov -0x28(%rbp),%rax
|
0x0000555555b1ad7c <+148>: mov 0x128(%rax),%rax
|
0x0000555555b1ad83 <+155>: test %rax,%rax
|
0x0000555555b1ad86 <+158>: je 0x555555b1adad <Prepared_statement::~Prepared_statement()+197>
|
0x0000555555b1ad88 <+160>: mov -0x28(%rbp),%rax
|
0x0000555555b1ad8c <+164>: mov 0x128(%rax),%rax
|
0x0000555555b1ad93 <+171>: mov (%rax),%rax
|
0x0000555555b1ad96 <+174>: add $0x10,%rax
|
=> 0x0000555555b1ad9a <+178>: mov (%rax),%rax
|
0x0000555555b1ad9d <+181>: mov -0x28(%rbp),%rdx
|
0x0000555555b1ada1 <+185>: mov 0x128(%rdx),%rdx
|
0x0000555555b1ada8 <+192>: mov %rdx,%rdi
|
0x0000555555b1adab <+195>: callq *%rax
|
0x0000555555b1adad <+197>: mov -0x28(%rbp),%rax
|
0x0000555555b1adb1 <+201>: add $0x18,%rax
|
0x0000555555b1adb5 <+205>: mov %rax,%rdi
|
0x0000555555b1adb8 <+208>: callq 0x555555ab0534 <Query_arena::free_items()>
|