polardb / polardbx-engine

polardbx-engine is a MySQL branch originated from Alibaba Group, especially supports large-scale distributed database system.
Other
482 stars 125 forks source link

A signal crash caused by assertion failure #9

Closed WLLS253 closed 3 years ago

WLLS253 commented 3 years ago

PoC: create database test; use test; CREATE TABLE v0 ( v1 TIMESTAMP , NONE YEAR ZEROFILL COMMENT 'x' ) ; CREATE TRIGGER v0 BEFORE INSERT ON v0 FOR EACH ROW DROP TABLESPACE MASTER_PASSWORD WAIT ; INSERT INTO v0 VALUES ( 127 , 'x' SOUNDS LIKE v1 IS TRUE ) , ( NULL , NULL ) ;

Log: 2021-10-22T01:19:36.289847-00:00 0 [Warning] [MY-010140] [Server] Could not increase number of max_open_files to more than 1024 (request: 615350) 2021-10-22T01:19:36.289862-00:00 0 [Warning] [MY-010141] [Server] Changed limits: max_connections: 214 (requested 36000) 2021-10-22T01:19:36.289880-00:00 0 [Warning] [MY-010142] [Server] Changed limits: table_open_cache: 400 (requested 32768) 2021-10-22T01:19:36.410489-00:00 0 [Warning] [MY-011069] [Server] The syntax '--relay-log-info-file' is deprecated and will be removed in a future release. 2021-10-22T01:19:36.410524-00:00 0 [Warning] [MY-011069] [Server] The syntax '--master-info-file' is deprecated and will be removed in a future release. 2021-10-22T01:19:36.410622-00:00 0 [Warning] [MY-011069] [Server] The syntax '--log-bin-use-v1-row-events' is deprecated and will be removed in a future release. 2021-10-22T01:19:36.410803-00:00 0 [Warning] [MY-011068] [Server] The syntax 'expire-logs-days' is deprecated and will be removed in a future release. Please use binlog_expire_logs_seconds instead. 2021-10-22T01:19:36.410845-00:00 0 [Warning] [MY-011069] [Server] The syntax '--slave-rows-search-algorithms' is deprecated and will be removed in a future release. 2021-10-22T01:19:36.411057-00:00 0 [Warning] [MY-010084] [Server] options --log-slow-admin-statements, --log-queries-not-using-indexes and --log-slow-slave-statements have no effect if --slow-query-log is not set 2021-10-22T01:19:36.411072-00:00 0 [Warning] [MY-010086] [Server] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2021-10-22T01:19:36.411227-00:00 0 [System] [MY-010116] [Server] /root/workspace/PolarDB/galaxyengine/build/bin/mysqld (mysqld 8.0.18-debug-asan) starting as process 61191 2021-10-22T01:19:36.413769-00:00 0 [Warning] [MY-013242] [Server] --character-set-server: 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous. 2021-10-22T01:19:36.414683-00:00 0 [Warning] [MY-010108] [Server] setrlimit could not change the size of core files to 'infinity'; We may not be able to generate a core file on signals 2021-10-22T01:19:36.551597-00:00 0 [Warning] [MY-012364] [InnoDB] innodb_open_files should not be greater than the open_files_limit.

