Details
-
Bug
-
Status: Closed (View Workflow)
-
Blocker
-
Resolution: Fixed
-
10.4.13, 10.5.3
-
MariaDB-Docker-Image v10.4.13 (10.4 currently points to 10.4.13
Description
-- drop table person_principal
|
create or replace table person_principal |
(
|
person_id bigint not null, |
insurant_id varchar(10) not null, |
principal_id bigint not null, |
principal_officer_id bigint not null, |
nursing_degree tinyint null, |
nursing_degree_valid_from date not null default cast(current_timestamp(6) as date), |
carma_user_id bigint not null, |
current_date_time timestamp(6) not null default current_timestamp(6) on update current_timestamp(6), |
constraint pk_person_principal primary key (person_id asc), |
constraint ck_person_principal_nursing_degree check (nursing_degree in (1,2,3,4,5)) |
);
|
|
-- drop table person_principal_hist
|
create or replace table person_principal_hist |
(
|
person_id bigint not null, |
insurant_id varchar(10) not null, |
principal_id bigint not null, |
principal_officer_id bigint not null, |
nursing_degree tinyint null, |
nursing_degree_valid_from date not null default cast(now() as date), |
carma_user_id bigint not null, |
orig_date_time datetime(6) not null, |
constraint pk_person_principal_hist primary key (person_id asc, orig_date_time asc), |
constraint ck_person_principal_hist_nursing_degree check (nursing_degree in (1,2,3,4,5)) |
);
|
|
-- select * from person_principal
|
insert into person_principal |
(person_id, insurant_id, principal_id, principal_officer_id, nursing_degree, nursing_degree_valid_from, carma_user_id)
|
values
|
(1, 'A123456789', 5, 1, 1, '2018-05-06', 1); |
|
alter table person_principal add column if not exists date_mask tinyint null; |
|
update person_principal set date_mask = 0; |
|
alter table person_principal modify column date_mask tinyint not null; |
leads to a crash with the following output:
2020-05-14 17:45:16 0 [Note] mysqld: ready for connections.
Version: '10.4.13-MariaDB-1:10.4.13+maria~bionic' socket: '/var/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution
2020-05-14 17:45:16 0 [Note] InnoDB: Buffer pool(s) load completed at 200514 17:45:16
200514 17:48:27 [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.13-MariaDB-1:10.4.13+maria~bionic
key_buffer_size=134217728
read_buffer_size=2097152
max_used_connections=3
max_threads=102
thread_count=9
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 760255 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
Thread pointer: 0x7f3740000c08
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 = 0x7f37b83c0dd8 thread_stack 0x49000
mysqld(my_print_stacktrace+0x2e)[0x5579faee8e8e]
mysqld(handle_fatal_signal+0x515)[0x5579fa964915]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x12890)[0x7f37d4e42890]
mysqld(my_charset_latin1+0x0)[0x5579fb88d4c0]
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0x7f374000fff0): alter table person_principal add column if not exists date_mask tinyint null
Connection ID (thread ID): 10
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
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 unlimited unlimited bytes
Max resident set unlimited unlimited bytes
Max processes unlimited unlimited processes
Max open files 1048576 1048576 files
Max locked memory 65536 65536 bytes
Max address space unlimited unlimited bytes
Max file locks unlimited unlimited locks
Max pending signals 30725 30725 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/lib/systemd/systemd-coredump %P %u %g %s %t %c ...
The MariaDB-Docker-Image is derived from Ubuntu:bionic, it is the official image from Docker Hub.
Maybe relates to MDEV-21663, MDEV-21800, or MDEV-21787
Version 10.4.12 is not affected, if that helps.
Best regars, Jan
Attachments
Issue Links
- duplicates
-
MDEV-23019 Crash when executing CREATE INDEX
-
- Closed
-
-
MDEV-23193 bifrost tool fails when running ironic-dbsync create_schema
-
- Closed
-
- is duplicated by
-
MDEV-22684 10.4.13 crashes when creating CHECK constraint
-
- Closed
-
-
MDEV-22784 Constant crash on creating indexes
-
- Closed
-
-
MDEV-23122 Segfault in Item_func_in::cleanup
-
- Closed
-
-
MDEV-23312 MariaDB version 10.4.13 crashes while creating tables for openstack keystone
-
- Closed
-
-
MDEV-23396 Segfault in ALTER TABLE
-
- Closed
-
- relates to
-
MDEV-22684 10.4.13 crashes when creating CHECK constraint
-
- Closed
-
mariadb-10.4.13
mysqltest: At line 40: query 'alter table person_principal add column if not exists date_mask tinyint null' failed: 2013: Lost connection to MySQL server during query
…
Version: '10.4.13-MariaDB-debug-log' socket: '/dev/shm/10.4/mysql-test/var/tmp/mysqld.1.sock' port: 16000 Source distribution
=================================================================
==404008==ERROR: AddressSanitizer: heap-use-after-free on address 0x61d00024cce0 at pc 0x0000016d8ced bp 0x7fde2b54bb10 sp 0x7fde2b54bb08
READ of size 8 at 0x61d00024cce0 thread T27
#0 0x16d8cec in Item_func_in::cleanup() /mariadb/10.4/sql/item_cmpfunc.h:2414:5
#1 0x923399 in Item::delete_self() /mariadb/10.4/sql/item.h:2182:5
#2 0x923399 in Query_arena::free_items() /mariadb/10.4/sql/sql_class.cc:3779:16
#3 0x922e2a in THD::cleanup_after_query() /mariadb/10.4/sql/sql_class.cc:2279:3
#4 0xa3e0b4 in mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool) /mariadb/10.4/sql/sql_parse.cc:7923:10
#5 0xa35aca in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool) /mariadb/10.4/sql/sql_parse.cc:1841:7
#6 0xa3f4ab in do_command(THD*) /mariadb/10.4/sql/sql_parse.cc:1359:17
#7 0xe12a13 in do_handle_one_connection(CONNECT*) /mariadb/10.4/sql/sql_connect.cc:1412:11
#8 0xe12323 in handle_one_connection /mariadb/10.4/sql/sql_connect.cc:1316:3
#9 0x2644dd5 in pfs_spawn_thread /mariadb/10.4/storage/perfschema/pfs.cc:1869:3
#10 0x7fde42710f26 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x8f26)
#11 0x7fde41d6731e in clone (/lib/x86_64-linux-gnu/libc.so.6+0xfd31e)
0x61d00024cce0 is located 96 bytes inside of 1976-byte region [0x61d00024cc80,0x61d00024d438)
freed by thread T27 here:
#0 0x70e4ad in free (/dev/shm/10.4/sql/mysqld+0x70e4ad)
#1 0x2782e44 in my_free /mariadb/10.4/mysys/my_malloc.c:222:5
#2 0x276703d in free_root /mariadb/10.4/mysys/my_alloc.c:429:7
#3 0xd536a6 in closefrm(TABLE*) /mariadb/10.4/sql/table.cc:4076:3
#4 0x106abb5 in intern_close_table(TABLE*) /mariadb/10.4/sql/table_cache.cc:221:3
#5 0x106c7ce in tc_release_table(TABLE*) /mariadb/10.4/sql/table_cache.cc:471:5
#6 0x8b42f5 in close_thread_table(THD*, TABLE**) /mariadb/10.4/sql/sql_base.cc:1078:3
#7 0x8b13a6 in close_all_tables_for_name(THD*, TABLE_SHARE*, ha_extra_function, TABLE*) /mariadb/10.4/sql/sql_base.cc:842:7
#8 0xcc3a1f in mysql_inplace_alter_table(THD*, TABLE_LIST*, TABLE*, TABLE*, Alter_inplace_info*, enum_alter_inplace_result, MDL_request*, Alter_table_ctx*) /mariadb/10.4/sql/sql_table.cc:7783:3
#9 0xcc3a1f in mysql_alter_table(THD*, st_mysql_const_lex_string const*, st_mysql_const_lex_string const*, HA_CREATE_INFO*, TABLE_LIST*, Alter_info*, unsigned int, st_order*, bool) /mariadb/10.4/sql/sql_table.cc:10130:16
#10 0xe284d4 in Sql_cmd_alter_table::execute(THD*) /mariadb/10.4/sql/sql_alter.cc:514:11
#11 0xa4d48e in mysql_execute_command(THD*) /mariadb/10.4/sql/sql_parse.cc:6101:26
#12 0xa3de72 in mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool) /mariadb/10.4/sql/sql_parse.cc:7900:18
#13 0xa35aca in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool) /mariadb/10.4/sql/sql_parse.cc:1841:7
#14 0xa3f4ab in do_command(THD*) /mariadb/10.4/sql/sql_parse.cc:1359:17
#15 0xe12a13 in do_handle_one_connection(CONNECT*) /mariadb/10.4/sql/sql_connect.cc:1412:11
#16 0xe12323 in handle_one_connection /mariadb/10.4/sql/sql_connect.cc:1316:3
previously allocated by thread T27 here:
#0 0x70e72d in malloc (/dev/shm/10.4/sql/mysqld+0x70e72d)
#1 0x2782aa4 in my_malloc /mariadb/10.4/mysys/my_malloc.c:101:10
#2 0x2766268 in alloc_root /mariadb/10.4/mysys/my_alloc.c:250:30
#3 0x1093cf5 in Sql_alloc::operator new(unsigned long, st_mem_root*) /mariadb/10.4/sql/sql_alloc.h:39:12
#4 0x1093cf5 in add_virtual_expression(THD*, Item*) /mariadb/10.4/sql/sql_yacc.yy:675:27
#5 0x1093cf5 in MYSQLparse(THD*) /mariadb/10.4/sql/sql_yacc.yy:6774:37
#6 0xa6e593 in parse_sql(THD*, Parser_state*, Object_creation_ctx*, bool) /mariadb/10.4/sql/sql_parse.cc:10206:11
#7 0xd48b30 in unpack_vcol_info_from_frm(THD*, st_mem_root*, TABLE*, String*, Virtual_column_info**, bool*) /mariadb/10.4/sql/table.cc:3430:10
#8 0xd45e53 in parse_vcol_defs(THD*, st_mem_root*, TABLE*, bool*, vcol_init_mode) /mariadb/10.4/sql/table.cc:1193:13
#9 0xd4fc08 in open_table_from_share(THD*, TABLE_SHARE*, st_mysql_const_lex_string const*, unsigned int, unsigned int, unsigned int, TABLE*, bool, List<String>*) /mariadb/10.4/sql/table.cc:3816:9
#10 0x8b957a in open_table(THD*, TABLE_LIST*, Open_table_context*) /mariadb/10.4/sql/sql_base.cc:2082:12
#11 0x8c22be in open_and_process_table(THD*, TABLE_LIST*, unsigned int*, unsigned int, Prelocking_strategy*, bool, Open_table_context*) /mariadb/10.4/sql/sql_base.cc:3850:14
#12 0x8c22be in open_tables(THD*, DDL_options_st const&, TABLE_LIST**, unsigned int*, unsigned int, Prelocking_strategy*) /mariadb/10.4/sql/sql_base.cc:4322:14
#13 0x8cbf58 in open_and_lock_tables(THD*, DDL_options_st const&, TABLE_LIST*, bool, unsigned int, Prelocking_strategy*) /mariadb/10.4/sql/sql_base.cc:5226:7
#14 0x982176 in open_and_lock_tables(THD*, TABLE_LIST*, bool, unsigned int) /mariadb/10.4/sql/sql_base.h:503:10
#15 0x982176 in mysql_insert(THD*, TABLE_LIST*, List<Item>&, List<List<Item> >&, List<Item>&, List<Item>&, enum_duplicates, bool) /mariadb/10.4/sql/sql_insert.cc:764:9
#16 0xa53e5e in mysql_execute_command(THD*) /mariadb/10.4/sql/sql_parse.cc:4528:10
#17 0xa3de72 in mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool) /mariadb/10.4/sql/sql_parse.cc:7900:18
#18 0xa35aca in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool) /mariadb/10.4/sql/sql_parse.cc:1841:7
#19 0xa3f4ab in do_command(THD*) /mariadb/10.4/sql/sql_parse.cc:1359:17
#20 0xe12a13 in do_handle_one_connection(CONNECT*) /mariadb/10.4/sql/sql_connect.cc:1412:11
#21 0xe12323 in handle_one_connection /mariadb/10.4/sql/sql_connect.cc:1316:3
Thread T27 created by T0 here:
#0 0x6f94da in pthread_create (/dev/shm/10.4/sql/mysqld+0x6f94da)
#1 0x2648a61 in spawn_thread_v1(unsigned int, unsigned long*, pthread_attr_t const*, void* (*)(void*), void*) /mariadb/10.4/storage/perfschema/pfs.cc:1919:15
InnoDB does not appear to be a culprit. I did set default_storage_engine=innodb, though.
mariadb-10.4.12
innodb.f 'innodb' [ pass ] 41