Bug #113241 assert failure by page_zip_parse_compress_no_data after crash
Submitted: 28 Nov 2023 2:12 Modified: 28 Nov 2023 11:06
Reporter: Fan Lyu Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: CPU Architecture:Any

[28 Nov 2023 2:12] Fan Lyu
Description:
our QA team are doing some crash recovery test.
After injecting random crash and restart, we meet such backtrace:
18:27:27 UTC - mysqld got signal 6 ;
Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware.
Thread pointer: 0x0
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 = 0 thread_stack 0x100000
/data/percona/sql/bin/mysqld(my_print_stacktrace(unsigned char const*, unsigned long)+0x44) [0x20e1504]
/data/percona/sql/bin/mysqld(print_fatal_signal(int)+0x29c) [0xde933c]
/data/percona/sql/bin/mysqld(my_server_abort()+0x80) [0xde94a0]
/data/percona/sql/bin/mysqld(my_abort()+0x14) [0x20dc654]
/data/percona/sql/bin/mysqld(ut_dbg_assertion_failed(char const*, char const*, unsigned long)+0x2a0) [0x23a7570]
/data/percona/sql/bin/mysqld() [0x22d4c8c]
/data/percona/sql/bin/mysqld(recv_recover_page_func(bool, buf_block_t*)+0x5b0) [0x22d5de0]
/data/percona/sql/bin/mysqld(buf_page_io_complete(buf_page_t*, bool)+0x1168) [0xb75568]
/data/percona/sql/bin/mysqld(fil_aio_wait(unsigned long)+0x380) [0xb8c9e0]
/data/percona/sql/bin/mysqld() [0xb5436c]
/data/percona/sql/bin/mysqld(std::thread::_State_impl<std::thread::_Invoker<std::tuple<Detached_thread, void (*)(unsigned long), unsigned long> > >::_M_run()+0x6c) [0x23663ac]
/data/percona/sql/lib/libstdc++.so.6(+0xcebcc) [0xffff7fd79bcc]
/usr/lib64/libpthread.so.0(+0x87ac) [0xffff7fffe7ac]
/usr/lib64/libc.so.6(+0xd547c) [0xffff7fb1447c]
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

(gdb) bt
#0  0x0000ffff80005a40 in pthread_kill () from /usr/lib64/libpthread.so.0
#1  0x00000000020e0b1c in my_write_core (sig=<optimized out>) at ../../../include/my_thread.h:78
#2  0x0000000000de940c in handle_fatal_signal (sig=6) at ../../../sql/signal_handler.cc:211
#3  <signal handler called>
#4  0x0000ffff7fa75470 in raise () from /usr/lib64/libc.so.6
#5  0x0000ffff7fa7681c in abort () from /usr/lib64/libc.so.6
#6  0x0000000000de95a4 in my_server_abort () at ../../../sql/signal_handler.cc:267
#7  0x00000000020dc654 in my_abort () at ../../../mysys/my_init.cc:259
#8  0x00000000023a7570 in ut_dbg_assertion_failed (expr=<optimized out>, file=file@entry=0x33fe558 "../../../../storage/innobase/include/page0zip.ic", line=line@entry=335)
    at ../../../../storage/innobase/ut/ut0dbg.cc:99
#9  0x00000000022d4c8c in page_zip_parse_compress_no_data (index=<optimized out>, page_zip=<optimized out>, page=0xffff601c8000 "", end_ptr=0xffff5d52ffe5 "", ptr=0xffff5d52ffe4 "\006")
    at ../../../../storage/innobase/include/page0zip.ic:335
#10 recv_parse_or_apply_log_rec_body (type=MLOG_ZIP_PAGE_COMPRESS_NO_DATA, ptr=0xffff5d52ffe4 "\006", ptr@entry=0xffff5d52ffd8 "", end_ptr=0xffff5d52ffe5 "", space_id=5, page_no=6094, 
    block=block@entry=0xffff5bf6ccd0, mtr=mtr@entry=0xffff58d76778, parsed_bytes=parsed_bytes@entry=18446744073709551615, start_lsn=<optimized out>, start_lsn@entry=9223372036854775807)
    at ../../../../storage/innobase/log/log0recv.cc:2346
