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

UBSAN: srv0start.cc:2069:31: runtime error: member call on null pointer of type 'struct fil_space_t' on shutdown of InnoDB

    XMLWordPrintable

Details

    Description

      Build with

      -DWITH_ASAN=ON -DWITH_ASAN_SCOPE=ON -DWITH_UBSAN=ON -DWSREP_LIB_WITH_ASAN=ON
      

      And set

      export UBSAN_OPTIONS=print_stacktrace=1
      export ASAN_OPTIONS=quarantine_size_mb=512:atexit=1:detect_invalid_pointer_pairs=3:dump_instruction_bytes=1:abort_on_error=1
      

      Then startup and shutdown the server manually (./bin/mysqld --options ...) and you should see:

      10.6.0 3f871b339429441ad907ecf7dfabdc414797e664 (Debug)

      2021-03-24 20:13:22 0 [Note] InnoDB: Starting shutdown...
      2021-03-24 20:13:22 0 [Note] InnoDB: Dumping buffer pool(s) to /test/UBASAN_MD260121-mariadb-10.6.0-linux-x86_64-dbg/data/ib_buffer_pool
      2021-03-24 20:13:22 0 [Note] InnoDB: Buffer pool(s) dump completed at 210324 20:13:22
      /data/builds/10.6_dbg_san/storage/innobase/srv/srv0start.cc:2069:31: runtime error: member call on null pointer of type 'struct fil_space_t'
          #0 0x55b3789cf44f in innodb_shutdown() /data/builds/10.6_dbg_san/storage/innobase/srv/srv0start.cc:2069
          #1 0x55b378182457 in innobase_end /data/builds/10.6_dbg_san/storage/innobase/handler/ha_innodb.cc:3762
          #2 0x55b3763df122 in ha_finalize_handlerton(st_plugin_int*) /data/builds/10.6_dbg_san/sql/handler.cc:583
          #3 0x55b374e7a210 in plugin_deinitialize /data/builds/10.6_dbg_san/sql/sql_plugin.cc:1262
          #4 0x55b374e8957c in reap_plugins /data/builds/10.6_dbg_san/sql/sql_plugin.cc:1338
          #5 0x55b374e8d530 in plugin_shutdown() /data/builds/10.6_dbg_san/sql/sql_plugin.cc:2045
          #6 0x55b3745c56a9 in clean_up /data/builds/10.6_dbg_san/sql/mysqld.cc:1981
          #7 0x55b3745f48ed in mysqld_main(int, char**) /data/builds/10.6_dbg_san/sql/mysqld.cc:5728
          #8 0x55b3745bdbaa in main /data/builds/10.6_dbg_san/sql/main.cc:25
          #9 0x14a2d352e0b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b2)
          #10 0x55b3744915ad in _start (/test/UBASAN_MD260121-mariadb-10.6.0-linux-x86_64-dbg/bin/mariadbd+0x7b275ad)
       
      2021-03-24 20:13:23 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
      2021-03-24 20:13:23 0 [Note] InnoDB: Shutdown completed; log sequence number 43230; transaction id 19
      

      If hard to reproduce, or if the issue is not clear, I can make a more detailed testcase.

      Present in 10.6, other versions not tested yet.

      Attachments

        Issue Links

          Activity

            People

              marko Marko Mäkelä
              Roel Roel Van de Paar
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

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