[MDEV-20108] [ERROR] mysqld got signal 11 in st_select_lex::add_table_to_list Created: 2019-07-19  Updated: 2019-07-26  Resolved: 2019-07-24

Status: Closed
Project: MariaDB Server
Component/s: Parser, Server
Affects Version/s: 10.4.6
Fix Version/s: 10.4.7

Type: Bug Priority: Blocker
Reporter: Martin Kirchner Assignee: Oleksandr Byelkin
Resolution: Fixed Votes: 0
Labels: crash
Environment:

Ubuntu 18.04


Issue Links:
Relates
relates to MDEV-20100 MariaDB 13.3.9 Crash "[ERROR] mysqld... Closed

 Description   

The bug is reproducible:

CREATE DATABASE `test` /*!40100 COLLATE 'utf8_general_ci' */;
USE `test`;
CREATE TABLE `t1` (
`c1` INT NULL
)
COLLATE='utf8_general_ci'
;
SET STATEMENT max_statement_time=900 FOR LOCK TABLES `t1` WRITE

190719 20:17:34 [ERROR] mysqld got signal 11 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.

To report this bug, see https://mariadb.com/kb/en/reporting-bugs

We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed,
something is definitely wrong and this may fail.

Server version: 10.4.6-MariaDB-1:10.4.6+maria~bionic-log
key_buffer_size=8388608
read_buffer_size=393216
max_used_connections=3
max_threads=82
thread_count=10
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 713412 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x7f0fe0000c08
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0x7f11a0744dd8 thread_stack 0x40000
/usr/sbin/mysqld(my_print_stacktrace+0x2e)[0x55afef2d9e0e]
/usr/sbin/mysqld(handle_fatal_signal+0x515)[0x55afeed52f95]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x12890)[0x7f11a7ffa890]
/usr/sbin/mysqld(_ZN13st_select_lex17add_table_to_listEP3THDP11Table_identP25st_mysql_const_lex_stringm13thr_lock_type13enum_mdl_typeP4ListI10Index_hintEPS8_I6StringEP19st_mysql_lex_string+0x214)[0x55afeeb3eb04]
/usr/sbin/mysqld(_Z10MYSQLparseP3THD+0xa569)[0x55afeece77a9]
/usr/sbin/mysqld(_Z9parse_sqlP3THDP12Parser_stateP19Object_creation_ctxb+0x13d)[0x55afeeb42a5d]
/usr/sbin/mysqld(_Z11mysql_parseP3THDPcjP12Parser_statebb+0x146)[0x55afeeb4b636]
/usr/sbin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcjbb+0x166d)[0x55afeeb4dedd]
/usr/sbin/mysqld(_Z10do_commandP3THD+0x148)[0x55afeeb4f348]
/usr/sbin/mysqld(_Z24do_handle_one_connectionP7CONNECT+0x2c2)[0x55afeec2a542]
/usr/sbin/mysqld(handle_one_connection+0x3d)[0x55afeec2a60d]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x76db)[0x7f11a7fef6db]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x3f)[0x7f11a73ed88f]

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0x7f0fe0010000): SET STATEMENT max_statement_time=900 FOR LOCK TABLES `t1` WRITE
Connection ID (thread ID): 14
Status: NOT_KILLED

Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,condition_pushdown_for_subquery=on,rowid_filter=on,condition_pushdown_from_having=on

The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.
Writing a core file...
Working directory at /var/lib/mysql/sw21dev
Resource Limits:
Limit Soft Limit Hard Limit Units
Max cpu time unlimited unlimited seconds
Max file size unlimited unlimited bytes
Max data size unlimited unlimited bytes
Max stack size 8388608 unlimited bytes
Max core file size 0 unlimited bytes
Max resident set unlimited unlimited bytes
Max processes 31664 31664 processes
Max open files 16364 16364 files
Max locked memory 16777216 16777216 bytes
Max address space unlimited unlimited bytes
Max file locks unlimited unlimited locks
Max pending signals 31664 31664 signals
Max msgqueue size 819200 819200 bytes
Max nice priority 0 0
Max realtime priority 0 0
Max realtime timeout unlimited unlimited us
Core pattern: |/usr/share/apport/apport %p %s %c %d %P



 Comments   
Comment by Martin Kirchner [ 2019-07-19 ]

BTW: The source of "SET STATEMENT max_statement_time=900 FOR" is a query timeout that I set on Spring's JdbcTemplate and which is passed on to the JDBC driver.

Comment by Elena Stepanova [ 2019-07-21 ]

Thanks for the report and test case.

10.4 9d6b601e

#3  <signal handler called>
#4  0x0000562229e5111f in st_select_lex::add_table_to_list (this=0x0, thd=0x7feaf8000b00, table=0x7feaf8013300, alias=0x0, table_options=1, lock_type=TL_WRITE_DEFAULT, mdl_type=MDL_SHARED_NO_READ_WRITE, index_hints_arg=0x0, partition_names=0x0, option=0x0) at /data/src/10.4/sql/sql_parse.cc:8139
#5  0x000056222a0ea629 in MYSQLparse (thd=0x7feaf8000b00) at /data/src/10.4/sql/sql_yacc.yy:16718
#6  0x0000562229e55288 in parse_sql (thd=0x7feaf8000b00, parser_state=0x7feb0809c180, creation_ctx=0x0, do_pfs_digest=true) at /data/src/10.4/sql/sql_parse.cc:9919
#7  0x0000562229e50204 in mysql_parse (thd=0x7feaf8000b00, rawbuf=0x7feaf8013108 "SET STATEMENT max_statement_time=900 FOR LOCK TABLES t1 WRITE", length=61, parser_state=0x7feb0809c180, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:7845
#8  0x0000562229e3c651 in dispatch_command (command=COM_QUERY, thd=0x7feaf8000b00, packet=0x7feaf8008311 "SET STATEMENT max_statement_time=900 FOR LOCK TABLES t1 WRITE", packet_length=61, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:1827
#9  0x0000562229e3ae0f in do_command (thd=0x7feaf8000b00) at /data/src/10.4/sql/sql_parse.cc:1360
#10 0x0000562229fb419a in do_handle_one_connection (connect=0x56222db22350) at /data/src/10.4/sql/sql_connect.cc:1404
#11 0x0000562229fb3ee9 in handle_one_connection (arg=0x56222db22350) at /data/src/10.4/sql/sql_connect.cc:1306
#12 0x000056222a8df2ed in pfs_spawn_thread (arg=0x56222da467e0) at /data/src/10.4/storage/perfschema/pfs.cc:1862
#13 0x00007feb0fa3f4a4 in start_thread (arg=0x7feb0809d700) at pthread_create.c:456
#14 0x00007feb0df87d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97

Comment by Oleksandr Byelkin [ 2019-07-24 ]

commit bccd9d0e3a96ec026d01d24abac1cea7959f0d02 (HEAD > bb-10.4MDEV-20108, origin/bb-10.4-MDEV-20108)
Author: Oleksandr Byelkin <sanja@mariadb.com>
Date: Wed Jul 24 13:20:36 2019 +0200

MDEV-20108: [ERROR] mysqld got signal 11 in st_select_lex::add_table_to_list

Use the same select as for usual table list.

Generated at Thu Feb 08 08:56:53 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.