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

use-of-uninitialized-value in THD::print_aborted_warning(unsigned int, char const*)

    XMLWordPrintable

Details

    • Can result in unexpected behaviour
    • Q3/2026 Server Maintenance

    Description

      INSTALL SONAME 'ha_spider';
      SET GLOBAL log_warnings=29;
      SHUTDOWN;
      

      Leads to :

      CS 10.11.19 b1e62d5e530243456338e44be064952a53062fd5 (Debug, MSAN, Clang 20.1.8-20250804) Build 17/06/2026

       
       
      ==1304085==WARNING: MemorySanitizer: use-of-uninitialized-value
          #0 0x5555565c5e58 in THD::print_aborted_warning(unsigned int, char const*) /test/10.11_dbg_san/sql/sql_class.h:5350:36
          #1 0x555556da6cad in THD::awake_no_mutex(killed_state) /test/10.11_dbg_san/sql/sql_class.cc:1959:3
          #2 0x5555565b9228 in THD::awake(killed_state) /test/10.11_dbg_san/sql/sql_class.h:4037:5
          #3 0x5555565b9228 in kill_thread_phase_1(THD*, void*) /test/10.11_dbg_san/sql/mysqld.cc:1604:8
          #4 0x5555565b9228 in int THD_list_iterator::iterate<void>(char (*)(THD*, void*), void*) /test/10.11_dbg_san/sql/sql_class.h:1148:17
          #5 0x5555565b9228 in close_connections() /test/10.11_dbg_san/sql/mysqld.cc:1770:18
          #6 0x5555565ad578 in mysqld_main(int, char**) /test/10.11_dbg_san/sql/mysqld.cc:6134:3
          #7 0x7fffe682a1c9 in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
          #8 0x7fffe682a28a in __libc_start_main csu/../csu/libc-start.c:360:3
          #9 0x555556509924 in _start (/test/MSAN_MD170626-mariadb-10.11.19-linux-x86_64-dbg/bin/mariadbd+0xfb5924) (BuildId: df368211d1c6a9c617d3cc647af18454d241e514)
       
        Memory was marked as uninitialized
          #0 0x5555565480f1 in __msan_allocated_memory (/test/MSAN_MD170626-mariadb-10.11.19-linux-x86_64-dbg/bin/mariadbd+0xff40f1) (BuildId: df368211d1c6a9c617d3cc647af18454d241e514)
          #1 0x555558544d31 in my_malloc /test/10.11_dbg_san/mysys/my_malloc.c:116:7
       
      SUMMARY: MemorySanitizer: use-of-uninitialized-value /test/10.11_dbg_san/sql/sql_class.h:5350:36 in THD::print_aborted_warning(unsigned int, char const*)
      Exiting
      260618 13:49:30 [ERROR] /test/MSAN_MD170626-mariadb-10.11.19-linux-x86_64-dbg/bin/mariadbd got signal 6 ;
      Sorry, we probably made a mistake, and this is a bug.
       
      Your assistance in bug reporting will enable us to fix this for the next release.
      To report this bug, see https://mariadb.com/docs/general-resources/community/community/bug-tracking/reporting-bugs about how to report
      a bug on https://jira.mariadb.org/.
       
      Please include the information from the server start above, to the end of the
      information below.
       
      Server version: 10.11.19-MariaDB-debug source revision: b1e62d5e530243456338e44be064952a53062fd5
       
      The information page at https://mariadb.com/docs/server/reference/product-development/mariadb-fault-finding/how-to-produce-a-full-stack-trace-for-mariadbdcontains instructions to obtain a better version of the backtrace below.
      Following these instructions will help MariaDB developers provide a fix quicker.
       
      Attempting backtrace. Include this in the bug report.
      (note: Retrieving this information may fail)
       
      Thread pointer: 0x0
      stack_bottom = 0x0 thread_stack 0x200000
      /test/MSAN_MD170626-mariadb-10.11.19-linux-x86_64-dbg/bin/mariadbd(___interceptor_backtrace+0xd6)[0x555556564006]
      mysys/stacktrace.c:215(my_print_stacktrace)[0x55555854fb85]
      sql/signal_handler.cc:0(handle_fatal_signal)[0x555556b14a10]
      crtstuff.c:0(SignalHandler(int))[0x555556597dbd]
      libc_sigaction.c:0(__restore_rt)[0x7fffe6845330]
      nptl/pthread_kill.c:44(__pthread_kill_implementation)[0x7fffe689eb2c]
      posix/raise.c:27(__GI_raise)[0x7fffe684527e]
      stdlib/abort.c:81(__GI_abort)[0x7fffe68288ff]
      crtstuff.c:0(__sanitizer::Atexit(void (*)()))[0x5555565218f0]
      crtstuff.c:0(__sanitizer::Die())[0x55555651f662]
      /test/MSAN_MD170626-mariadb-10.11.19-linux-x86_64-dbg/bin/mariadbd(+0xfe2fe7)[0x555556536fe7]
      sql/sql_class.h:5365(THD::print_aborted_warning(unsigned int, char const*))[0x5555565c5e59]
      sql/sql_class.cc:1965(THD::awake_no_mutex(killed_state))[0x555556da6cae]
      psi/mysql_thread.h:790(inline_mysql_mutex_unlock(st_mysql_mutex*, char const*, unsigned int))[0x5555565b9229]
      sql/mysqld.cc:6135(mysqld_main(int, char**))[0x5555565ad579]
      x86/libc-start.c:74(__libc_start_call_main)[0x7fffe682a1ca]
      csu/libc-start.c:128(call_init)[0x7fffe682a28b]
      /test/MSAN_MD170626-mariadb-10.11.19-linux-x86_64-dbg/bin/mariadbd(_start+0x25)[0x555556509925]
       
      
      

      Attachments

        Activity

          People

            ycp Yuchen Pei
            saahil Saahil Alam
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - 2d 3h 10m Original Estimate - 2d 3h 10m
                2d 3h 10m
                Remaining:
                Time Spent - 1h Remaining Estimate - 2d 3h 10m
                2d 3h 10m
                Logged:
                Time Spent - 1h Remaining Estimate - 2d 3h 10m
                1h

                Git Integration

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