[MDEV-20869] InnoDB: Assertion failure in file /home/buildbot/buildbot/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX/mariadb-10.4.8/storage/innobase/lock/lo ck0lock.cc line 6895 Created: 2019-10-21  Updated: 2020-03-26  Resolved: 2020-03-26

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: 10.4.6, 10.4.8
Fix Version/s: N/A

Type: Bug Priority: Critical
Reporter: Evgene Kochergin Assignee: Marko Mäkelä
Resolution: Incomplete Votes: 0
Labels: need_feedback

Issue Links:
Relates
relates to MDEV-20870 InnoDB: Assertion failure in file /ho... Closed

 Description   

-10-20 11:58:18 0x7f2e0df32700 InnoDB: Assertion failure in file /home/buildbot/buildbot/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX/mariadb-10.4.8/storage/innobase/lock/lo
ck0lock.cc line 6895
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to https://jira.mariadb.org/
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: https://mariadb.com/kb/en/library/innodb-recovery-modes/
InnoDB: about forcing recovery.
191020 11:58:18 [ERROR] mysqld got signal 6 ;
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.8-MariaDB-log
key_buffer_size=67108864
read_buffer_size=2097152
max_used_connections=245
max_threads=2002
thread_count=256
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 20615196 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x7f2d8824abe8
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 = 0x7f2e0df31cc0 thread_stack 0x30000
/usr/sbin/mysqld(my_print_stacktrace+0x2e)[0x558d0fd4183e]
/usr/sbin/mysqld(handle_fatal_signal+0x30f)[0x558d0f7d7e0f]
/lib64/libpthread.so.0(+0xf5d0)[0x7f34c688c5d0]
/lib64/libc.so.6(gsignal+0x37)[0x7f34c4b5f2c7]
/lib64/libc.so.6(abort+0x148)[0x7f34c4b609b8]
/usr/sbin/mysqld(+0x5a0542)[0x558d0f4d3542]
/usr/sbin/mysqld(+0xa968a3)[0x558d0f9c98a3]
/usr/sbin/mysqld(+0xa969bb)[0x558d0f9c99bb]
/usr/sbin/mysqld(+0xa9776a)[0x558d0f9ca76a]
/usr/sbin/mysqld(+0xa97c33)[0x558d0f9cac33]
/usr/sbin/mysqld(+0x59f798)[0x558d0f4d2798]
/usr/sbin/mysqld(+0xb338b9)[0x558d0fa668b9]
/usr/sbin/mysqld(+0xa52c87)[0x558d0f985c87]
/usr/sbin/mysqld(_ZN7handler17ha_index_read_mapEPhPKhm16ha_rkey_function+0x94)[0x558d0f7dd194]
/usr/sbin/mysqld(+0x6e0127)[0x558d0f613127]
/usr/sbin/mysqld(_Z10sub_selectP4JOINP13st_join_tableb+0x1a9)[0x558d0f604dd9]
/usr/sbin/mysqld(_ZN4JOIN10exec_innerEv+0xb9c)[0x558d0f6274cc]
/usr/sbin/mysqld(_ZN4JOIN4execEv+0x33)[0x558d0f627723]
/usr/sbin/mysqld(_Z12mysql_selectP3THDP10TABLE_LISTjR4ListI4ItemEPS4_jP8st_orderS9_S7_S9_yP13select_resultP18st_select_lex_unitP13st_select_lex+0x186)[0x558d0f625a26]
/usr/sbin/mysqld(_Z13handle_selectP3THDP3LEXP13select_resultm+0x1d7)[0x558d0f626597]
/usr/sbin/mysqld(+0x58dd2a)[0x558d0f4c0d2a]
/usr/sbin/mysqld(_Z21mysql_execute_commandP3THD+0x4591)[0x558d0f5cd641]
/usr/sbin/mysqld(_Z11mysql_parseP3THDPcjP12Parser_statebb+0x24b)[0x558d0f5d251b]
/usr/sbin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcjbb+0x1c3e)[0x558d0f5d539e]
/usr/sbin/mysqld(_Z10do_commandP3THD+0x11c)[0x558d0f5d6aac]
/usr/sbin/mysqld(_Z24do_handle_one_connectionP7CONNECT+0x1fa)[0x558d0f6b418a]
/usr/sbin/mysqld(handle_one_connection+0x3d)[0x558d0f6b426d]
/usr/sbin/mysqld(+0xdc124d)[0x558d0fcf424d]
/lib64/libpthread.so.0(+0x7dd5)[0x7f34c6884dd5]
/lib64/libc.so.6(clone+0x6d)[0x7f34c4c2702d]

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0x7f2d8825f710): select guid from naumen_prj_out . calls_queue where prj_id in(231) AND call_up is null and dt_change <> '2019-10-20 11:58:01' for update
Connection ID (thread ID): 956207
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 0 unlimited bytes
Max resident set unlimited unlimited bytes
Max processes 63375 63375 processes
Max open files 16364 16364 files
Max locked memory 65536 65536 bytes
Max address space unlimited unlimited bytes
Max file locks unlimited unlimited locks
Max pending signals 63375 63375 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: core



 Comments   
