Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-17225

Assertion `log_descriptor.bc.buffer->prev_last_lsn == ((LSN)0)' failed in translog_flush_buffers

Details

    Description

      10.3 b9b279ec

      mysqld: /data/src/10.3/storage/maria/ma_loghandler.c:8005: translog_flush_buffers: Assertion `log_descriptor.bc.buffer->prev_last_lsn == ((LSN)0)' failed.
      200624 18:53:35 [ERROR] mysqld got signal 6 ;
       
      #6  0x00007f21d546ee67 in __assert_fail_base (fmt=<optimized out>, assertion=assertion@entry=0x55dbbdf871e0 "log_descriptor.bc.buffer->prev_last_lsn == ((LSN)0)", file=file@entry=0x55dbbdf818c8 "/data/src/10.3/storage/maria/ma_loghandler.c", line=line@entry=8005, function=function@entry=0x55dbbdf88b70 <__PRETTY_FUNCTION__.17199> "translog_flush_buffers") at assert.c:92
      #7  0x00007f21d546ef12 in __GI___assert_fail (assertion=0x55dbbdf871e0 "log_descriptor.bc.buffer->prev_last_lsn == ((LSN)0)", file=0x55dbbdf818c8 "/data/src/10.3/storage/maria/ma_loghandler.c", line=8005, function=0x55dbbdf88b70 <__PRETTY_FUNCTION__.17199> "translog_flush_buffers") at assert.c:101
      #8  0x000055dbbd9bd54f in translog_flush_buffers (lsn=0x7f21cb57b458, sent_to_disk=0x7f21cb57b468, flush_horizon=0x7f21cb57b470) at /data/src/10.3/storage/maria/ma_loghandler.c:8004
      #9  0x000055dbbd9bdcfc in translog_flush (lsn=4301389853) at /data/src/10.3/storage/maria/ma_loghandler.c:8173
      #10 0x000055dbbda19da7 in flush_log_for_bitmap (args=0x7f21cb57b580) at /data/src/10.3/storage/maria/ma_bitmap.c:3114
      #11 0x000055dbbd9c12f8 in pagecache_fwrite (pagecache=0x55dbbf0f3000 <maria_pagecache_var>, filedesc=0x7f21d01a8038, buffer=0x7f21d0733080 "", pageno=0, type=PAGECACHE_PLAIN_PAGE, flags=36) at /data/src/10.3/storage/maria/ma_pagecache.c:660
      #12 0x000055dbbd9ccdbe in flush_cached_blocks (pagecache=0x55dbbf0f3000 <maria_pagecache_var>, file=0x7f21b003de58, cache=0x7f21cb57b750, end=0x7f21cb57b758, type=FLUSH_KEEP, first_errno=0x7f21cb57b6b4) at /data/src/10.3/storage/maria/ma_pagecache.c:4419
      #13 0x000055dbbd9cd8cd in flush_pagecache_blocks_int (pagecache=0x55dbbf0f3000 <maria_pagecache_var>, file=0x7f21b003de58, type=FLUSH_KEEP, filter=0x55dbbda142e7 <filter_flush_bitmap_pages>, filter_arg=0x7f21b003dfa8) at /data/src/10.3/storage/maria/ma_pagecache.c:4715
      #14 0x000055dbbd9cdd1d in flush_pagecache_blocks_with_filter (pagecache=0x55dbbf0f3000 <maria_pagecache_var>, file=0x7f21b003de58, type=FLUSH_KEEP, filter=0x55dbbda142e7 <filter_flush_bitmap_pages>, filter_arg=0x7f21b003dfa8) at /data/src/10.3/storage/maria/ma_pagecache.c:4830
      #15 0x000055dbbda14535 in _ma_bitmap_flush_all (share=0x7f21b003d2e0) at /data/src/10.3/storage/maria/ma_bitmap.c:550
      #16 0x000055dbbd9d9b05 in _ma_tmp_disable_logging_for_table (info=0x7f21b00460a0, log_incomplete=1 '\001') at /data/src/10.3/storage/maria/ma_recovery.c:3566
      #17 0x000055dbbd99c444 in ha_maria::start_bulk_insert (this=0x7f21b003cb48, rows=0, flags=0) at /data/src/10.3/storage/maria/ha_maria.cc:2112
      #18 0x000055dbbcfabef1 in handler::ha_start_bulk_insert (this=0x7f21b003cb48, rows=0, flags=0) at /data/src/10.3/sql/handler.h:3163
      #19 0x000055dbbcfa7ef8 in select_insert::prepare (this=0x7f21b0012d00, values=..., u=0x7f21b00049b8) at /data/src/10.3/sql/sql_insert.cc:3806
      #20 0x000055dbbd028001 in JOIN::prepare (this=0x7f21b0012db0, tables_init=0x7f21b00122c8, wild_num=0, conds_init=0x0, og_num=1, order_init=0x7f21b0012c18, skip_order_by=false, group_init=0x0, having_init=0x0, proc_param_init=0x0, select_lex_arg=0x7f21b0005140, unit_arg=0x7f21b00049b8) at /data/src/10.3/sql/sql_select.cc:1382
      #21 0x000055dbbd032656 in mysql_select (thd=0x7f21b0000af0, tables=0x7f21b00122c8, wild_num=0, fields=..., conds=0x0, og_num=1, order=0x7f21b0012c18, group=0x0, having=0x0, proc_param=0x0, select_options=3489925889, result=0x7f21b0012d00, unit=0x7f21b00049b8, select_lex=0x7f21b0005140) at /data/src/10.3/sql/sql_select.cc:4290
      #22 0x000055dbbd023cf8 in handle_select (thd=0x7f21b0000af0, lex=0x7f21b00048f8, result=0x7f21b0012d00, setup_tables_done_option=1073741824) at /data/src/10.3/sql/sql_select.cc:370
      #23 0x000055dbbcfe46b4 in mysql_execute_command (thd=0x7f21b0000af0) at /data/src/10.3/sql/sql_parse.cc:4570
      #24 0x000055dbbcfef995 in mysql_parse (thd=0x7f21b0000af0, rawbuf=0x7f21b0011458 "INSERT INTO transforms.insert_select_13191  SELECT DISTINCT ( COS( ( POW( NULL, `col_date_nokey` ) ) ) ) ^ NULL AS field1 FROM `B` ORDER BY @A := ( `col_datetime_key` )", length=168, parser_state=0x7f21cb5805e0, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:7818
      #25 0x000055dbbcfdc1dd in dispatch_command (command=COM_QUERY, thd=0x7f21b0000af0, packet=0x7f21b0008c71 "INSERT INTO transforms.insert_select_13191  SELECT DISTINCT ( COS( ( POW( NULL, `col_date_nokey` ) ) ) ) ^ NULL AS field1 FROM `B` ORDER BY @A := ( `col_datetime_key` )", packet_length=168, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1856
      #26 0x000055dbbcfdaaf5 in do_command (thd=0x7f21b0000af0) at /data/src/10.3/sql/sql_parse.cc:1401
      #27 0x000055dbbd153bad in do_handle_one_connection (connect=0x55dbc0a994d0) at /data/src/10.3/sql/sql_connect.cc:1403
      #28 0x000055dbbd15390f in handle_one_connection (arg=0x55dbc0a994d0) at /data/src/10.3/sql/sql_connect.cc:1308
      #29 0x000055dbbdb09924 in pfs_spawn_thread (arg=0x55dbc0b73ac0) at /data/src/10.3/storage/perfschema/pfs.cc:1869
      #30 0x00007f21d73f74a4 in start_thread (arg=0x7f21cb581700) at pthread_create.c:456
      #31 0x00007f21d552bd0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      The best test case that I currently have is attached. It's an extremely ugly test case, most of its contents should have nothing to do with the problem, but I can't remove anything else without reducing the probability of reproducing to almost none. It already requires on average a hundred repetitions, but it's totally unpredictable – sometimes it happens in first 10 attempts, sometimes after 400.

      Run as

       perl ./mtr bug.lsn8 --repeat=500 --ps-protocol --mem
      

      ps-protocol is not necessary, the test might still fail without it, but it seems to make the failure more probable.
      mem is not necessary, but it makes things faster.
      repeat=500 is arbitrary if not a guarantee. If you can, set even a higher number, or run several times if it doesn't happen right away.

      No visible effect on a non-debug build.

      10.3 and 10.4 are affected. It might well be that 10.2 and earlier versions are also affected, but the test contains some 10.3-specific stuff, and since I can't change anything there, I can't check if the problem exists in earlier versions.

      Attachments

        Issue Links

          Activity

            # mysqld options required for replay: --log-bin 
            SET GLOBAL ARIA_GROUP_COMMIT=HARD;
            XA START 'A';
            SET GLOBAL ARIA_CHECKPOINT_LOG_ACTIVITY=1;
            SET GLOBAL ARIA_GROUP_COMMIT_INTERVAL=1000000000;
            DELETE FROM mysql.tables_priv WHERE USER LIKE '_%';
            

            Leads to:

            10.5.4 4080e3acefd7e58d88c2f3539fb6a0fb359cf057

            mysqld: /test/10.5_dbg/storage/maria/ma_loghandler.c:8007: translog_flush_buffers: Assertion `log_descriptor.bc.buffer->prev_last_lsn == ((LSN)0)' failed.
            

            10.5.4 4080e3acefd7e58d88c2f3539fb6a0fb359cf057

            Core was generated by `/test/MD150620-mariadb-10.5.4-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
            Program terminated with signal SIGABRT, Aborted.
            #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
                at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
            [Current thread is 1 (Thread 0x152bddcc1700 (LWP 3859647))]
            (gdb) bt
            #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
            #1  0x000056484ddee4c6 in my_write_core (sig=sig@entry=6) at /test/10.5_dbg/mysys/stacktrace.c:518
            #2  0x000056484d590d60 in handle_fatal_signal (sig=6) at /test/10.5_dbg/sql/signal_handler.cc:330
            #3  <signal handler called>
            #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
            #5  0x0000152be6641801 in __GI_abort () at abort.c:79
            #6  0x0000152be663139a in __assert_fail_base (fmt=0x152be67b87d8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x56484e1749f0 "log_descriptor.bc.buffer->prev_last_lsn == ((LSN)0)", file=file@entry=0x56484e1714c0 "/test/10.5_dbg/storage/maria/ma_loghandler.c", line=line@entry=8007, function=function@entry=0x56484e176410 <__PRETTY_FUNCTION__.20914> "translog_flush_buffers") at assert.c:92
            #7  0x0000152be6631412 in __GI___assert_fail (assertion=assertion@entry=0x56484e1749f0 "log_descriptor.bc.buffer->prev_last_lsn == ((LSN)0)", file=file@entry=0x56484e1714c0 "/test/10.5_dbg/storage/maria/ma_loghandler.c", line=line@entry=8007, function=function@entry=0x56484e176410 <__PRETTY_FUNCTION__.20914> "translog_flush_buffers") at assert.c:101
            #8  0x000056484d7fa77a in translog_flush_buffers (lsn=lsn@entry=0x152bddcbf748, sent_to_disk=sent_to_disk@entry=0x152bddcbf750, flush_horizon=flush_horizon@entry=0x152bddcbf758) at /test/10.5_dbg/storage/maria/ma_loghandler.c:8006
            #9  0x000056484d7fac5d in translog_flush (lsn=<optimized out>) at /test/10.5_dbg/storage/maria/ma_loghandler.c:8175
            #10 0x000056484d81a57b in ma_commit (trn=trn@entry=0x152be50ca2c8) at /test/10.5_dbg/storage/maria/ma_commit.c:66
            #11 0x000056484d7e06a0 in ha_maria::external_lock (this=0x152bc7e018a0, thd=0x152bc6015088, lock_type=2) at /test/10.5_dbg/storage/maria/ha_maria.cc:2854
            #12 0x000056484d5a31a6 in handler::ha_external_lock (this=0x152bc7e018a0, thd=thd@entry=0x152bc6015088, lock_type=lock_type@entry=2) at /test/10.5_dbg/sql/handler.cc:6654
            #13 0x000056484d6daddc in handler::ha_external_unlock (thd=0x152bc6015088, this=<optimized out>) at /test/10.5_dbg/sql/handler.h:3407
            #14 unlock_external (thd=thd@entry=0x152bc6015088, table=0x152bc6074e38, count=<optimized out>) at /test/10.5_dbg/sql/lock.cc:727
            #15 0x000056484d6daff9 in mysql_unlock_tables (thd=0x152bc6015088, sql_lock=0x152bc6074e08, free_lock=<optimized out>) at /test/10.5_dbg/sql/lock.cc:432
            #16 0x000056484d6db92f in mysql_unlock_tables (thd=thd@entry=0x152bc6015088, sql_lock=<optimized out>) at /test/10.5_dbg/sql/lock.cc:417
            #17 0x000056484d26003a in close_thread_tables (thd=thd@entry=0x152bc6015088) at /test/10.5_dbg/sql/sql_base.cc:911
            #18 0x000056484d2ec2bc in mysql_execute_command (thd=thd@entry=0x152bc6015088) at /test/10.5_dbg/sql/sql_parse.cc:6017
            #19 0x000056484d2f315c in mysql_parse (thd=thd@entry=0x152bc6015088, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x152bddcc0350, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:7993
            #20 0x000056484d2dfc60 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x152bc6015088, packet=packet@entry=0x152bc6067089 "DELETE FROM mysql.tables_priv WHERE USER LIKE '_%'", packet_length=packet_length@entry=50, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:1874
            #21 0x000056484d2de43a in do_command (thd=0x152bc6015088) at /test/10.5_dbg/sql/sql_parse.cc:1355
            #22 0x000056484d439c47 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x152bc7d83f08, put_in_cache=put_in_cache@entry=true) at /test/10.5_dbg/sql/sql_connect.cc:1411
            #23 0x000056484d43a363 in handle_one_connection (arg=arg@entry=0x152bc7d83f08) at /test/10.5_dbg/sql/sql_connect.cc:1313
            #24 0x000056484d89b902 in pfs_spawn_thread (arg=0x152be5046f08) at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
            #25 0x0000152be73246db in start_thread (arg=0x152bddcc1700) at pthread_create.c:463
            #26 0x0000152be672288f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
            

            Bug confirmed present in:
            MariaDB: 10.4.14 (dbg), 10.5.4 (dbg)

            Bug confirmed not present in:
            MariaDB: 10.1.46 (dbg), 10.1.46 (opt), 10.2.33 (dbg), 10.2.33 (opt), 10.3.24 (dbg), 10.3.24 (opt), 10.4.14 (opt), 10.5.4 (opt)
            MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.47 (dbg), 5.6.47 (opt), 5.7.29 (dbg), 5.7.29 (opt), 8.0.19 (dbg), 8.0.19 (opt)

            Roel Roel Van de Paar added a comment - # mysqld options required for replay: --log-bin SET GLOBAL ARIA_GROUP_COMMIT=HARD; XA START 'A'; SET GLOBAL ARIA_CHECKPOINT_LOG_ACTIVITY=1; SET GLOBAL ARIA_GROUP_COMMIT_INTERVAL=1000000000; DELETE FROM mysql.tables_priv WHERE USER LIKE '_%'; Leads to: 10.5.4 4080e3acefd7e58d88c2f3539fb6a0fb359cf057 mysqld: /test/10.5_dbg/storage/maria/ma_loghandler.c:8007: translog_flush_buffers: Assertion `log_descriptor.bc.buffer->prev_last_lsn == ((LSN)0)' failed. 10.5.4 4080e3acefd7e58d88c2f3539fb6a0fb359cf057 Core was generated by `/test/MD150620-mariadb-10.5.4-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'. Program terminated with signal SIGABRT, Aborted. #0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57 [Current thread is 1 (Thread 0x152bddcc1700 (LWP 3859647))] (gdb) bt #0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57 #1 0x000056484ddee4c6 in my_write_core (sig=sig@entry=6) at /test/10.5_dbg/mysys/stacktrace.c:518 #2 0x000056484d590d60 in handle_fatal_signal (sig=6) at /test/10.5_dbg/sql/signal_handler.cc:330 #3 <signal handler called> #4 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 #5 0x0000152be6641801 in __GI_abort () at abort.c:79 #6 0x0000152be663139a in __assert_fail_base (fmt=0x152be67b87d8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x56484e1749f0 "log_descriptor.bc.buffer->prev_last_lsn == ((LSN)0)", file=file@entry=0x56484e1714c0 "/test/10.5_dbg/storage/maria/ma_loghandler.c", line=line@entry=8007, function=function@entry=0x56484e176410 <__PRETTY_FUNCTION__.20914> "translog_flush_buffers") at assert.c:92 #7 0x0000152be6631412 in __GI___assert_fail (assertion=assertion@entry=0x56484e1749f0 "log_descriptor.bc.buffer->prev_last_lsn == ((LSN)0)", file=file@entry=0x56484e1714c0 "/test/10.5_dbg/storage/maria/ma_loghandler.c", line=line@entry=8007, function=function@entry=0x56484e176410 <__PRETTY_FUNCTION__.20914> "translog_flush_buffers") at assert.c:101 #8 0x000056484d7fa77a in translog_flush_buffers (lsn=lsn@entry=0x152bddcbf748, sent_to_disk=sent_to_disk@entry=0x152bddcbf750, flush_horizon=flush_horizon@entry=0x152bddcbf758) at /test/10.5_dbg/storage/maria/ma_loghandler.c:8006 #9 0x000056484d7fac5d in translog_flush (lsn=<optimized out>) at /test/10.5_dbg/storage/maria/ma_loghandler.c:8175 #10 0x000056484d81a57b in ma_commit (trn=trn@entry=0x152be50ca2c8) at /test/10.5_dbg/storage/maria/ma_commit.c:66 #11 0x000056484d7e06a0 in ha_maria::external_lock (this=0x152bc7e018a0, thd=0x152bc6015088, lock_type=2) at /test/10.5_dbg/storage/maria/ha_maria.cc:2854 #12 0x000056484d5a31a6 in handler::ha_external_lock (this=0x152bc7e018a0, thd=thd@entry=0x152bc6015088, lock_type=lock_type@entry=2) at /test/10.5_dbg/sql/handler.cc:6654 #13 0x000056484d6daddc in handler::ha_external_unlock (thd=0x152bc6015088, this=<optimized out>) at /test/10.5_dbg/sql/handler.h:3407 #14 unlock_external (thd=thd@entry=0x152bc6015088, table=0x152bc6074e38, count=<optimized out>) at /test/10.5_dbg/sql/lock.cc:727 #15 0x000056484d6daff9 in mysql_unlock_tables (thd=0x152bc6015088, sql_lock=0x152bc6074e08, free_lock=<optimized out>) at /test/10.5_dbg/sql/lock.cc:432 #16 0x000056484d6db92f in mysql_unlock_tables (thd=thd@entry=0x152bc6015088, sql_lock=<optimized out>) at /test/10.5_dbg/sql/lock.cc:417 #17 0x000056484d26003a in close_thread_tables (thd=thd@entry=0x152bc6015088) at /test/10.5_dbg/sql/sql_base.cc:911 #18 0x000056484d2ec2bc in mysql_execute_command (thd=thd@entry=0x152bc6015088) at /test/10.5_dbg/sql/sql_parse.cc:6017 #19 0x000056484d2f315c in mysql_parse (thd=thd@entry=0x152bc6015088, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x152bddcc0350, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:7993 #20 0x000056484d2dfc60 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x152bc6015088, packet=packet@entry=0x152bc6067089 "DELETE FROM mysql.tables_priv WHERE USER LIKE '_%'", packet_length=packet_length@entry=50, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:1874 #21 0x000056484d2de43a in do_command (thd=0x152bc6015088) at /test/10.5_dbg/sql/sql_parse.cc:1355 #22 0x000056484d439c47 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x152bc7d83f08, put_in_cache=put_in_cache@entry=true) at /test/10.5_dbg/sql/sql_connect.cc:1411 #23 0x000056484d43a363 in handle_one_connection (arg=arg@entry=0x152bc7d83f08) at /test/10.5_dbg/sql/sql_connect.cc:1313 #24 0x000056484d89b902 in pfs_spawn_thread (arg=0x152be5046f08) at /test/10.5_dbg/storage/perfschema/pfs.cc:2201 #25 0x0000152be73246db in start_thread (arg=0x152bddcc1700) at pthread_create.c:463 #26 0x0000152be672288f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 Bug confirmed present in: MariaDB: 10.4.14 (dbg), 10.5.4 (dbg) Bug confirmed not present in: MariaDB: 10.1.46 (dbg), 10.1.46 (opt), 10.2.33 (dbg), 10.2.33 (opt), 10.3.24 (dbg), 10.3.24 (opt), 10.4.14 (opt), 10.5.4 (opt) MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.47 (dbg), 5.6.47 (opt), 5.7.29 (dbg), 5.7.29 (opt), 8.0.19 (dbg), 8.0.19 (opt)

            monty do you think the underlying issue is the same for both testcases/asserts?

            Roel Roel Van de Paar added a comment - monty do you think the underlying issue is the same for both testcases/asserts?
            Roel Roel Van de Paar added a comment - - edited

            USE test;
            SET GLOBAL ARIA_CHECKPOINT_LOG_ACTIVITY = 254;
            SET GLOBAL ARIA_GROUP_COMMIT=hard;
            SET GLOBAL ARIA_GROUP_COMMIT_INTERVAL=1000000000;
            CREATE ROLE a;
            CREATE PROCEDURE p1() BEGIN END;
            

            Leads to:

            10.5.4 4080e3acefd7e58d88c2f3539fb6a0fb359cf057

            mysqld: /test/10.5_dbg/storage/maria/ma_loghandler.c:8007: translog_flush_buffers: Assertion `log_descriptor.bc.buffer->prev_last_lsn == ((LSN)0)' failed.
            

            10.5.4 4080e3acefd7e58d88c2f3539fb6a0fb359cf057

            Core was generated by `/test/MD150620-mariadb-10.5.4-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
            Program terminated with signal SIGABRT, Aborted.
            #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
                at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
            [Current thread is 1 (Thread 0x14781ecb7700 (LWP 905254))]
            (gdb) bt
            #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
            #1  0x000055631bda44c6 in my_write_core (sig=sig@entry=6) at /test/10.5_dbg/mysys/stacktrace.c:518
            #2  0x000055631b546d60 in handle_fatal_signal (sig=6) at /test/10.5_dbg/sql/signal_handler.cc:330
            #3  <signal handler called>
            #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
            #5  0x000014781fb2b801 in __GI_abort () at abort.c:79
            #6  0x000014781fb1b39a in __assert_fail_base (fmt=0x14781fca27d8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x55631c12a9f0 "log_descriptor.bc.buffer->prev_last_lsn == ((LSN)0)", file=file@entry=0x55631c1274c0 "/test/10.5_dbg/storage/maria/ma_loghandler.c", line=line@entry=8007, function=function@entry=0x55631c12c410 <__PRETTY_FUNCTION__.20914> "translog_flush_buffers") at assert.c:92
            #7  0x000014781fb1b412 in __GI___assert_fail (assertion=assertion@entry=0x55631c12a9f0 "log_descriptor.bc.buffer->prev_last_lsn == ((LSN)0)", file=file@entry=0x55631c1274c0 "/test/10.5_dbg/storage/maria/ma_loghandler.c", line=line@entry=8007, function=function@entry=0x55631c12c410 <__PRETTY_FUNCTION__.20914> "translog_flush_buffers") at assert.c:101
            #8  0x000055631b7b077a in translog_flush_buffers (lsn=lsn@entry=0x14781ecb0e18, sent_to_disk=sent_to_disk@entry=0x14781ecb0e20, flush_horizon=flush_horizon@entry=0x14781ecb0e28) at /test/10.5_dbg/storage/maria/ma_loghandler.c:8006
            #9  0x000055631b7b0c5d in translog_flush (lsn=<optimized out>) at /test/10.5_dbg/storage/maria/ma_loghandler.c:8175
            #10 0x000055631b7fa859 in flush_log_for_bitmap (args=<optimized out>) at /test/10.5_dbg/storage/maria/ma_bitmap.c:3116
            #11 0x000055631b7b9601 in pagecache_fwrite (pagecache=pagecache@entry=0x55631d3e1500 <maria_pagecache_var>, filedesc=0x14780d6c07f8, buffer=0x14780de3e000 "\001", pageno=0, type=PAGECACHE_PLAIN_PAGE, flags=36) at /test/10.5_dbg/storage/maria/ma_pagecache.c:676
            #12 0x000055631b7bf5b9 in flush_cached_blocks (pagecache=pagecache@entry=0x55631d3e1500 <maria_pagecache_var>, file=file@entry=0x1477ff0e84f8, cache=cache@entry=0x14781ecb1160, end=end@entry=0x14781ecb1170, type=type@entry=FLUSH_KEEP, first_errno=first_errno@entry=0x14781ecb10d4) at /test/10.5_dbg/storage/maria/ma_pagecache.c:4804
            #13 0x000055631b7c021b in flush_pagecache_blocks_int (pagecache=pagecache@entry=0x55631d3e1500 <maria_pagecache_var>, file=file@entry=0x1477ff0e84f8, type=type@entry=FLUSH_KEEP, filter=filter@entry=0x0, filter_arg=filter_arg@entry=0x0) at /test/10.5_dbg/storage/maria/ma_pagecache.c:5100
            #14 0x000055631b7c651c in flush_pagecache_blocks_with_filter (pagecache=0x55631d3e1500 <maria_pagecache_var>, file=file@entry=0x1477ff0e84f8, type=type@entry=FLUSH_KEEP, filter=filter@entry=0x0, filter_arg=filter_arg@entry=0x0) at /test/10.5_dbg/storage/maria/ma_pagecache.c:5215
            #15 0x000055631b7da1bf in _ma_flush_table_files (info=info@entry=0x1477ff0e8088, flush_data_or_index=flush_data_or_index@entry=3, flush_type_for_data=flush_type_for_data@entry=FLUSH_KEEP, flush_type_for_index=flush_type_for_index@entry=FLUSH_KEEP) at /test/10.5_dbg/storage/maria/ma_extra.c:646
            #16 0x000055631b7db6dd in maria_extra (info=0x1477ff0e8088, function=function@entry=HA_EXTRA_FLUSH, extra_arg=extra_arg@entry=0x0) at /test/10.5_dbg/storage/maria/ma_extra.c:418
            #17 0x000055631b796251 in ha_maria::extra (this=0x1477ff03a8a0, operation=HA_EXTRA_FLUSH) at /test/10.5_dbg/storage/maria/ha_maria.cc:2656
            #18 0x000055631b6f43a8 in Sp_handler::sp_create_routine (this=0x55631ca5ba70 <sp_handler_procedure>, thd=thd@entry=0x1477ff015088, sp=0x1477ff07d0a0) at /test/10.5_dbg/sql/sp.cc:1463
            #19 0x000055631b299e6b in mysql_create_routine (thd=thd@entry=0x1477ff015088, lex=lex@entry=0x1477ff018fd8) at /test/10.5_dbg/sql/sql_parse.cc:3115
            #20 0x000055631b2a0c97 in mysql_execute_command (thd=thd@entry=0x1477ff015088) at /test/10.5_dbg/sql/sql_parse.cc:5668
            #21 0x000055631b2a915c in mysql_parse (thd=thd@entry=0x1477ff015088, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14781ecb6350, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:7993
            #22 0x000055631b295c60 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x1477ff015088, packet=packet@entry=0x1477ff067089 "CREATE PROCEDURE p1() BEGIN END", packet_length=packet_length@entry=31, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:1874
            #23 0x000055631b29443a in do_command (thd=0x1477ff015088) at /test/10.5_dbg/sql/sql_parse.cc:1355
            #24 0x000055631b3efc47 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x14780117a808, put_in_cache=put_in_cache@entry=true) at /test/10.5_dbg/sql/sql_connect.cc:1411
            #25 0x000055631b3f0363 in handle_one_connection (arg=arg@entry=0x14780117a808) at /test/10.5_dbg/sql/sql_connect.cc:1313
            #26 0x000055631b851902 in pfs_spawn_thread (arg=0x14781e446c88) at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
            #27 0x000014782080e6db in start_thread (arg=0x14781ecb7700) at pthread_create.c:463
            #28 0x000014781fc0c88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
            

            Bug confirmed present in:
            MariaDB: 10.4.14 (dbg), 10.5.4 (dbg)

            Bug confirmed not present in:
            MariaDB: 10.1.46 (dbg), 10.1.46 (opt), 10.2.33 (dbg), 10.2.33 (opt), 10.3.24 (dbg), 10.3.24 (opt), 10.4.14 (opt), 10.5.4 (opt)
            MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.47 (dbg), 5.6.47 (opt), 5.7.29 (dbg), 5.7.29 (opt), 8.0.19 (dbg), 8.0.19 (opt)

            Roel Roel Van de Paar added a comment - - edited USE test; SET GLOBAL ARIA_CHECKPOINT_LOG_ACTIVITY = 254; SET GLOBAL ARIA_GROUP_COMMIT=hard; SET GLOBAL ARIA_GROUP_COMMIT_INTERVAL=1000000000; CREATE ROLE a; CREATE PROCEDURE p1() BEGIN END; Leads to: 10.5.4 4080e3acefd7e58d88c2f3539fb6a0fb359cf057 mysqld: /test/10.5_dbg/storage/maria/ma_loghandler.c:8007: translog_flush_buffers: Assertion `log_descriptor.bc.buffer->prev_last_lsn == ((LSN)0)' failed. 10.5.4 4080e3acefd7e58d88c2f3539fb6a0fb359cf057 Core was generated by `/test/MD150620-mariadb-10.5.4-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'. Program terminated with signal SIGABRT, Aborted. #0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57 [Current thread is 1 (Thread 0x14781ecb7700 (LWP 905254))] (gdb) bt #0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57 #1 0x000055631bda44c6 in my_write_core (sig=sig@entry=6) at /test/10.5_dbg/mysys/stacktrace.c:518 #2 0x000055631b546d60 in handle_fatal_signal (sig=6) at /test/10.5_dbg/sql/signal_handler.cc:330 #3 <signal handler called> #4 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 #5 0x000014781fb2b801 in __GI_abort () at abort.c:79 #6 0x000014781fb1b39a in __assert_fail_base (fmt=0x14781fca27d8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x55631c12a9f0 "log_descriptor.bc.buffer->prev_last_lsn == ((LSN)0)", file=file@entry=0x55631c1274c0 "/test/10.5_dbg/storage/maria/ma_loghandler.c", line=line@entry=8007, function=function@entry=0x55631c12c410 <__PRETTY_FUNCTION__.20914> "translog_flush_buffers") at assert.c:92 #7 0x000014781fb1b412 in __GI___assert_fail (assertion=assertion@entry=0x55631c12a9f0 "log_descriptor.bc.buffer->prev_last_lsn == ((LSN)0)", file=file@entry=0x55631c1274c0 "/test/10.5_dbg/storage/maria/ma_loghandler.c", line=line@entry=8007, function=function@entry=0x55631c12c410 <__PRETTY_FUNCTION__.20914> "translog_flush_buffers") at assert.c:101 #8 0x000055631b7b077a in translog_flush_buffers (lsn=lsn@entry=0x14781ecb0e18, sent_to_disk=sent_to_disk@entry=0x14781ecb0e20, flush_horizon=flush_horizon@entry=0x14781ecb0e28) at /test/10.5_dbg/storage/maria/ma_loghandler.c:8006 #9 0x000055631b7b0c5d in translog_flush (lsn=<optimized out>) at /test/10.5_dbg/storage/maria/ma_loghandler.c:8175 #10 0x000055631b7fa859 in flush_log_for_bitmap (args=<optimized out>) at /test/10.5_dbg/storage/maria/ma_bitmap.c:3116 #11 0x000055631b7b9601 in pagecache_fwrite (pagecache=pagecache@entry=0x55631d3e1500 <maria_pagecache_var>, filedesc=0x14780d6c07f8, buffer=0x14780de3e000 "\001", pageno=0, type=PAGECACHE_PLAIN_PAGE, flags=36) at /test/10.5_dbg/storage/maria/ma_pagecache.c:676 #12 0x000055631b7bf5b9 in flush_cached_blocks (pagecache=pagecache@entry=0x55631d3e1500 <maria_pagecache_var>, file=file@entry=0x1477ff0e84f8, cache=cache@entry=0x14781ecb1160, end=end@entry=0x14781ecb1170, type=type@entry=FLUSH_KEEP, first_errno=first_errno@entry=0x14781ecb10d4) at /test/10.5_dbg/storage/maria/ma_pagecache.c:4804 #13 0x000055631b7c021b in flush_pagecache_blocks_int (pagecache=pagecache@entry=0x55631d3e1500 <maria_pagecache_var>, file=file@entry=0x1477ff0e84f8, type=type@entry=FLUSH_KEEP, filter=filter@entry=0x0, filter_arg=filter_arg@entry=0x0) at /test/10.5_dbg/storage/maria/ma_pagecache.c:5100 #14 0x000055631b7c651c in flush_pagecache_blocks_with_filter (pagecache=0x55631d3e1500 <maria_pagecache_var>, file=file@entry=0x1477ff0e84f8, type=type@entry=FLUSH_KEEP, filter=filter@entry=0x0, filter_arg=filter_arg@entry=0x0) at /test/10.5_dbg/storage/maria/ma_pagecache.c:5215 #15 0x000055631b7da1bf in _ma_flush_table_files (info=info@entry=0x1477ff0e8088, flush_data_or_index=flush_data_or_index@entry=3, flush_type_for_data=flush_type_for_data@entry=FLUSH_KEEP, flush_type_for_index=flush_type_for_index@entry=FLUSH_KEEP) at /test/10.5_dbg/storage/maria/ma_extra.c:646 #16 0x000055631b7db6dd in maria_extra (info=0x1477ff0e8088, function=function@entry=HA_EXTRA_FLUSH, extra_arg=extra_arg@entry=0x0) at /test/10.5_dbg/storage/maria/ma_extra.c:418 #17 0x000055631b796251 in ha_maria::extra (this=0x1477ff03a8a0, operation=HA_EXTRA_FLUSH) at /test/10.5_dbg/storage/maria/ha_maria.cc:2656 #18 0x000055631b6f43a8 in Sp_handler::sp_create_routine (this=0x55631ca5ba70 <sp_handler_procedure>, thd=thd@entry=0x1477ff015088, sp=0x1477ff07d0a0) at /test/10.5_dbg/sql/sp.cc:1463 #19 0x000055631b299e6b in mysql_create_routine (thd=thd@entry=0x1477ff015088, lex=lex@entry=0x1477ff018fd8) at /test/10.5_dbg/sql/sql_parse.cc:3115 #20 0x000055631b2a0c97 in mysql_execute_command (thd=thd@entry=0x1477ff015088) at /test/10.5_dbg/sql/sql_parse.cc:5668 #21 0x000055631b2a915c in mysql_parse (thd=thd@entry=0x1477ff015088, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14781ecb6350, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:7993 #22 0x000055631b295c60 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x1477ff015088, packet=packet@entry=0x1477ff067089 "CREATE PROCEDURE p1() BEGIN END", packet_length=packet_length@entry=31, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:1874 #23 0x000055631b29443a in do_command (thd=0x1477ff015088) at /test/10.5_dbg/sql/sql_parse.cc:1355 #24 0x000055631b3efc47 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x14780117a808, put_in_cache=put_in_cache@entry=true) at /test/10.5_dbg/sql/sql_connect.cc:1411 #25 0x000055631b3f0363 in handle_one_connection (arg=arg@entry=0x14780117a808) at /test/10.5_dbg/sql/sql_connect.cc:1313 #26 0x000055631b851902 in pfs_spawn_thread (arg=0x14781e446c88) at /test/10.5_dbg/storage/perfschema/pfs.cc:2201 #27 0x000014782080e6db in start_thread (arg=0x14781ecb7700) at pthread_create.c:463 #28 0x000014781fc0c88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 Bug confirmed present in: MariaDB: 10.4.14 (dbg), 10.5.4 (dbg) Bug confirmed not present in: MariaDB: 10.1.46 (dbg), 10.1.46 (opt), 10.2.33 (dbg), 10.2.33 (opt), 10.3.24 (dbg), 10.3.24 (opt), 10.4.14 (opt), 10.5.4 (opt) MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.47 (dbg), 5.6.47 (opt), 5.7.29 (dbg), 5.7.29 (opt), 8.0.19 (dbg), 8.0.19 (opt)
            Roel Roel Van de Paar added a comment - - edited

            Slightly different outcome with this testcase.

            Update: it may be that the 10.2-10.5 hangs are connected with a recent change in 10.6 which seems to let a 10.6 mysqld affect other (unrelated) mysqld's running at the same time on the same machine. Ref MDEV-25874 (comment)

            Previous info:
            Also observed hangs on 10.2 to 10.6 where mysqld is no longer accessible after shutdown via client, yet process is still there. Nothing special in error log (shutdown notice > event scheduler queue purge > InnoDB FTS optimize thread exit > end of log), yet PID still present.

            Whilst the testcase does not crash 10.2, it can cause hangs and thus (as alluded to above) 10.2 looks to be affected also.

            SET GLOBAL aria_group_commit_INTERVAL=1000000000;
            SET GLOBAL aria_group_commit="HARD";
            SET GLOBAL aria_checkpoint_log_activity=1;
            DELETE FROM mysql.proc;
            SELECT SLEEP (3);
            

            Leads to:

            10.6.2 06dd151bb86ad5b87d4d46011f36da1289c01074 (Debug)

            mysqld: /test/10.6_dbg/storage/maria/ma_loghandler.c:8008: translog_flush_buffers: Assertion `log_descriptor.bc.buffer->prev_last_lsn == ((LSN)0)' failed.
            

            10.6.2 06dd151bb86ad5b87d4d46011f36da1289c01074 (Debug)

            Core was generated by `/test/MD050621-mariadb-10.6.2-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
            Program terminated with signal SIGABRT, Aborted.
            #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
            [Current thread is 1 (Thread 0x15424c0aa700 (LWP 2508941))]
            (gdb) bt
            #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
            #1  0x000015424c911859 in __GI_abort () at abort.c:79
            #2  0x000015424c911729 in __assert_fail_base (fmt=0x15424caa7588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x5607c20c9a38 "log_descriptor.bc.buffer->prev_last_lsn == ((LSN)0)", file=0x5607c20c6440 "/test/10.6_dbg/storage/maria/ma_loghandler.c", line=8008, function=<optimized out>) at assert.c:92
            #3  0x000015424c922f36 in __GI___assert_fail (assertion=assertion@entry=0x5607c20c9a38 "log_descriptor.bc.buffer->prev_last_lsn == ((LSN)0)", file=file@entry=0x5607c20c6440 "/test/10.6_dbg/storage/maria/ma_loghandler.c", line=line@entry=8008, function=function@entry=0x5607c20cb490 <__PRETTY_FUNCTION__.21828> "translog_flush_buffers") at assert.c:101
            #4  0x00005607c179d246 in translog_flush_buffers (lsn=lsn@entry=0x15424c0a8308, sent_to_disk=sent_to_disk@entry=0x15424c0a8310, flush_horizon=flush_horizon@entry=0x15424c0a8318) at /test/10.6_dbg/storage/maria/ma_loghandler.c:8008
            #5  0x00005607c179d6f5 in translog_flush (lsn=<optimized out>) at /test/10.6_dbg/storage/maria/ma_loghandler.c:8177
            #6  0x00005607c17f75a7 in maria_delete_all_rows (info=0x1541fc02d818) at /test/10.6_dbg/storage/maria/ma_delete_all.c:56
            #7  0x00005607c178a837 in ha_maria::delete_all_rows (this=0x1541fc021b50) at /test/10.6_dbg/storage/maria/ha_maria.cc:2774
            #8  0x00005607c1513308 in handler::ha_delete_all_rows (this=0x1541fc021b50) at /test/10.6_dbg/sql/handler.cc:4754
            #9  0x00005607c16f5017 in mysql_delete (thd=thd@entry=0x1541fc000db8, table_list=0x1541fc014088, conds=<optimized out>, order_list=order_list@entry=0x1541fc005c10, limit=<optimized out>, options=<optimized out>, result=<optimized out>) at /test/10.6_dbg/sql/sql_delete.cc:466
            #10 0x00005607c1235b65 in mysql_execute_command (thd=thd@entry=0x1541fc000db8) at /test/10.6_dbg/sql/sql_limit.h:83
            #11 0x00005607c121fadc in mysql_parse (thd=thd@entry=0x1541fc000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x15424c0a9400) at /test/10.6_dbg/sql/sql_parse.cc:8016
            #12 0x00005607c122e646 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x1541fc000db8, packet=packet@entry=0x1541fc00b769 "DELETE FROM mysql.proc", packet_length=packet_length@entry=22, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_class.h:1340
            #13 0x00005607c1231a26 in do_command (thd=0x1541fc000db8, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_parse.cc:1406
            #14 0x00005607c1395ec2 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5607c3a12978, put_in_cache=put_in_cache@entry=true) at /test/10.6_dbg/sql/sql_connect.cc:1410
            #15 0x00005607c13964c7 in handle_one_connection (arg=arg@entry=0x5607c3a12978) at /test/10.6_dbg/sql/sql_connect.cc:1312
            #16 0x00005607c184203a in pfs_spawn_thread (arg=0x5607c38fb678) at /test/10.6_dbg/storage/perfschema/pfs.cc:2201
            #17 0x000015424ce1f609 in start_thread (arg=<optimized out>) at pthread_create.c:477
            #18 0x000015424ca0e293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
            

            Crashing bug confirmed present in (and hangs in 10.2-10.6):
            MariaDB: 10.4.19 (dbg), 10.5.10 (dbg), 10.6.2 (dbg)

            Crashing bug (or feature/syntax) confirmed not present in:
            MariaDB: 10.2.38 (dbg), 10.2.38 (opt), 10.3.29 (dbg), 10.3.29 (opt), 10.4.19 (opt), 10.5.10 (opt), 10.6.2 (opt)
            MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.34 (dbg), 5.7.34 (opt), 8.0.24 (dbg), 8.0.24 (opt)

            Roel Roel Van de Paar added a comment - - edited Slightly different outcome with this testcase. Update : it may be that the 10.2-10.5 hangs are connected with a recent change in 10.6 which seems to let a 10.6 mysqld affect other (unrelated) mysqld's running at the same time on the same machine. Ref MDEV-25874 (comment) Previous info : Also observed hangs on 10.2 to 10.6 where mysqld is no longer accessible after shutdown via client, yet process is still there. Nothing special in error log (shutdown notice > event scheduler queue purge > InnoDB FTS optimize thread exit > end of log), yet PID still present. Whilst the testcase does not crash 10.2, it can cause hangs and thus (as alluded to above) 10.2 looks to be affected also. SET GLOBAL aria_group_commit_INTERVAL=1000000000; SET GLOBAL aria_group_commit= "HARD" ; SET GLOBAL aria_checkpoint_log_activity=1; DELETE FROM mysql.proc; SELECT SLEEP (3); Leads to: 10.6.2 06dd151bb86ad5b87d4d46011f36da1289c01074 (Debug) mysqld: /test/10.6_dbg/storage/maria/ma_loghandler.c:8008: translog_flush_buffers: Assertion `log_descriptor.bc.buffer->prev_last_lsn == ((LSN)0)' failed. 10.6.2 06dd151bb86ad5b87d4d46011f36da1289c01074 (Debug) Core was generated by `/test/MD050621-mariadb-10.6.2-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'. Program terminated with signal SIGABRT, Aborted. #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 [Current thread is 1 (Thread 0x15424c0aa700 (LWP 2508941))] (gdb) bt #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 #1 0x000015424c911859 in __GI_abort () at abort.c:79 #2 0x000015424c911729 in __assert_fail_base (fmt=0x15424caa7588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x5607c20c9a38 "log_descriptor.bc.buffer->prev_last_lsn == ((LSN)0)", file=0x5607c20c6440 "/test/10.6_dbg/storage/maria/ma_loghandler.c", line=8008, function=<optimized out>) at assert.c:92 #3 0x000015424c922f36 in __GI___assert_fail (assertion=assertion@entry=0x5607c20c9a38 "log_descriptor.bc.buffer->prev_last_lsn == ((LSN)0)", file=file@entry=0x5607c20c6440 "/test/10.6_dbg/storage/maria/ma_loghandler.c", line=line@entry=8008, function=function@entry=0x5607c20cb490 <__PRETTY_FUNCTION__.21828> "translog_flush_buffers") at assert.c:101 #4 0x00005607c179d246 in translog_flush_buffers (lsn=lsn@entry=0x15424c0a8308, sent_to_disk=sent_to_disk@entry=0x15424c0a8310, flush_horizon=flush_horizon@entry=0x15424c0a8318) at /test/10.6_dbg/storage/maria/ma_loghandler.c:8008 #5 0x00005607c179d6f5 in translog_flush (lsn=<optimized out>) at /test/10.6_dbg/storage/maria/ma_loghandler.c:8177 #6 0x00005607c17f75a7 in maria_delete_all_rows (info=0x1541fc02d818) at /test/10.6_dbg/storage/maria/ma_delete_all.c:56 #7 0x00005607c178a837 in ha_maria::delete_all_rows (this=0x1541fc021b50) at /test/10.6_dbg/storage/maria/ha_maria.cc:2774 #8 0x00005607c1513308 in handler::ha_delete_all_rows (this=0x1541fc021b50) at /test/10.6_dbg/sql/handler.cc:4754 #9 0x00005607c16f5017 in mysql_delete (thd=thd@entry=0x1541fc000db8, table_list=0x1541fc014088, conds=<optimized out>, order_list=order_list@entry=0x1541fc005c10, limit=<optimized out>, options=<optimized out>, result=<optimized out>) at /test/10.6_dbg/sql/sql_delete.cc:466 #10 0x00005607c1235b65 in mysql_execute_command (thd=thd@entry=0x1541fc000db8) at /test/10.6_dbg/sql/sql_limit.h:83 #11 0x00005607c121fadc in mysql_parse (thd=thd@entry=0x1541fc000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x15424c0a9400) at /test/10.6_dbg/sql/sql_parse.cc:8016 #12 0x00005607c122e646 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x1541fc000db8, packet=packet@entry=0x1541fc00b769 "DELETE FROM mysql.proc", packet_length=packet_length@entry=22, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_class.h:1340 #13 0x00005607c1231a26 in do_command (thd=0x1541fc000db8, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_parse.cc:1406 #14 0x00005607c1395ec2 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5607c3a12978, put_in_cache=put_in_cache@entry=true) at /test/10.6_dbg/sql/sql_connect.cc:1410 #15 0x00005607c13964c7 in handle_one_connection (arg=arg@entry=0x5607c3a12978) at /test/10.6_dbg/sql/sql_connect.cc:1312 #16 0x00005607c184203a in pfs_spawn_thread (arg=0x5607c38fb678) at /test/10.6_dbg/storage/perfschema/pfs.cc:2201 #17 0x000015424ce1f609 in start_thread (arg=<optimized out>) at pthread_create.c:477 #18 0x000015424ca0e293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 Crashing bug confirmed present in (and hangs in 10.2-10.6): MariaDB: 10.4.19 (dbg), 10.5.10 (dbg), 10.6.2 (dbg) Crashing bug (or feature/syntax) confirmed not present in: MariaDB: 10.2.38 (dbg), 10.2.38 (opt), 10.3.29 (dbg), 10.3.29 (opt), 10.4.19 (opt), 10.5.10 (opt), 10.6.2 (opt) MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.34 (dbg), 5.7.34 (opt), 8.0.24 (dbg), 8.0.24 (opt)
            alice Alice Sherepa added a comment -

            bb-10.6-release 2c6ded7f32808c5f22bc

            Version: '10.6.8-MariaDB-debug-log'  
            mysqld: /10.6/storage/maria/ma_loghandler.c:8008: translog_flush_buffers: Assertion `log_descriptor.bc.buffer->prev_last_lsn == ((LSN)0)' failed.
            220517 10:13:07 [ERROR] mysqld got signal 6 ;
             
            Server version: 10.6.8-MariaDB-debug-log
             
            linux/raise.c:51(__GI_raise)[0x7fee74d447bb]
            stdlib/abort.c:81(__GI_abort)[0x7fee74d2f535]
            intl/loadmsgcat.c:1177(_nl_load_domain)[0x7fee74d2f40f]
            ??:0(__assert_fail)[0x7fee74d3d102]
            maria/ma_loghandler.c:8009(translog_flush_buffers)[0x56002e807fb0]
            maria/ma_loghandler.c:8178(translog_flush)[0x56002e808fb3]
            maria/ma_commit.c:65(ma_commit)[0x56002e85004d]
            maria/ha_maria.cc:3522(maria_commit(handlerton*, THD*, bool))[0x56002e7c112f]
            sql/handler.cc:2070(commit_one_phase_2(THD*, bool, THD_TRANS*, bool))[0x56002e16c250]
            sql/handler.cc:2023(ha_commit_one_phase(THD*, bool))[0x56002e16be0d]
            sql/handler.cc:1817(ha_commit_trans(THD*, bool))[0x56002e16a18a]
            sql/transaction.cc:472(trans_commit_stmt(THD*))[0x56002dda0a21]
            sql/sql_parse.cc:6073(mysql_execute_command(THD*, bool))[0x56002d928aa5]
            sql/sql_parse.cc:8045(mysql_parse(THD*, char*, unsigned int, Parser_state*))[0x56002d935476]
            sql/sql_parse.cc:1914(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool))[0x56002d90bd2e]
            sql/sql_parse.cc:1409(do_command(THD*, bool))[0x56002d908857]
            sql/sql_connect.cc:1418(do_handle_one_connection(CONNECT*, bool))[0x56002dd5dbd9]
            sql/sql_connect.cc:1314(handle_one_connection)[0x56002dd5d45e]
            perfschema/pfs.cc:2203(pfs_spawn_thread)[0x56002ea41723]
            nptl/pthread_create.c:487(start_thread)[0x7fee751fafa3]
            x86_64/clone.S:97(clone)[0x7fee74e05eff]
            

            alice Alice Sherepa added a comment - bb-10.6-release 2c6ded7f32808c5f22bc Version: '10.6.8-MariaDB-debug-log' mysqld: /10.6/storage/maria/ma_loghandler.c:8008: translog_flush_buffers: Assertion `log_descriptor.bc.buffer->prev_last_lsn == ((LSN)0)' failed. 220517 10:13:07 [ERROR] mysqld got signal 6 ;   Server version: 10.6.8-MariaDB-debug-log   linux/raise.c:51(__GI_raise)[0x7fee74d447bb] stdlib/abort.c:81(__GI_abort)[0x7fee74d2f535] intl/loadmsgcat.c:1177(_nl_load_domain)[0x7fee74d2f40f] ??:0(__assert_fail)[0x7fee74d3d102] maria/ma_loghandler.c:8009(translog_flush_buffers)[0x56002e807fb0] maria/ma_loghandler.c:8178(translog_flush)[0x56002e808fb3] maria/ma_commit.c:65(ma_commit)[0x56002e85004d] maria/ha_maria.cc:3522(maria_commit(handlerton*, THD*, bool))[0x56002e7c112f] sql/handler.cc:2070(commit_one_phase_2(THD*, bool, THD_TRANS*, bool))[0x56002e16c250] sql/handler.cc:2023(ha_commit_one_phase(THD*, bool))[0x56002e16be0d] sql/handler.cc:1817(ha_commit_trans(THD*, bool))[0x56002e16a18a] sql/transaction.cc:472(trans_commit_stmt(THD*))[0x56002dda0a21] sql/sql_parse.cc:6073(mysql_execute_command(THD*, bool))[0x56002d928aa5] sql/sql_parse.cc:8045(mysql_parse(THD*, char*, unsigned int, Parser_state*))[0x56002d935476] sql/sql_parse.cc:1914(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool))[0x56002d90bd2e] sql/sql_parse.cc:1409(do_command(THD*, bool))[0x56002d908857] sql/sql_connect.cc:1418(do_handle_one_connection(CONNECT*, bool))[0x56002dd5dbd9] sql/sql_connect.cc:1314(handle_one_connection)[0x56002dd5d45e] perfschema/pfs.cc:2203(pfs_spawn_thread)[0x56002ea41723] nptl/pthread_create.c:487(start_thread)[0x7fee751fafa3] x86_64/clone.S:97(clone)[0x7fee74e05eff]

            People

              monty Michael Widenius
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.