#11 0x00000000022d5de0 in recv_recover_page_func (just_read_in=<optimized out>, block=<optimized out>) at ../../../../storage/innobase/log/log0recv.cc:2739
#12 0x0000000000b75568 in buf_page_io_complete (bpage=0xffff5bf6ccd0, evict=evict@entry=false) at ../../../../storage/innobase/buf/buf0buf.cc:5649
#13 0x0000000000b8c9e0 in fil_aio_wait (segment=<optimized out>) at ../../../../storage/innobase/fil/fil0fil.cc:8235
#14 0x0000000000b5436c in io_handler_thread (segment=5) at ../../../../storage/innobase/srv/srv0start.cc:283
#15 0x00000000023663ac in std::__invoke_impl<void, void (*&)(unsigned long), unsigned long&> (__f=<synthetic pointer>: <optimized out>) at /opt/hw/gcc-10.3/include/c++/10/bits/invoke.h:89
#16 std::__invoke<void (*&)(unsigned long), unsigned long&> (__fn=<synthetic pointer>: <optimized out>) at /opt/hw/gcc-10.3/include/c++/10/bits/invoke.h:95
#17 std::_Bind<void (*(unsigned long))(unsigned long)>::__call<void, , 0ul>(std::tuple<>&&, std::_Index_tuple<0ul>) (__args=..., this=<synthetic pointer>)
    at /opt/hw/gcc-10.3/include/c++/10/functional:416
#18 std::_Bind<void (*(unsigned long))(unsigned long)>::operator()<, void>() (this=<synthetic pointer>) at /opt/hw/gcc-10.3/include/c++/10/functional:499
#19 Detached_thread::operator()<void (*)(unsigned long), unsigned long> (f=@0xffff67255030: 0xb54340 <io_handler_thread(ulint)>, this=0xffff67255038)
    at ../../../../storage/innobase/include/os0thread-create.h:193
#20 std::__invoke_impl<void, Detached_thread, void (*)(unsigned long), unsigned long> (__f=...) at /opt/hw/gcc-10.3/include/c++/10/bits/invoke.h:60
#21 std::__invoke<Detached_thread, void (*)(unsigned long), unsigned long> (__fn=...) at /opt/hw/gcc-10.3/include/c++/10/bits/invoke.h:95
#22 std::thread::_Invoker<std::tuple<Detached_thread, void (*)(unsigned long), unsigned long> >::_M_invoke<0ul, 1ul, 2ul> (this=0xffff67255028)
    at /opt/hw/gcc-10.3/include/c++/10/thread:264
#23 std::thread::_Invoker<std::tuple<Detached_thread, void (*)(unsigned long), unsigned long> >::operator() (this=0xffff67255028) at /opt/hw/gcc-10.3/include/c++/10/thread:271
#24 std::thread::_State_impl<std::thread::_Invoker<std::tuple<Detached_thread, void (*)(unsigned long), unsigned long> > >::_M_run (this=0xffff67255020)
    at /opt/hw/gcc-10.3/include/c++/10/thread:215
#25 0x0000ffff7fd79bcc in execute_native_thread_routine () from /data/percona/sql/lib/libstdc++.so.6
#26 0x0000ffff7fffe7ac in ?? () from /usr/lib64/libpthread.so.0
#27 0x0000ffff7fb1447c in ?? () from /usr/lib64/libc.so.6

the assertion page_zip_parse_compress_no_data is cause by error result of page_zip_compress

we tried to restart mysqld and set brreakpoint, but this time ,we met other assert like :
mlog_parse_index  in mtr0log.cc
ut_a(n_uniq + DATA_ROLL_PTR <= n);
we print the n,which means the number of fields and it turns out to be 0;
and in
page_zip_compress ut_a()
ut_a(page_is_comp(page));

we print x/128xb page and the whole page is filled with 0;

I was wondering if this is caused by page corruption which is caused by external causes?

How to repeat:
hard to repeat

I was wondering if this is caused by page corruption which is caused by external causes?
[28 Nov 2023 11:06] MySQL Verification Team
Hi Mr. Lyu,

Thank you for your bug report.

The problem that you see is caused by the fact that you have not configured your hardware, your Operating System and MySQL server for the ACID compliant operation.

That is a reason why you see those pages. This is explained in our Reference Manual.

Not a bug.