2021-10-22T01:19:44.507074-00:00 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed. 2021-10-22T01:19:44.612162-00:00 0 [Warning] [MY-000067] [Server] unknown variable 'loose_polarx_port=32886'. 2021-10-22T01:19:44.613246-00:00 0 [Warning] [MY-000067] [Server] unknown variable 'loose_polarx_max_connections=5000'. 2021-10-22T01:19:44.614205-00:00 0 [Warning] [MY-000067] [Server] unknown variable 'loose_cluster-info=127.0.0.1:14886@1'. 2021-10-22T01:19:44.615177-00:00 0 [Warning] [MY-000067] [Server] unknown variable 'loose_cluster-id=5431'. 2021-10-22T01:19:44.616156-00:00 0 [Warning] [MY-000067] [Server] unknown variable 'loose_enable_gts=1'. 2021-10-22T01:19:44.617143-00:00 0 [Warning] [MY-000067] [Server] unknown variable 'loose_log_sql_info=1'. 2021-10-22T01:19:44.618121-00:00 0 [Warning] [MY-000067] [Server] unknown variable 'loose_log_sql_info_index=1'. 2021-10-22T01:19:44.619103-00:00 0 [Warning] [MY-000067] [Server] unknown variable 'loose_indexstat=1'. 2021-10-22T01:19:44.620110-00:00 0 [Warning] [MY-000067] [Server] unknown variable 'loose_tablestat=1'. 2021-10-22T01:19:44.621126-00:00 0 [Warning] [MY-000067] [Server] unknown variable 'loose_slave_pr_mode=TABLE'. 2021-10-22T01:19:44.622147-00:00 0 [Warning] [MY-000067] [Server] unknown variable 'loose_consensus_large_trx=ON'. 2021-10-22T01:19:44.623175-00:00 0 [Warning] [MY-000067] [Server] unknown variable 'loose_consensus-io-thread_cnt=8'. 2021-10-22T01:19:44.624217-00:00 0 [Warning] [MY-000067] [Server] unknown variable 'loose_consensus-worker-thread_cnt=8'. 2021-10-22T01:19:44.625256-00:00 0 [Warning] [MY-000067] [Server] unknown variable 'loose_consensus_max_delay_index=10000'. 2021-10-22T01:19:44.626288-00:00 0 [Warning] [MY-000067] [Server] unknown variable 'loose_consensus-election-timeout=10000'. 2021-10-22T01:19:44.627350-00:00 0 [Warning] [MY-000067] [Server] unknown variable 'loose_consensus_max_packet_size=131072'. 2021-10-22T01:19:44.628391-00:00 0 [Warning] [MY-000067] [Server] unknown variable 'loose_consensus_max_log_size=20M'. 2021-10-22T01:19:44.629446-00:00 0 [Warning] [MY-000067] [Server] unknown variable 'loose_consensus_auto_leader_transfer=ON'. 2021-10-22T01:19:44.630512-00:00 0 [Warning] [MY-000067] [Server] unknown variable 'loose_consensus_log_cache_size=536870912'. 2021-10-22T01:19:44.631583-00:00 0 [Warning] [MY-000067] [Server] unknown variable 'loose_consensus_prefetch_cache_size=268435456'. 2021-10-22T01:19:44.632664-00:00 0 [Warning] [MY-000067] [Server] unknown variable 'loose_consensus_prefetch_window_size=100'. 2021-10-22T01:19:44.633729-00:00 0 [Warning] [MY-000067] [Server] unknown variable 'loose_consensus_auto_reset_match_index=ON'. 2021-10-22T01:19:44.634822-00:00 0 [Warning] [MY-000067] [Server] unknown variable 'loose_cluster-mts-recover-use-index=ON'. 2021-10-22T01:19:44.635915-00:00 0 [Warning] [MY-000067] [Server] unknown variable 'loose_async_commit_thread_count=128'. 2021-10-22T01:19:44.637022-00:00 0 [Warning] [MY-000067] [Server] unknown variable 'loose_commit_lock_done_count=1'. 2021-10-22T01:19:44.638140-00:00 0 [Warning] [MY-000067] [Server] unknown variable 'loose_cluster-log-type-node=OFF'. 2021-10-22T01:19:44.639272-00:00 0 [Warning] [MY-000067] [Server] unknown variable 'loose_log_slow_verbosity=full'. 2021-10-22T01:19:44.640411-00:00 0 [Warning] [MY-000067] [Server] unknown variable 'loose_rds_check_core_file_enabled=ON'. 2021-10-22T01:19:44.641540-00:00 0 [Warning] [MY-000067] [Server] unknown variable 'loose_boost_pk_access=1'. 2021-10-22T01:19:44.642692-00:00 0 [Warning] [MY-000067] [Server] unknown variable 'loose_io_state=1'. 2021-10-22T01:19:44.643842-00:00 0 [Warning] [MY-000067] [Server] unknown variable 'loose_use_myfs=0'. 2021-10-22T01:19:44.645026-00:00 0 [Warning] [MY-000067] [Server] unknown variable 'loose_daemon_memcached_values_delimiter=:;:'. 2021-10-22T01:19:44.646197-00:00 0 [Warning] [MY-000067] [Server] unknown variable 'loose_daemon_memcached_option=-t 32 -c 8000 -p15506'. 2021-10-22T01:19:45.101253-00:00 0 [System] [MY-010931] [Server] /root/workspace/PolarDB/galaxyengine/build/bin/mysqld: ready for connections. Version: '8.0.18-debug-asan' socket: '/root/workspace/PolarDB/galaxyengine/build/run/mysql.sock' port: 4886 Source distribution. 2021-10-22T01:19:45.369035-00:00 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 32886 socket: '/tmp/mysqlx.sock' bind-address: '::' port: 33060 mysqld: sql/sql_parse.cc:3034: int mysql_execute_command(THD, bool): Assertion `!thd->in_sub_stmt' failed. 01:35:07 UTC - mysqld got signal 6 ; Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware. Thread pointer: 0x627000380100 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 = 7fc98f5abbd0 thread_stack 0x100000 /usr/lib/x86_64-linux-gnu/libasan.so.4(+0x566d0) [0x7fc9dbe7b6d0] /root/workspace/PolarDB/galaxyengine/build/bin/mysqld(my_print_stacktrace(unsigned char const, unsigned long)+0xa9) [0x559f563f106d] /root/workspace/PolarDB/galaxyengine/build/bin/mysqld(handle_fatal_signal+0x523) [0x559f5490320e] /lib/x86_64-linux-gnu/libpthread.so.0(+0x153c0) [0x7fc9dbe173c0] /lib/x86_64-linux-gnu/libc.so.6(gsignal+0xcb) [0x7fc9db46618b] /lib/x86_64-linux-gnu/libc.so.6(abort+0x12b) [0x7fc9db445859] /lib/x86_64-linux-gnu/libc.so.6(+0x25729) [0x7fc9db445729] /lib/x86_64-linux-gnu/libc.so.6(+0x36f36) [0x7fc9db456f36] /root/workspace/PolarDB/galaxyengine/build/bin/mysqld(mysql_execute_command(THD, bool)+0x1348) [0x559f544ef0c0] /root/workspace/PolarDB/galaxyengine/build/bin/mysqld(sp_instr_stmt::exec_core(THD, unsigned int)+0xe4) [0x559f541f1f6a] /root/workspace/PolarDB/galaxyengine/build/bin/mysqld(sp_lex_instr::reset_lex_and_exec_core(THD, unsigned int, bool)+0x303) [0x559f541f5d23] /root/workspace/PolarDB/galaxyengine/build/bin/mysqld(sp_lex_instr::validate_lex_and_execute_core(THD, unsigned int, bool)+0x28b) [0x559f541f6a3d] /root/workspace/PolarDB/galaxyengine/build/bin/mysqld(sp_instr_stmt::execute(THD, unsigned int)+0x30b) [0x559f541f7ed5] /root/workspace/PolarDB/galaxyengine/build/bin/mysqld(sp_head::execute(THD, bool)+0xe14) [0x559f541e0462] /root/workspace/PolarDB/galaxyengine/build/bin/mysqld(sp_head::execute_trigger(THD, MYSQL_LEX_CSTRING const&, MYSQL_LEX_CSTRING const&, GRANT_INFO)+0x7f6) [0x559f541e1a32] /root/workspace/PolarDB/galaxyengine/build/bin/mysqld(Trigger::execute(THD)+0x1ea) [0x559f5479f3e2] /root/workspace/PolarDB/galaxyengine/build/bin/mysqld(Trigger_chain::execute_triggers(THD)+0xb3) [0x559f547a2ead] /root/workspace/PolarDB/galaxyengine/build/bin/mysqld(Table_trigger_dispatcher::process_triggers(THD, enum_trigger_event_type, enum_trigger_action_time_type, bool)+0x15c) [0x559f5479062a] /root/workspace/PolarDB/galaxyengine/build/bin/mysqld(call_before_insert_triggers(THD, TABLE, enum_trigger_event_type, MY_BITMAP)+0x87) [0x559f5428f59d] /root/workspace/PolarDB/galaxyengine/build/bin/mysqld(fill_record_n_invoke_before_triggers(THD*, Field*, List&, TABLE, enum_trigger_event_type, int)+0x39c) [0x559f5426a2e2] /root/workspace/PolarDB/galaxyengine/build/bin/mysqld(Sql_cmd_insert_values::execute_inner(THD)+0xfa6) [0x559f5443f37c] /root/workspace/PolarDB/galaxyengine/build/bin/mysqld(Sql_cmd_dml::execute(THD)+0x74d) [0x559f545d1d15] /root/workspace/PolarDB/galaxyengine/build/bin/mysqld(mysql_execute_command(THD, bool)+0x3820) [0x559f544f1598] /root/workspace/PolarDB/galaxyengine/build/bin/mysqld(mysql_parse(THD, Parser_state)+0xa0c) [0x559f544f8d71] /root/workspace/PolarDB/galaxyengine/build/bin/mysqld(dispatch_command(THD, COM_DATA const, enum_server_command)+0x1f61) [0x559f544fb69f] /root/workspace/PolarDB/galaxyengine/build/bin/mysqld(do_command(THD)+0xaa6) [0x559f544fee0f] /root/workspace/PolarDB/galaxyengine/build/bin/mysqld(+0x7ef4819) [0x559f548cb819] /root/workspace/PolarDB/galaxyengine/build/bin/mysqld(+0xa63f4c4) [0x559f570164c4] /lib/x86_64-linux-gnu/libpthread.so.0(+0x9609) [0x7fc9dbe0b609] /lib/x86_64-linux-gnu/libc.so.6(clone+0x43) [0x7fc9db542293]

Trying to get some variables. Some pointers may be invalid and cause the dump to abort. Query (6070016f0e18): DROP TABLESPACE MASTER_PASSWORD WAIT Connection ID (thread ID): 9 Status: NOT_KILLED

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 fish: './bin/mysqld --defaults-file=my…' terminated by signal SIGABRT (Abort)

xpchild commented 3 years ago

Thanks for your case, Pls also report it to bug.mysql.com if you can confirm it on newest mysql version. I'll be very grateful to share feedback and progress with us.