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

mem_pressure::~mem_pressure() causes a crash on bootstrap

    XMLWordPrintable

Details

    Description

      MDEV-14992 and related tickets intend to replace mariadb-backup --backup with a BACKUP SERVER statement.

      For applying the log to a backup, the intention is to replace mariadb-backup --prepare with a special invocation of mariadbd that would exit right after applying the log. I just tested the simplest invocation that I could think about, but it would crash with SIGABRT:

      mysql-test/mtr main.1st
      echo 'shutdown;'|
      sql/mariadbd --datadir $(pwd)/mysql-test/var/mysqld.1/data --bootstrap
      

      10.11 b66db0f23bd253bfdcd8f475b017d49f36d05d9f

      2026-05-06 14:40:07 0 [Note] InnoDB: File './ibtmp1' size is now 12.000MiB.
      2026-05-06 14:40:07 0 [Note] InnoDB: log sequence number 52917 (memory-mapped); transaction id 16
      2026-05-06 14:40:07 0 [Note] InnoDB: Loading buffer pool(s) from /dev/shm/10.6/mysql-test/var/mysqld.1/data/ib_buffer_pool
      2026-05-06 14:40:07 0 [Note] InnoDB: Buffer pool(s) load completed at 260506 14:40:07
      2026-05-06 14:40:07 0 [Note] Plugin 'FEEDBACK' is disabled.
      terminate called without an active exception
      

      I debugged this with https://rr-project.org as follows:

      mysql-test/mtr main.1st
      echo 'shutdown;'|
      _RR_TRACE_DIR=/dev/shm/rr rr record \
      sql/mariadbd --datadir $(pwd)/mysql-test/var/mysqld.1/data --bootstrap
      rr replay /dev/shm/rr/latest-trace
      

      10.11 b66db0f23bd253bfdcd8f475b017d49f36d05d9f

      0x00007f5492897d40 in _start () from /lib64/ld-linux-x86-64.so.2
      (rr) continue
      Continuing.
      Thread 1 received signal SIGABRT, Aborted.
      __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=0x6, no_tid=no_tid@entry=0x0) at ./nptl/pthread_kill.c:44
      ⚠️ warning: 44	./nptl/pthread_kill.c: Tiedostoa tai hakemistoa ei ole
      (rr) backtrace
      #0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=0x6, no_tid=no_tid@entry=0x0) at ./nptl/pthread_kill.c:44
      #1  0x00007f5491a9fdbf in __pthread_kill_internal (threadid=<optimized out>, signo=0x6) at ./nptl/pthread_kill.c:89
      #2  0x00007f5491a48d02 in __GI_raise (sig=sig@entry=0x6) at ../sysdeps/posix/raise.c:26
      #3  0x00007f5491a304b2 in __GI_abort () at ./stdlib/abort.c:77
      #4  0x00007f5491ca9d0e in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
      #5  0x00007f5491cbd8da in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
      #6  0x00007f5491ca9889 in std::terminate() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
      #7  0x0000561b6f0533ce in std::__terminate () at /usr/include/x86_64-linux-gnu/c++/16/bits/c++config.h:358
      #8  std::thread::~thread (this=<optimized out>) at /usr/include/c++/16/bits/std_thread.h:184
      #9  0x0000561b6f0533db in mem_pressure::~mem_pressure (this=<optimized out>) at /mariadb/10.6/storage/innobase/buf/buf0buf.cc:832
      #10 0x00007f5491a4b3a1 in __run_exit_handlers (status=0x0, listp=0x7f5491bf1680 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=0x1, run_dtors=run_dtors@entry=0x1) at ./stdlib/exit.c:118
      #11 0x00007f5491a4b46c in __GI_exit (status=<optimized out>) at ./stdlib/exit.c:148
      #12 0x0000561b6e898359 in mysqld_main (argc=<optimized out>, argv=<optimized out>) at /mariadb/10.6/sql/mysqld.cc:6046
      #13 0x0000561b6e88c4f2 in main (argc=<optimized out>, argv=<optimized out>) at /mariadb/10.6/sql/main.cc:34
      

      Attachments

        Issue Links

          Activity

            People

              thiru Thirunarayanan Balathandayuthapani
              marko Marko Mäkelä
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.