Assertion failure: rec.h:279:rec_info_bits_valid(val)

Description

The assertion caused the datadir corruption and the server failed to restart. On every attempt to start the server, same assertion is thrown with a coredump.

This assertion is seen while running pstress with normal shutdown.

Issue is seen when default_table_encryption is set to either ONLINE_TO_KEYRING or ONLINE_FROM_KEYRING_TO_UNENCRYPTED

Steps to reproduce:
./pstress-ps --database=test --threads=10 --queries-per-thread=100000 --logdir=/tmp/309658/19 --user=root --socket=/tmp/309658/19/socket.sock --seed 309658 --step 19 --metadata-path /home/mohit.joshi/test_p/309658/ --seconds 100 --tables 10 --records 500 --log-all-queries --log-failed-queries --mso=default_table_encryption=ON=OFF==ONLINE_TO_KEYRING=ONLINE_FROM_KEYRING_TO_UNENCRYPTED --mso=innodb_encryption_threads=0=4 --mso=innodb_file_per_table=ON=OFF --set-variable 300 --alter-table-encrypt-inplace 600 --alter-table-encrypt 800 --modify-column 500 --alter-table-compress 500 --add-column 200 --drop-column 200 --drop-index 100 --add-index 100 --rename-column 100 --delete-with-cond 5 --update-with-cond 5 --select-single-row 1 --insert-row 10 --rotate-master-key 100