Comment by Evgene Kochergin [ 2019-10-23 ]

2019-10-23 16:41:27 0x7fa85508c700 InnoDB: Assertion failure in file /home/buildbot/buildbot/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX/mariadb-10.4.8/storage/innobase/lock/lo
ck0lock.cc line 6895
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to https://jira.mariadb.org/
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: https://mariadb.com/kb/en/library/innodb-recovery-modes/
InnoDB: about forcing recovery.
191023 16:41:27 [ERROR] mysqld got signal 6 ;
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.8-MariaDB-log
key_buffer_size=67108864
read_buffer_size=2097152
max_used_connections=198
max_threads=2002
thread_count=209
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 20615196 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x7fa6f80009a8
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 = 0x7fa85508bcc0 thread_stack 0x30000
/usr/sbin/mysqld(my_print_stacktrace+0x2e)[0x56433b07e83e]
/usr/sbin/mysqld(handle_fatal_signal+0x30f)[0x56433ab14e0f]
/lib64/libpthread.so.0(+0xf5d0)[0x7faeeb4165d0]
/lib64/libc.so.6(gsignal+0x37)[0x7faee96e92c7]
/lib64/libc.so.6(abort+0x148)[0x7faee96ea9b8]
/usr/sbin/mysqld(+0x5a0542)[0x56433a810542]
/usr/sbin/mysqld(+0xa968a3)[0x56433ad068a3]
/usr/sbin/mysqld(+0xa969bb)[0x56433ad069bb]
/usr/sbin/mysqld(+0xa9776a)[0x56433ad0776a]
/usr/sbin/mysqld(+0xb316f3)[0x56433ada16f3]
/usr/sbin/mysqld(+0xb34e60)[0x56433ada4e60]
/usr/sbin/mysqld(+0xa52c87)[0x56433acc2c87]
/usr/sbin/mysqld(_ZN7handler17ha_index_read_mapEPhPKhm16ha_rkey_function+0x94)[0x56433ab1a194]
/usr/sbin/mysqld(+0x6e0127)[0x56433a950127]
/usr/sbin/mysqld(_Z10sub_selectP4JOINP13st_join_tableb+0x1a9)[0x56433a941dd9]
/usr/sbin/mysqld(_ZN4JOIN10exec_innerEv+0xb9c)[0x56433a9644cc]
/usr/sbin/mysqld(_ZN4JOIN4execEv+0x33)[0x56433a964723]
/usr/sbin/mysqld(_Z12mysql_selectP3THDP10TABLE_LISTjR4ListI4ItemEPS4_jP8st_orderS9_S7_S9_yP13select_resultP18st_select_lex_unitP13st_select_lex+0x186)[0x56433a962a26]
/usr/sbin/mysqld(_Z13handle_selectP3THDP3LEXP13select_resultm+0x1d7)[0x56433a963597]
/usr/sbin/mysqld(+0x58dd2a)[0x56433a7fdd2a]
/usr/sbin/mysqld(_Z21mysql_execute_commandP3THD+0x4591)[0x56433a90a641]
/usr/sbin/mysqld(_Z11mysql_parseP3THDPcjP12Parser_statebb+0x24b)[0x56433a90f51b]
/usr/sbin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcjbb+0x1c3e)[0x56433a91239e]
/usr/sbin/mysqld(_Z10do_commandP3THD+0x11c)[0x56433a913aac]
/usr/sbin/mysqld(_Z24do_handle_one_connectionP7CONNECT+0x1fa)[0x56433a9f118a]
/usr/sbin/mysqld(handle_one_connection+0x3d)[0x56433a9f126d]
/usr/sbin/mysqld(+0xdc124d)[0x56433b03124d]
/lib64/libpthread.so.0(+0x7dd5)[0x7faeeb40edd5]
/lib64/libc.so.6(clone+0x6d)[0x7faee97b102d]

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0x7fa6f800fe20): select guid from na_prj_out . callue where prj_id in(287) AND call_up is null and dt_change <> '2019-10-23 16:41:02' for update
Connection ID (thread ID): 1331158
Status: NOT_KILLED

Comment by Marko Mäkelä [ 2020-02-25 ]

Magnum72, did you also repeat this on 10.4.6, or only 10.4.8?
The immediate reason for the crash is that the macro check_trx_state() finds a transaction in an invalid state, possibly TRX_STATE_NOT_STARTED, or corrupted memory. This could share a common cause with MDEV-20870. Given that 10.4.8 includes the fix of MDEV-15326, this is somewhat worrying.

We have not seen anything like this in internal testing. I would like to see a test case for repeating this.

One more thought: If you are using innodb_lock_schedule_algorithm=VATS, then this could simply be a duplicate of MDEV-16664.

Generated at Thu Feb 08 09:02:47 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.