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

Assertion `!thd->is_fatal_error' failed

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 13.1
    • 13.1
    • Server
    • None
    • Can result in hang or crash

    Description

      # mysqld options required for replay:  --thread-stack=1023
      SELECT test.database(),test.database();
      

      Leads to:

      CS 13.2.0 c894d97781b54fbf074677c9d67f81cd60a162ac (Debug, Clang 22.1.8-20260621) Build 26/10/2026

      mariadbd: /test/13.1_dbg/sql/sp.cc:2577: static sp_package *Sp_handler::find_package_spec(THD *, const Lex_ident_db &, const LEX_CSTRING &): Assertion `!thd->is_fatal_error' failed.
      

      CS 13.2.0 c894d97781b54fbf074677c9d67f81cd60a162ac (Debug, Clang 22.1.8-20260621) Build 26/10/2026

      Core was generated by `/test/MD261026-mariadb-13.2.0-linux-x86_64-dbg/bin/mariadbd --no-defaults --loo'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
       
      [Current thread is 1 (LWP 1511716)]
      (gdb) bt
      #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
      #1  __pthread_kill_internal (signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:78
      #2  __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6)at ./nptl/pthread_kill.c:89
      #3  0x00007c3dcb44527e in __GI_raise (sig=sig@entry=6)at ../sysdeps/posix/raise.c:26
      #4  0x00007c3dcb4288ff in __GI_abort () at ./stdlib/abort.c:79
      #5  0x00007c3dcb42881b in __assert_fail_base (fmt=0x7c3dcb5d1208 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x6492a8063aef "!thd->is_fatal_error", file=file@entry=0x6492a806ab9a "/test/13.1_dbg/sql/sp.cc", line=line@entry=2577, function=function@entry=0x6492a806b587 "static sp_package *Sp_handler::find_package_spec(THD *, const Lex_ident_db &, const LEX_CSTRING &)")at ./assert/assert.c:96
      #6  0x00007c3dcb43b517 in __assert_fail (assertion=0x6492a8063aef "!thd->is_fatal_error", file=0x6492a806ab9a "/test/13.1_dbg/sql/sp.cc", line=2577, function=0x6492a806b587 "static sp_package *Sp_handler::find_package_spec(THD *, const Lex_ident_db &, const LEX_CSTRING &)") at ./assert/assert.c:105
      #7  0x00006492a6f3b51b in Sp_handler::find_package_spec (thd=0x743cd4000d60, db=@0x7c3dc89ff038: {<Lex_ident_fs> = {<Lex_ident<Compare_table_names>> = {<Lex_cstring> = {<st_mysql_const_lex_string> = {str = 0x743cd401bb60 "test", length = 4}, <No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}, package=@0x743cd401bb30: {str = 0x743cd401bb10 "test", length = 4})at /test/13.1_dbg/sql/sp.cc:2577
      #8  0x00006492a6f3b5cd in is_package_public_routine (thd=0x743cd4000d60, db=@0x7c3dc89ff038: {<Lex_ident_fs> = {<Lex_ident<Compare_table_names>> = {<Lex_cstring> = {<st_mysql_const_lex_string> = {str = 0x743cd401bb60 "test", length = 4}, <No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}, package=@0x743cd401bb30: {str = 0x743cd401bb10 "test", length = 4}, routine=@0x743cd401bb40: {str = 0x743cd401bb20 "database", length = 8}, type=SP_TYPE_FUNCTION) at /test/13.1_dbg/sql/sp.cc:2620
      #9  0x00006492a6f10ab2 in Sql_path::try_resolve_in_schema (this=0x743cd4001c48, thd=0x743cd4000d60, schema=@0x7c3dc89ff038: {<Lex_ident_db> = {<Lex_ident_fs> = {<Lex_ident<Compare_table_names>> = {<Lex_cstring> = {<st_mysql_const_lex_string> = {str = 0x743cd401bb60 "test", length = 4}, <No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}, name=0x743cd401bb30, sph=0x7c3dc89ff230, pkgname=0x7c3dc89ff210, resolved=0x7c3dc89ff087)at /test/13.1_dbg/sql/sql_path.cc:68
      #10 0x00006492a6f1101a in Sql_path::resolve (this=0x743cd4001c48, thd=0x743cd4000d60, caller=0x0, name=0x743cd401bb30, sph=0x7c3dc89ff230, pkgname=0x7c3dc89ff210) at /test/13.1_dbg/sql/sql_path.cc:164
      #11 0x00006492a74fa0cd in Create_sp_func::create_with_db (this=0x6492a8b58128 <Create_sp_func::s_singleton>, thd=0x743cd4000d60, db=@0x7c3dc89ff2a0: {<Lex_ident_db> = {<Lex_ident_fs> = {<Lex_ident<Compare_table_names>> = {<Lex_cstring> = {<st_mysql_const_lex_string> = {str = 0x743cd401bb10 "test", length = 4}, <No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}, name=@0x7c3dc89ff310: {<Lex_ident_ci> = {<Lex_ident<Compare_ident_ci>> = {<Lex_cstring> = {<st_mysql_const_lex_string> = {str = 0x743cd401bb20 "database", length = 8}, <No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}, use_explicit_name=true, item_list=0x0)at /test/13.1_dbg/sql/item_create.cc:3037
      #12 0x00006492a7034f70 in LEX::make_item_func_call_generic (this=0x743cd4005218, thd=0x743cd4000d60, db=@0x7c3dc89ff320: {<Lex_ident_fs> = {<Lex_ident<Compare_table_names>> = {<Lex_cstring> = {<st_mysql_const_lex_string> = {str = 0x743cd401bb10 "test", length = 4}, <No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}, name=@0x7c3dc89ff310: {<Lex_ident_ci> = {<Lex_ident<Compare_ident_ci>> = {<Lex_cstring> = {<st_mysql_const_lex_string> = {str = 0x743cd401bb20 "database", length = 8}, <No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}, args=0x0) at /test/13.1_dbg/sql/sql_lex.cc:11229
      #13 0x00006492a7033c4b in LEX::make_item_func_call_generic (this=0x743cd4005218, thd=0x743cd4000d60, db=@0x7c3dc89ff398: {<Lex_ident_sys_st> = {<st_mysql_const_lex_string> = {str = 0x743cd401bb10 "test", length = 4}, <Sql_alloc> = {<No data fields>}, <No data fields>}, <No data fields>}, name=@0x7c3dc89ff388: {<Lex_ident_sys_st> = {<st_mysql_const_lex_string> = {str = 0x743cd401bb20 "database", length = 8}, <Sql_alloc> = {<No data fields>}, <No data fields>}, <No data fields>}, args=0x0)at /test/13.1_dbg/sql/sql_lex.cc:11177
      #14 0x00006492a7034e4f in LEX::make_item_func_call_generic (this=0x743cd4005218, thd=0x743cd4000d60, cdb=0x7c3dc8a06948, cname=0x7c3dc8a06978, args=0x0) at /test/13.1_dbg/sql/sql_lex.cc:11165
      #15 0x00006492a7035154 in LEX::make_item_func_or_method_call (this=0x743cd4005218, thd=0x743cd4000d60, ca=@0x7c3dc8a06948: {<Lex_string_with_metadata_st> = {<st_mysql_const_lex_string> = {str = 0x743cd401a647 "test.database()", length = 4}, m_is_8bit = true, m_quote = 0 '\000'}, <No data fields>}, cb=@0x7c3dc8a06978: {<Lex_string_with_metadata_st> = {<st_mysql_const_lex_string> = {str = 0x743cd401a64c "database()", length = 8}, m_is_8bit = false, m_quote = 0 '\000'}, <No data fields>}, args=0x0, query_fragment=@0x7c3dc8a073a8: {<Lex_string_with_metadata_st> = {<st_mysql_const_lex_string> = {str = 0x743cd401a647 "test.database()", length = 15}, m_is_8bit = false, m_quote = 0 '\000'}, <No data fields>})at /test/13.1_dbg/sql/sql_lex.cc:11209
      #16 0x00006492a73c5555 in MYSQLparse (thd=0x743cd4000d60)at /test/13.1_dbg/sql/sql_yacc.yy:11404
      #17 0x00006492a7075a98 in parse_sql (thd=0x743cd4000d60, parser_state=0x7c3dc8a079c0, creation_ctx=0x0, do_pfs_digest=true)at /test/13.1_dbg/sql/sql_parse.cc:10401
      #18 0x00006492a70605c2 in mysql_parse (thd=0x743cd4000d60, rawbuf=0x743cd401a630 "SELECT test.database(),test.database()", length=38, parser_state=0x7c3dc8a079c0) at /test/13.1_dbg/sql/sql_parse.cc:7957
      #19 0x00006492a705dece in dispatch_command (command=COM_QUERY, thd=0x743cd4000d60, packet=0x743cd400b691 "SELECT test.database(),test.database()", packet_length=38, blocking=true) at /test/13.1_dbg/sql/sql_parse.cc:1903
      #20 0x00006492a706119a in do_command (thd=0x743cd4000d60, blocking=true)at /test/13.1_dbg/sql/sql_parse.cc:1437
      #21 0x00006492a723c0ce in do_handle_one_connection (connect=0x6492b0608f40, put_in_cache=true) at /test/13.1_dbg/sql/sql_connect.cc:1514
      #22 0x00006492a723beb1 in handle_one_connection (arg=0x6492b05a18f0)at /test/13.1_dbg/sql/sql_connect.cc:1426
      #23 0x00007c3dcb49cb84 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447
      #24 0x00007c3dcb529ecc in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
      

      Bug Detection Matrix

          Rel    o/d  Build   Commit                                    UniqueID observed             
      CS  10.11  dbg  261026  6a063120d4d3d451bff3ea84b3ffbee288b33be8  No bug found                  
      CS  10.11  opt  261026  6a063120d4d3d451bff3ea84b3ffbee288b33be8  No bug found                  
      CS  11.4   dbg  261026  b6406d42c8e26be3d86a4a743180f6b415a4559b  No bug found                  
      CS  11.4   opt  261026  b6406d42c8e26be3d86a4a743180f6b415a4559b  No bug found                  
      CS  11.8   dbg  261026  274dd0d8d90bc773090d13303b8d5e36d2390241  No bug found                  
      CS  11.8   opt  261026  274dd0d8d90bc773090d13303b8d5e36d2390241  No bug found                  
      CS  12.3   dbg  261026  788a07c52132d9f42b6991e599510c62d1625c0f  No bug found                  
      CS  12.3   opt  261026  788a07c52132d9f42b6991e599510c62d1625c0f  No bug found                  
      CS  13.0   dbg  261026  620a4b5624222048fece7fe1789978ae0675cae2  No bug found                  
      CS  13.0   opt  261026  620a4b5624222048fece7fe1789978ae0675cae2  No bug found                  
      CS  13.2   dbg  261026  c894d97781b54fbf074677c9d67f81cd60a162ac  !thd->is_fatal_error|SIGABRT|Sp_handler::find_package_spec|is_package_public_routine|Sql_path::try_resolve_in_schema|Sql_path::resolve
      CS  13.2   opt  261026  c894d97781b54fbf074677c9d67f81cd60a162ac  No bug found                  
      ES  10.6   dbg  261026  45fbb1583d8cdcc7da5a123a844b3bf512f31c9d  No bug found                  
      ES  10.6   opt  261026  45fbb1583d8cdcc7da5a123a844b3bf512f31c9d  No bug found                  
      ES  11.4   dbg  261026  6b2ae48e6e2488060adfdd02a7114bb60d4d150c  No bug found                  
      ES  11.4   opt  261026  6b2ae48e6e2488060adfdd02a7114bb60d4d150c  No bug found                  
      ES  11.8   dbg  261026  6e6ba60bdc2b3f478513c5afa3faa062d8e73736  !thd->is_error()|SIGABRT|LEX::make_item_func_or_method_call|MYSQLparse|parse_sql|mysql_parse
      ES  11.8   opt  261026  6e6ba60bdc2b3f478513c5afa3faa062d8e73736  No bug found                  
      ES  12.3   dbg  261026  781803ca9943d806ecb4b3b3fb39264dfafe1cf0  No bug found                  
      ES  12.3   opt  261026  781803ca9943d806ecb4b3b3fb39264dfafe1cf0  No bug found                  
      

      Attachments

        Activity

          People

            bar Alexander Barkov
            saahil Saahil Alam
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0d
                0d
                Logged:
                Time Spent - 1h
                1h

                Git Integration

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