Stacktrace:
#0 __pthread_kill (threadid=<optimized out>, signo=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:62
#1 0x000000000468db39 in my_write_core (sig=6) at /home/mohit.joshi/mysql-8.0/mysys/stacktrace.cc:308
#2 0x00000000035d9382 in handle_fatal_signal (sig=6) at /home/mohit.joshi/mysql-8.0/sql/signal_handler.cc:174
#3 <signal handler called>
#4 0x00007f8db470c438 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
#5 0x00007f8db470e03a in __GI_abort () at abort.c:89
#6 0x0000000004af4b93 in ut_dbg_assertion_failed (expr=0x66cfbb3 "rec_info_bits_valid(val)", file=0x66cfb68 "/home/mohit.joshi/mysql-8.0/storage/innobase/rem/rec.h", line=279) at /home/mohit.joshi/mysql-8.0/storage/innobase/ut/ut0dbg.cc:98
#7 0x0000000004b5525d in rec_get_info_bits (rec=0x7f8d9061137e "\203M\222L\310\034\272\233p\326_\230*\215\265B\270\326\302\230\061ˠs\243)\\V\214\240\n\027D\201\b\351\310\004\253K3\347/]\252h\004\303\354\377\211\327d6\236xT!3f3\274в&V\272'Rl(c\336b\203\231j\264\232+Zp\223\252\263s\241\260:R\022\256\207\226\035\225\272ƽ\203a:eN9f\250\022\212j\273\361 f[,۴B\033\004^\227D\322\fAz3\332\360\021\370\275\254`\375\060\343C\305.\246\v\232\303\306kZ\222\241\023\337%\267\303 \354\026CB\004\312\311\006\327\254_Q\333F;\314\352}\220&[J*\240\315!5\241\206\343`\017\274CW\265\336\\\214\006?5\217\207\065\060\066Z]\231\245\214$", comp=1) at /home/mohit.joshi/mysql-8.0/storage/innobase/rem/rec.h:279
#8 0x0000000004b560bd in rec_set_deleted_flag_new (rec=0x7f8d9061137e "\203M\222L\310\034\272\233p\326_\230*\215\265B\270\326\302\230\061ˠs\243)\\V\214\240\n\027D\201\b\351\310\004\253K3\347/]\252h\004\303\354\377\211\327d6\236xT!3f3\274в&V\272'Rl(c\336b\203\231j\264\232+Zp\223\252\263s\241\260:R\022\256\207\226\035\225\272ƽ\203a:eN9f\250\022\212j\273\361 f[,۴B\033\004^\227D\322\fAz3\332\360\021\370\275\254`\375\060\343C\305.\246\v\232\303\306kZ\222\241\023\337%\267\303 \354\026CB\004\312\311\006\327\254_Q\333F;\314\352}\220&[J*\240\315!5\241\206\343`\017\274CW\265\336\\\214\006?5\217\207\065\060\066Z]\231\245\214$", page_zip=0x0, flag=1) at /home/mohit.joshi/mysql-8.0/storage/innobase/include/rem0rec.ic:460
#9 0x0000000004b59196 in btr_rec_set_deleted_flag (rec=0x7f8d9061137e "\203M\222L\310\034\272\233p\326_\230*\215\265B\270\326\302\230\061ˠs\243)\\V\214\240\n\027D\201\b\351\310\004\253K3\347/]\252h\004\303\354\377\211\327d6\236xT!3f3\274в&V\272'Rl(c\336b\203\231j\264\232+Zp\223\252\263s\241\260:R\022\256\207\226\035\225\272ƽ\203a:eN9f\250\022\212j\273\361 f[,۴B\033\004^\227D\322\fAz3\332\360\021\370\275\254`\375\060\343C\305.\246\v\232\303\306kZ\222\241\023\337%\267\303 \354\026CB\004\312\311\006\327\254_Q\333F;\314\352}\220&[J*\240\315!5\241\206\343`\017\274CW\265\336\\\214\006?5\217\207\065\060\066Z]\231\245\214$", page_zip=0x0, flag=1) at /home/mohit.joshi/mysql-8.0/storage/innobase/include/btr0cur.ic:169
#10 0x0000000004b6715d in btr_cur_parse_del_mark_set_clust_rec (ptr=0x7f8da1da3f83 "", end_ptr=0x7f8da1da3f83 "", page=0x7f8d90610000 "R4\303\016", page_zip=0x0, index=0x7f8d80002960) at /home/mohit.joshi/mysql-8.0/storage/innobase/btr/btr0cur.cc:4383
#11 0x00000000048f772f in recv_parse_or_apply_log_rec_body (type=MLOG_COMP_REC_CLUST_DELETE_MARK, ptr=0x7f8da1da3f72 "", end_ptr=0x7f8da1da3f83 "", space_id=245, page_no=3, apply=true, block=0x7f8d8fa48c00, mtr=0x7f8d9ebfc520, parsed_bytes=18446744073709551615) at /home/mohit.joshi/mysql-8.0/storage/innobase/log/log0recv.cc:1925
#12 0x00000000048f9608 in recv_recover_page_func (just_read_in=true, block=0x7f8d8fa48c00) at /home/mohit.joshi/mysql-8.0/storage/innobase/log/log0recv.cc:2534
#13 0x0000000004b9cb2e in buf_page_io_complete (bpage=0x7f8d8fa48c00, evict=false) at /home/mohit.joshi/mysql-8.0/storage/innobase/buf/buf0buf.cc:5423
#14 0x0000000004cbb9e3 in fil_aio_wait (segment=2) at /home/mohit.joshi/mysql-8.0/storage/innobase/fil/fil0fil.cc:8401
#15 0x0000000004a610f6 in io_handler_thread (segment=2) at /home/mohit.joshi/mysql-8.0/storage/innobase/srv/srv0start.cc:305
#16 0x0000000004a7a813 in std::_invoke_impl<void, void (*&)(unsigned long), unsigned long&> (_f=@0x7f8d9ebfdce0: 0x4a60f79 <io_handler_thread(ulint)>) at /usr/local/include/c++/10.1.0/bits/invoke.h:60
#17 0x0000000004a7a77c in std::_invoke<void (*&)(unsigned long), unsigned long&> (_fn=@0x7f8d9ebfdce0: 0x4a60f79 <io_handler_thread(ulint)>) at /usr/local/include/c++/10.1.0/bits/invoke.h:95
#18 0x0000000004a7a6e6 in std::Bind<void (*(unsigned long))(unsigned long)>::_call<void, , 0ul>(std::tuple<>&&, std::_Index_tuple<0ul>) (this=0x7f8d9ebfdce0, __args=<unknown type in /home/mohit.joshi/test_p/309658_shutdown_crash_2/mysqld/mysqld, CU 0xc785cb9, DIE 0xc8419cd>) at /usr/local/include/c++/10.1.0/functional:416
#19 0x0000000004a7a620 in std::_Bind<void (*(unsigned long))(unsigned long)>::operator()<, void>() (this=0x7f8d9ebfdce0) at /usr/local/include/c++/10.1.0/functional:499
#20 0x0000000004a7a549 in Runnable::operator()<void (unsigned long), unsigned long>(void (*&&)(unsigned long), unsigned long&&) (this=0x7f8da0386158, f=<unknown type in /home/mohit.joshi/test_p/309658_shutdown_crash_2/mysqld/mysqld, CU 0xc785cb9, DIE 0xc841eb6>) at /home/mohit.joshi/mysql-8.0/storage/innobase/include/os0thread-create.h:101
#21 0x0000000004a7a43f in std::_invoke_impl<void, Runnable, void (unsigned long), unsigned long>(std::invoke_other, Runnable&&, void (*&&)(unsigned long), unsigned long&&) (_f=<unknown type in /home/mohit.joshi/test_p/309658_shutdown_crash_2/mysqld/mysqld, CU 0xc785cb9, DIE 0xc842197>) at /usr/local/include/c++/10.1.0/bits/invoke.h:60
#22 0x0000000004a7a37c in std::_invoke<Runnable, void (unsigned long), unsigned long>(Runnable&&, void (*&&)(unsigned long), unsigned long&&) (_fn=<unknown type in /home/mohit.joshi/test_p/309658_shutdown_crash_2/mysqld/mysqld, CU 0xc785cb9, DIE 0xc842511>) at /usr/local/include/c++/10.1.0/bits/invoke.h:95
#23 0x0000000004a7a2af in std::thread::_Invoker<std::tuple<Runnable, void (unsigned long), unsigned long> >::_M_invoke<0ul, 1ul, 2ul> (this=0x7f8da0386148) at /usr/local/include/c++/10.1.0/thread:264
#24 0x0000000004a7a24c in std::thread::_Invoker<std::tuple<Runnable, void (unsigned long), unsigned long> >::operator() (this=0x7f8da0386148) at /usr/local/include/c++/10.1.0/thread:271
#25 0x0000000004a7a230 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<Runnable, void (unsigned long), unsigned long> > >::_M_run (this=0x7f8da0386140) at /usr/local/include/c++/10.1.0/thread:215
#26 0x00007f8db508e840 in execute_native_thread_routine () at ../../../../../libstdc+-v3/src/c+11/thread.cc:80
#27 0x00007f8db69686ba in start_thread (arg=0x7f8d9ebfe700) at pthread_create.c:333
#28 0x00007f8db47de4dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Environment

None

Activity

Not a Bug

Details

Assignee

Reporter

Time tracking

25m logged

Priority

Created July 17, 2020 at 7:01 PM
Updated March 6, 2024 at 11:02 AM
Resolved April 3, 2023 at 11:17 AM