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

SIGSEGV in store_server_fields on CREATE SERVER

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.5, 10.6, 10.11, 11.4, 11.8, 12.0
    • 10.5, 10.6, 10.11, 11.4, 11.8
    • Server
    • None

    Description

      CREATE SERVER test1 FOREIGN DATA WRAPPER mysql OPTIONS (HOST'',PORT 4294967295);
      

      Leads to:

      CS 11.4.6 ef966af801afc2a07222b5df65dddd52c77431dd (Debug) Build 15/02/2025

      mariadbd: /test/11.4_dbg/sql/sql_servers.cc:607: int store_server_fields(TABLE *, FOREIGN_SERVER *): Assertion `thd->is_error()' failed.
      

      CS 11.4.6 ef966af801afc2a07222b5df65dddd52c77431dd (Debug) Build 15/02/2025

      Core was generated by `/test/MD150225-mariadb-11.4.6-linux-x86_64-dbg/bin/mariadbd --no-defaults --max'.
      Program terminated with signal SIGABRT, Aborted.
      Download failed: Invalid argument.  Continuing without source file ./nptl/./nptl/pthread_kill.c.
      #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
       
      [Current thread is 1 (LWP 1810207)]
      (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  0x000014bfd964526e in __GI_raise (sig=sig@entry=6)at ../sysdeps/posix/raise.c:26
      #4  0x000014bfd96288ff in __GI_abort () at ./stdlib/abort.c:79
      #5  0x000014bfd962881b in __assert_fail_base (fmt=0x14bfd97d01e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x55fecb404d86 "thd->is_error()", file=file@entry=0x55fecb43314b "/test/11.4_dbg/sql/sql_servers.cc", line=line@entry=607, function=function@entry=0x55fecb4331d2 "int store_server_fields(TABLE *, FOREIGN_SERVER *)") at ./assert/assert.c:94
      #6  0x000014bfd963b507 in __assert_fail (assertion=0x55fecb404d86 "thd->is_error()", file=0x55fecb43314b "/test/11.4_dbg/sql/sql_servers.cc", line=607, function=0x55fecb4331d2 "int store_server_fields(TABLE *, FOREIGN_SERVER *)") at ./assert/assert.c:103
      #7  0x000055feca5ff615 in store_server_fields (table=0x55fecd934fd8, server=0x14bf80013150) at /test/11.4_dbg/sql/sql_servers.cc:607
      #8  0x000055feca5ff172 in insert_server_record (table=0x55fecd934fd8, server=0x14bf80013150) at /test/11.4_dbg/sql/sql_servers.cc:664
      #9  0x000055feca5fe048 in insert_server (thd=0x14bf80000d58, server=0x14bf80013150) at /test/11.4_dbg/sql/sql_servers.cc:486
      #10 0x000055feca5fda96 in create_server (thd=0x14bf80000d58, server_options=0x14bf80006740) at /test/11.4_dbg/sql/sql_servers.cc:1142
      #11 0x000055feca430f84 in mysql_execute_command (thd=0x14bf80000d58, is_called_from_prepared_stmt=false) at /test/11.4_dbg/sql/sql_parse.cc:5807
      #12 0x000055feca4207a4 in mysql_parse (thd=0x14bf80000d58, rawbuf=0x14bf80019c40 "CREATE SERVER test1 FOREIGN DATA WRAPPER mysql OPTIONS (HOST'',PORT 4294967295)", length=79, parser_state=0x14bfd4167a30)at /test/11.4_dbg/sql/sql_parse.cc:7907
      #13 0x000055feca41dc54 in dispatch_command (command=COM_QUERY, thd=0x14bf80000d58, packet=0x14bf8000afd9 "CREATE SERVER test1 FOREIGN DATA WRAPPER mysql OPTIONS (HOST'',PORT 4294967295)", packet_length=79, blocking=true)at /test/11.4_dbg/sql/sql_parse.cc:1904
      #14 0x000055feca421353 in do_command (thd=0x14bf80000d58, blocking=true)at /test/11.4_dbg/sql/sql_parse.cc:1417
      #15 0x000055feca6035a9 in do_handle_one_connection (connect=0x55fecd955c58, put_in_cache=true) at /test/11.4_dbg/sql/sql_connect.cc:1408
      #16 0x000055feca603342 in handle_one_connection (arg=0x55fecd9b9708)at /test/11.4_dbg/sql/sql_connect.cc:1320
      #17 0x000014bfd969ca94 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447
      #18 0x000014bfd9729c3c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
      

      Bug confirmed present in:
      MariaDB: 10.5.29 (dbg), 10.6.22 (dbg), 10.11.12 (dbg), 11.4.6 (dbg), 11.8.1 (dbg), 12.0.0 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.5.29 (opt), 10.6.22 (opt), 10.11.12 (opt), 11.4.6 (opt), 11.8.1 (opt), 12.0.0 (opt)

      Attachments

        Issue Links

          Activity

            There are no comments yet on this issue.

            People

              ycp Yuchen Pei
              Roel Roel Van de Paar
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.