[MDEV-24076] innodb_zip.create_options failed in buildbot: InnoDB: Failing assertion: lock->lock_word == X_LOCK_DECR Created: 2020-10-31  Updated: 2023-11-29  Resolved: 2023-11-29

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

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Thirunarayanan Balathandayuthapani
Resolution: Cannot Reproduce Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-24876 InnoDB: Failing assertion: lock->lock... Stalled

 Description   

As far as I can tell, by the time the failure occurred in buildbot the fix for MDEV-21329 was already in the branch

http://buildbot.askmonty.org/buildbot/builders/kvm-bintar-quantal-amd64/builds/23001

10.2 222e1b806ff93083a62f740f6d247f80

innodb_zip.create_options '16k,innodb'   w4 [ fail ]
        Test ended at 2020-10-10 11:54:19
 
CURRENT_TEST: innodb_zip.create_options
mysqltest: At line 391: query 'ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4' failed: 2013: Lost connection to MySQL server during query
 
The result from queries just before the failure was:
< snip >
Level	Code	Message
Warning	1478	InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
Warning	1478	InnoDB: assuming ROW_FORMAT=DYNAMIC.
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
TABLE_NAME	ROW_FORMAT	CREATE_OPTIONS
t1	Dynamic	row_format=FIXED key_block_size=1
DROP TABLE t1;
CREATE TABLE t1 ( i INT );
ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=2;
Warnings:
Warning	1478	InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
SHOW WARNINGS;
Level	Code	Message
Warning	1478	InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
TABLE_NAME	ROW_FORMAT	CREATE_OPTIONS
t1	Compact	row_format=COMPACT key_block_size=2
DROP TABLE t1;
CREATE TABLE t1 ( i INT );
ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4;
 
More results from queries before failure can be found in /usr/local/mariadb-10.2.35-linux-x86_64/mysql-test/var/4/log/create_options.log
 
 
Server [mysqld.1 - pid: 28328, winpid: 28328, exit: 256] failed during test run
Server log from this test:
----------SERVER LOG START-----------
2020-10-10 11:54:19 0x7fb4857fa700  InnoDB: Assertion failure in file /home/buildbot/buildbot/build/storage/innobase/sync/sync0rw.cc line 259
InnoDB: Failing assertion: lock->lock_word == X_LOCK_DECR
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.
201010 11:54:19 [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.2.35-MariaDB-log
key_buffer_size=1048576
read_buffer_size=131072
max_used_connections=2
max_threads=153
thread_count=8
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 63019 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
 
Thread pointer: 0x7fb4700009a8
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 = 0x7fb4857f9cb0 thread_stack 0x49000
/usr/local/mariadb-10.2.35-linux-x86_64/bin/mysqld(my_print_stacktrace+0x2e)[0x7fb49c9319fe]
/usr/local/mariadb-10.2.35-linux-x86_64/bin/mysqld(handle_fatal_signal+0x30d)[0x7fb49c390bed]
/lib/x86_64-linux-gnu/libpthread.so.0(+0xfcb0)[0x7fb49b868cb0]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x35)[0x7fb49a68a425]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x17b)[0x7fb49a68db8b]
/usr/local/mariadb-10.2.35-linux-x86_64/bin/mysqld(+0x49a4b0)[0x7fb49c1354b0]
/usr/local/mariadb-10.2.35-linux-x86_64/bin/mysqld(+0x9a271b)[0x7fb49c63d71b]
/usr/local/mariadb-10.2.35-linux-x86_64/bin/mysqld(+0xa57f34)[0x7fb49c6f2f34]
/usr/local/mariadb-10.2.35-linux-x86_64/bin/mysqld(+0xa78b8f)[0x7fb49c713b8f]
/usr/local/mariadb-10.2.35-linux-x86_64/bin/mysqld(+0xa16676)[0x7fb49c6b1676]
/usr/local/mariadb-10.2.35-linux-x86_64/bin/mysqld(+0xa44973)[0x7fb49c6df973]
/usr/local/mariadb-10.2.35-linux-x86_64/bin/mysqld(+0xa46770)[0x7fb49c6e1770]
/usr/local/mariadb-10.2.35-linux-x86_64/bin/mysqld(+0xa46ff9)[0x7fb49c6e1ff9]
/usr/local/mariadb-10.2.35-linux-x86_64/bin/mysqld(+0xa264fc)[0x7fb49c6c14fc]
/usr/local/mariadb-10.2.35-linux-x86_64/bin/mysqld(+0xa49caf)[0x7fb49c6e4caf]
/usr/local/mariadb-10.2.35-linux-x86_64/bin/mysqld(+0xa28ae5)[0x7fb49c6c3ae5]
/usr/local/mariadb-10.2.35-linux-x86_64/bin/mysqld(+0x9af507)[0x7fb49c64a507]
/usr/local/mariadb-10.2.35-linux-x86_64/bin/mysqld(+0x9b5591)[0x7fb49c650591]
/usr/local/mariadb-10.2.35-linux-x86_64/bin/mysqld(+0x998a55)[0x7fb49c633a55]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x7e9a)[0x7fb49b860e9a]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7fb49a747cbd]
 
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0x0): (null)
Connection ID (thread ID): 1
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=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on
 
The manual page at https://mariadb.com/kb/en/how-to-produce-a-full-stack-trace-for-mysqld/ contains
information that should help you find out what is causing the crash.
 
We think the query pointer is invalid, but we will try to print it anyway. 
Query: 
 
Writing a core file...
Working directory at /run/shm/var_auto_ReAr/4/mysqld.1/data
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             47619                47619                processes 
Max open files            1024                 1024                 files     
Max locked memory         65536                65536                bytes     
Max address space         unlimited            unlimited            bytes     
Max file locks            unlimited            unlimited            locks     
Max pending signals       47619                47619                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
 
----------SERVER LOG END-------------



 Comments   
Comment by Marko Mäkelä [ 2023-11-29 ]

The latest failure of this type occurred more than 3 years ago:

10.2 222e1b806ff93083a62f740f6d247f80

innodb_zip.create_options '16k,innodb'   w4 [ fail ]
        Test ended at 2020-10-10 11:54:19
 
CURRENT_TEST: innodb_zip.create_options
mysqltest: At line 391: query 'ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4' failed: 2013: Lost connection to MySQL server during query
----------SERVER LOG START-----------
2020-10-10 11:54:19 0x7fb4857fa700  InnoDB: Assertion failure in file /home/buildbot/buildbot/build/storage/innobase/sync/sync0rw.cc line 259
InnoDB: Failing assertion: lock->lock_word == X_LOCK_DECR

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