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

MariDB 11.7.2 - /usr/sbin/mariadbd got signal 11

Details

    • Bug
    • Status: Closed (View Workflow)
    • Blocker
    • Resolution: Fixed
    • 11.7.2
    • 11.8.2
    • Server
    • CentOS Stream 9

    Description

      I upgraded from MariaDB 11.6.2 to 11.7.2 and got this crash.

      Feb 14 04:02:39  mariadbd[28080]: 250214  4:02:39 [ERROR] /usr/sbin/mariadbd got signal 11 ;
      Feb 14 04:02:39  mariadbd[28080]: Sorry, we probably made a mistake, and this is a bug.
      Feb 14 04:02:39  mariadbd[28080]: Your assistance in bug reporting will enable us to fix this for the next release.
      Feb 14 04:02:39  mariadbd[28080]: To report this bug, see https://mariadb.com/kb/en/reporting-bugs about how to report
      Feb 14 04:02:39  mariadbd[28080]: a bug on https://jira.mariadb.org/.
      Feb 14 04:02:39  mariadbd[28080]: Please include the information from the server start above, to the end of the
      Feb 14 04:02:39  mariadbd[28080]: information below.
      Feb 14 04:02:39  mariadbd[28080]: Server version: 11.7.2-MariaDB-log source revision: 80067a69feaeb5df30abb1bfaf7d4e713ccbf027
      Feb 14 04:02:39  mariadbd[28080]: The information page at https://mariadb.com/kb/en/how-to-produce-a-full-stack-trace-for-mariadbd/
      Feb 14 04:02:39  mariadbd[28080]: contains instructions to obtain a better version of the backtrace below.
      Feb 14 04:02:39  mariadbd[28080]: Following these instructions will help MariaDB developers provide a fix quicker.
      Feb 14 04:02:39  mariadbd[28080]: Attempting backtrace. Include this in the bug report.
      Feb 14 04:02:39  mariadbd[28080]: (note: Retrieving this information may fail)
      Feb 14 04:02:39  mariadbd[28080]: Thread pointer: 0x55f0e6c35eb8
      Feb 14 04:02:39  mariadbd[28080]: stack_bottom = 0x7ffe51e02000 thread_stack 0x49000
      Feb 14 04:02:39  mariadbd[28080]: 2025-02-14  4:02:39 0 [Note] InnoDB: Buffer pool(s) load completed at 250214  4:02:39
      Feb 14 04:02:39  mariadbd[28080]: /usr/sbin/mariadbd(my_print_stacktrace+0x2e)[0x55f0b7905a4e]
      Feb 14 04:02:39  mariadbd[28080]: /usr/sbin/mariadbd(handle_fatal_signal+0x305)[0x55f0b73cea75]
      Feb 14 04:02:39  mariadbd[28080]: /lib64/libc.so.6(+0x3ea60)[0x7f55e483ea60]
      Feb 14 04:02:39  mariadbd[28080]: /usr/sbin/mariadbd(_Z9get_fieldP11st_mem_rootP5Field+0x13)[0x55f0b7241063]
      Feb 14 04:02:39  mariadbd[28080]: /usr/sbin/mariadbd(+0x9cba67)[0x55f0b7273a67]
      Feb 14 04:02:39  mariadbd[28080]: /usr/sbin/mariadbd(_Z14servers_reloadP3THD+0x24a)[0x55f0b7275a1a]
      Feb 14 04:02:39  mariadbd[28080]: /usr/sbin/mariadbd(_Z12servers_initb+0x152)[0x55f0b7275be2]
      Feb 14 04:02:39  mariadbd[28080]: /usr/sbin/mariadbd(+0x77f2c7)[0x55f0b70272c7]
      Feb 14 04:02:39  mariadbd[28080]: /usr/sbin/mariadbd(_Z11mysqld_mainiPPc+0x44b)[0x55f0b702c6bb]
      Feb 14 04:02:39  mariadbd[28080]: /lib64/libc.so.6(+0x295d0)[0x7f55e48295d0]
      Feb 14 04:02:39  mariadbd[28080]: /lib64/libc.so.6(__libc_start_main+0x80)[0x7f55e4829680]
      Feb 14 04:02:39  mariadbd[28080]: /usr/sbin/mariadbd(_start+0x25)[0x55f0b7020725]
      Feb 14 04:02:39  mariadbd[28080]: Connection ID (thread ID): 0
      Feb 14 04:02:39  mariadbd[28080]: Status: NOT_KILLED
      Feb 14 04:02:39  mariadbd[28080]: Query (0x55f0b7a0c261): intern:servers_init
      Feb 14 04:02:39  mariadbd[28080]: Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_>
      Feb 14 04:02:39  mariadbd[28080]: Writing a core file...
      Feb 14 04:02:39  mariadbd[28080]: Working directory at /var/lib/mysql
      Feb 14 04:02:39  mariadbd[28080]: Resource Limits (excludes unlimited resources):
      Feb 14 04:02:39  mariadbd[28080]: Limit                     Soft Limit           Hard Limit           Units
      Feb 14 04:02:39  mariadbd[28080]: Max stack size            8388608              unlimited            bytes
      Feb 14 04:02:39  mariadbd[28080]: Max processes             126037               126037               processes
      Feb 14 04:02:39  mariadbd[28080]: Max open files            32768                32768                files
      Feb 14 04:02:39  mariadbd[28080]: Max locked memory         524288               524288               bytes
      Feb 14 04:02:39  mariadbd[28080]: Max pending signals       126037               126037               signals
      Feb 14 04:02:39  mariadbd[28080]: Max msgqueue size         819200               819200               bytes
      Feb 14 04:02:39  mariadbd[28080]: Max nice priority         0                    0
      Feb 14 04:02:39  mariadbd[28080]: Max realtime priority     0                    0
      Feb 14 04:02:39  mariadbd[28080]: Core pattern: |/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %h
      Feb 14 04:02:39  mariadbd[28080]: Kernel version: Linux version 6.13.2-1.el9.elrepo.x86_64 (mockbuild@22844f7551284e64abf3f370e0b7ce1b) (gcc (GCC) 11.5.0 20240719 (Red Hat 11.5.0-2), GNU ld version 2.35.2-54.el9) #1 SMP PREEMPT_DYNAMIC Sat Feb  8 12:33:51 EST 2025
      

      Attachments

        Issue Links

          Activity

            danblack Daniel Black added a comment -

            Thanks for the bug report. Are you using CREATE SERVER or a mysql.servers table in any way?

            Can you;

            1. dnf install MariaDB-server-debuginfo

            And follow https://mariadb.com/kb/en/how-to-produce-a-full-stack-trace-for-mariadbd/#extracting-a-core-file-from-systemd-coredump to get a detailed backtrace?

            2. coredumpctl debug
            3. on gdb prompt: bt -frame-arguments all full
            4. attach to this bug report.

            danblack Daniel Black added a comment - Thanks for the bug report. Are you using CREATE SERVER or a mysql.servers table in any way? Can you; 1. dnf install MariaDB-server-debuginfo And follow https://mariadb.com/kb/en/how-to-produce-a-full-stack-trace-for-mariadbd/#extracting-a-core-file-from-systemd-coredump to get a detailed backtrace? 2. coredumpctl debug 3. on gdb prompt: bt -frame-arguments all full 4. attach to this bug report.

            Hi,

            Thanks a lot! Indeed I had a mysql.servers table (created from a failed attempt to create a replica for ClickHouse).

            I've removed the table and it seems to be working.

            (gdb) bt -frame-arguments all full
            #0  0x00007f86ea83ec9b in kill () at ../sysdeps/unix/syscall-template.S:120
            No locals.
            #1  0x00005651af63ea17 in handle_fatal_signal (sig=11) at /usr/src/debug/MariaDB-/src_0/sql/signal_handler.cc:310
                    curr_time = 1739509033
                    tm = {tm_sec = 13, tm_min = 57, tm_hour = 4, tm_mday = 14, tm_mon = 1, tm_year = 125, tm_wday = 5, tm_yday = 44, tm_isdst = 0, tm_gmtoff = 0, tm_zone = 0x5651bf971c80 "UTC"}
                    thd = <optimized out>
            #2  <signal handler called>
            No locals.
            #3  0x00005651af4b1063 in Field::get_thd (this=0x0) at /usr/src/debug/MariaDB-/src_0/sql/field.h:1510
            No locals.
            #4  get_field (mem=mem@entry=0x5651b05bea00 <mem>, field=0x0) at /usr/src/debug/MariaDB-/src_0/sql/table.cc:5293
                    thd = <optimized out>
                    sms = <optimized out>
                    ls = <optimized out>
            #5  0x00005651af4e3a67 in get_server_from_table_to_cache (table=0x5651c0951e68) at /usr/src/debug/MariaDB-/src_0/sql/sql_servers.cc:476
                    ptr = <optimized out>
                    blank = 0x5651afdd2fc4 ""
                    server = 0x5651c0969ce0
                    ptr = <optimized out>
                    blank = <optimized out>
                    server = <optimized out>
            #6  servers_load (thd=thd@entry=0x5651c0947f38, tables=<optimized out>, tables=<optimized out>) at /usr/src/debug/MariaDB-/src_0/sql/sql_servers.cc:306
                    table = 0x5651c0951e68
                    read_record_info = {table = 0x5651c0951e68, unlock_row = 0x5651af3e5750 <rr_unlock_row(st_join_table*)>, read_record_func = 0x5651af2d42e0 <rr_sequential(READ_RECORD*)>, read_record_func_and_unpack_calls = 0x0, thd = 0x5651c0947f38, select = 0x0, ref_length = 5, reclength = 0, rec_cache_size = 0,
                      error_offset = 0, unpack_counter = 0, ref_pos = 0x0, rec_buf = 0x0, cache = 0x0, cache_pos = 0x0, cache_end = 0x0, read_positions = 0x0, sort_info = 0x0, io_cache = 0x0, print_error = false, copy_field = 0x0, copy_field_end = 0x0}
                    return_val = true
            #7  0x00005651af4e5a1a in servers_reload (thd=thd@entry=0x5651c0947f38) at /usr/src/debug/MariaDB-/src_0/sql/sql_servers.cc:362
                    tables = {{next_local = 0x0, next_global = 0x0, prev_global = 0x0, db = {<Lex_ident_fs> = {<Lex_ident<Compare_table_names>> = {<Lex_cstring> = {<st_mysql_const_lex_string> = {str = 0x5651afc58241 "mysql", length = 5}, <No data fields>}, <No data fields>}, <No data fields>}, <No data fields>},
                        table_name = {<Lex_ident_fs> = {<Lex_ident<Compare_table_names>> = {<Lex_cstring> = {<st_mysql_const_lex_string> = {str = 0x5651afc7c28c "servers", length = 7}, <No data fields>}, <No data fields>}, <No data fields>}, <No data fields>},
                        schema_table_name = {<Lex_ident_ci> = {<Lex_ident<Compare_ident_ci>> = {<Lex_cstring> = {<st_mysql_const_lex_string> = {str = 0x0, length = 0}, <No data fields>}, <No data fields>}, <No data fields>}, <No data fields>},
                        alias = {<Lex_ident_fs> = {<Lex_ident<Compare_table_names>> = {<Lex_cstring> = {<st_mysql_const_lex_string> = {str = 0x5651afc7c28c "servers", length = 7}, <No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}, option = 0x0, on_expr = 0x0, on_context = 0x0, table_function = 0x0,
                        sj_on_expr = 0x0, sj_inner_tables = 0, sj_in_exprs = 0, sj_subq_pred = 0x0, original_subq_pred_used_tables = 0, jtbm_subselect = 0x0, jtbm_table_no = 0, sj_mat_info = 0x0, prep_on_expr = 0x0, cond_equal = 0x0, natural_join = 0x0, is_natural_join = false, join_using_fields = 0x0, join_columns = 0x0,
                        is_join_columns_complete = false, next_name_resolution_table = 0x0, index_hints = 0x0, table = 0x5651c0951e68, table_id = 0, derived_result = 0x0, delete_while_scanning = false, map = 0, correspondent_table = 0x0, derived = 0x0, with = 0x0, column_names = 0x0, original_names = 0x0,
                        original_names_source = 0x0, with_internal_reference_map = 0, next_with_rec_ref = 0x0, is_derived_with_recursive_reference = false, block_handle_derived = false, dt_handler = 0x0, pushdown_derived = 0x0, schema_table = 0x0, schema_select_lex = 0x0, schema_table_reformed = false,
                        schema_table_param = 0x0, select_lex = 0x0, view = 0x0, field_translation = 0x0, field_translation_end = 0x0, field_translation_updated = false, merge_underlying_list = 0x0, view_tables = 0x0, belong_to_view = 0x0, belong_to_derived = 0x0, referencing_view = 0x0, view_used_tables = 0, map_exec = 0,
                        tablenr_exec = 0, maybe_null_exec = 0, parent_l = 0x0, security_ctx = 0x0, tabledef_version_buf = '\000' <repeats 19 times>, tabledef_version = {str = 0x0, length = 0}, view_sctx = 0x0, allowed_show = false, where = 0x0, check_option = 0x0, select_stmt = {str = 0x0, length = 0}, md5 = {str = 0x0,
                          length = 0}, source = {str = 0x0, length = 0}, view_db = {<Lex_ident_fs> = {<Lex_ident<Compare_table_names>> = {<Lex_cstring> = {<st_mysql_const_lex_string> = {str = 0x0, length = 0}, <No data fields>}, <No data fields>}, <No data fields>}, <No data fields>},
                        view_name = {<Lex_ident_fs> = {<Lex_ident<Compare_table_names>> = {<Lex_cstring> = {<st_mysql_const_lex_string> = {str = 0x0, length = 0}, <No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}, hr_timestamp = {str = 0x0, length = 0}, definer = {<AUTHID> = {user = {str = 0x0,
                              length = 0}, host = {str = 0x0, length = 0}}, auth = 0x0}, file_version = 0, mariadb_version = 0, updatable_view = 0, algorithm = 0, view_suid = 0, with_check = 0, effective_with_check = 0 '\000', derived_type = 0 '\000', grant = {grant_table_user = 0x0, grant_table_role = 0x0,
                          grant_public = 0x0, version = 0, privilege = NO_ACL, want_privilege = NO_ACL, orig_want_privilege = NO_ACL, m_internal = {m_schema_lookup_done = false, m_schema_access = 0x0, m_table_lookup_done = false, m_table_access = 0x0}}, engine_data = 0, callback_func = 0x0, lock_type = TL_READ,
                        mdl_type = MDL_INTENTION_EXCLUSIVE, table_options = 0, outer_join = 0, shared = 0, updatable = true, straight = false, updating = false, ignore_leaves = false, crashed = false, skip_locked = false, dep_tables = 0, on_expr_dep_tables = 0, nested_join = 0x0, embedding = 0x0, join_list = 0x0,
                        lifted = false, cacheable_table = false, table_in_first_from_clause = false, open_type = OT_TEMPORARY_OR_BASE, contain_auto_increment = false, compact_view_format = false, where_processed = false, check_option_processed = false, required_type = TABLE_TYPE_UNKNOWN, db_type = 0x0,
                        timestamp_buffer = '\000' <repeats 19 times>, prelocking_placeholder = TABLE_LIST::PRELOCK_NONE, open_strategy = TABLE_LIST::OPEN_NORMAL, is_alias = false, is_fqtn = false, fill_me = false, merged = false, merged_for_insert = false, sequence = false, vers_skip_create = 0,
                        used_items = {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x0, last = 0x0, elements = 0}, <No data fields>}, persistent_used_items = {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x0, last = 0x0, elements = 0}, <No data fields>}, view_creation_ctx = 0x0, view_client_cs_name = {
                          str = 0x0, length = 0}, view_connection_cl_name = {str = 0x0, length = 0}, view_body_utf8 = {str = 0x0, length = 0}, trg_event_map = 0 '\000', slave_fk_event_map = 0 '\000', optimized_away = false, materialized = false, i_s_requested_object = 0, prohibit_cond_pushdown = false, table_open_method = 0,
                        schema_table_state = NOT_PROCESSED, is_table_read_plan = 0x0, mdl_request = {type = MDL_SHARED_READ, duration = MDL_TRANSACTION, next_in_list = 0x0, prev_in_list = 0x0, ticket = 0x5651c0534400, key = {m_length = 15, m_db_name_length = 5, m_hash_value = 3811825376,
                            m_ptr = "\002mysql\000servers", '\000' <repeats 372 times>}, m_src_file = 0x5651afc62b30 "/home/buildbot/amd64-rhel-9-rpm-autobake/build/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX/sql/table.h", m_src_line = 2483}, partition_names = 0x0, vers_conditions = {type = SYSTEM_TIME_UNSPECIFIED,
                          orig_type = SYSTEM_TIME_UNSPECIFIED, used = false, delete_history = false, start = {<vers_history_point_t> = {unit = VERS_UNDEFINED, item = 0x0}, <No data fields>}, end = {<vers_history_point_t> = {unit = VERS_UNDEFINED, item = 0x0}, <No data fields>},
                          name = {<Lex_ident_ci> = {<Lex_ident<Compare_ident_ci>> = {<Lex_cstring> = {<st_mysql_const_lex_string> = {str = 0x0, length = 0}, <No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}, field_start = 0x0, field_end = 0x0, period = 0x0}, period_conditions = {
                          type = SYSTEM_TIME_UNSPECIFIED, orig_type = SYSTEM_TIME_UNSPECIFIED, used = false, delete_history = false, start = {<vers_history_point_t> = {unit = VERS_UNDEFINED, item = 0x0}, <No data fields>}, end = {<vers_history_point_t> = {unit = VERS_UNDEFINED, item = 0x0}, <No data fields>},
                          name = {<Lex_ident_ci> = {<Lex_ident<Compare_ident_ci>> = {<Lex_cstring> = {<st_mysql_const_lex_string> = {str = 0x0, length = 0}, <No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}, field_start = 0x0, field_end = 0x0, period = 0x0}, for_insert_data = 0 '\000',
                        m_table_ref_type = TABLE_REF_NULL, m_table_ref_version = 0}}
                    return_val = true
            #8  0x00005651af4e5be2 in servers_init (dont_read_servers_table=dont_read_servers_table@entry=false) at /usr/src/debug/MariaDB-/src_0/sql/sql_servers.cc:265
                    end = <optimized out>
                    thd = 0x5651c0947f38
                    return_val = false
            #9  0x00005651af2972c7 in init_server_components () at /usr/src/debug/MariaDB-/src_0/sql/mysqld.cc:5677
            No locals.
            #10 0x00005651af29c6bb in mysqld_main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/MariaDB-/src_0/sql/mysqld.cc:6002
                    please_close_stdin = true
                    ho_error = <optimized out>
                    new_thread_stack_size = <optimized out>
                    user = <optimized out>
            #11 0x00007f86ea8295d0 in __libc_start_call_main (main=main@entry=0x5651af24a7c0 <main(int, char**)>, argc=argc@entry=1, argv=argv@entry=0x7fff27342808) at ../sysdeps/nptl/libc_start_call_main.h:58
                    self = <optimized out>
                    result = <optimized out>
                    unwind_buf = {cancel_jmp_buf = {{jmp_buf = {0, -8915013124524632179, 140733851117576, 94908830754752, 94908848567064, 140217454387200, 8915381943290402701, 8884009736342181773}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x5651af24a7c0 <main(int, char**)>, 0x5651b0347318}, data = {prev = 0x0,
                          cleanup = 0x0, canceltype = -1356552256}}}
                    not_first_call = <optimized out>
            #12 0x00007f86ea829680 in __libc_start_main_impl (main=0x5651af24a7c0 <main(int, char**)>, argc=1, argv=0x7fff27342808, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff273427f8) at ../csu/libc-start.c:389
            No locals.
            #13 0x00005651af290725 in _start ()
            No symbol table info available.
            

            Thank you again!

            liviuconcioiu Liviu-Mihail Concioiu added a comment - Hi, Thanks a lot! Indeed I had a mysql.servers table (created from a failed attempt to create a replica for ClickHouse). I've removed the table and it seems to be working. (gdb) bt -frame-arguments all full # 0 0x00007f86ea83ec9b in kill () at ../sysdeps/unix/syscall-template.S: 120 No locals. # 1 0x00005651af63ea17 in handle_fatal_signal (sig= 11 ) at /usr/src/debug/MariaDB-/src_0/sql/signal_handler.cc: 310 curr_time = 1739509033 tm = {tm_sec = 13 , tm_min = 57 , tm_hour = 4 , tm_mday = 14 , tm_mon = 1 , tm_year = 125 , tm_wday = 5 , tm_yday = 44 , tm_isdst = 0 , tm_gmtoff = 0 , tm_zone = 0x5651bf971c80 "UTC" } thd = <optimized out> # 2 <signal handler called> No locals. # 3 0x00005651af4b1063 in Field::get_thd ( this = 0x0 ) at /usr/src/debug/MariaDB-/src_0/sql/field.h: 1510 No locals. # 4 get_field (mem=mem @entry = 0x5651b05bea00 <mem>, field= 0x0 ) at /usr/src/debug/MariaDB-/src_0/sql/table.cc: 5293 thd = <optimized out> sms = <optimized out> ls = <optimized out> # 5 0x00005651af4e3a67 in get_server_from_table_to_cache (table= 0x5651c0951e68 ) at /usr/src/debug/MariaDB-/src_0/sql/sql_servers.cc: 476 ptr = <optimized out> blank = 0x5651afdd2fc4 "" server = 0x5651c0969ce0 ptr = <optimized out> blank = <optimized out> server = <optimized out> # 6 servers_load (thd=thd @entry = 0x5651c0947f38 , tables=<optimized out>, tables=<optimized out>) at /usr/src/debug/MariaDB-/src_0/sql/sql_servers.cc: 306 table = 0x5651c0951e68 read_record_info = {table = 0x5651c0951e68 , unlock_row = 0x5651af3e5750 <rr_unlock_row(st_join_table*)>, read_record_func = 0x5651af2d42e0 <rr_sequential(READ_RECORD*)>, read_record_func_and_unpack_calls = 0x0 , thd = 0x5651c0947f38 , select = 0x0 , ref_length = 5 , reclength = 0 , rec_cache_size = 0 , error_offset = 0 , unpack_counter = 0 , ref_pos = 0x0 , rec_buf = 0x0 , cache = 0x0 , cache_pos = 0x0 , cache_end = 0x0 , read_positions = 0x0 , sort_info = 0x0 , io_cache = 0x0 , print_error = false , copy_field = 0x0 , copy_field_end = 0x0 } return_val = true # 7 0x00005651af4e5a1a in servers_reload (thd=thd @entry = 0x5651c0947f38 ) at /usr/src/debug/MariaDB-/src_0/sql/sql_servers.cc: 362 tables = {{next_local = 0x0 , next_global = 0x0 , prev_global = 0x0 , db = {<Lex_ident_fs> = {<Lex_ident<Compare_table_names>> = {<Lex_cstring> = {<st_mysql_const_lex_string> = {str = 0x5651afc58241 "mysql" , length = 5 }, <No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}, table_name = {<Lex_ident_fs> = {<Lex_ident<Compare_table_names>> = {<Lex_cstring> = {<st_mysql_const_lex_string> = {str = 0x5651afc7c28c "servers" , length = 7 }, <No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}, schema_table_name = {<Lex_ident_ci> = {<Lex_ident<Compare_ident_ci>> = {<Lex_cstring> = {<st_mysql_const_lex_string> = {str = 0x0 , length = 0 }, <No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}, alias = {<Lex_ident_fs> = {<Lex_ident<Compare_table_names>> = {<Lex_cstring> = {<st_mysql_const_lex_string> = {str = 0x5651afc7c28c "servers" , length = 7 }, <No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}, option = 0x0 , on_expr = 0x0 , on_context = 0x0 , table_function = 0x0 , sj_on_expr = 0x0 , sj_inner_tables = 0 , sj_in_exprs = 0 , sj_subq_pred = 0x0 , original_subq_pred_used_tables = 0 , jtbm_subselect = 0x0 , jtbm_table_no = 0 , sj_mat_info = 0x0 , prep_on_expr = 0x0 , cond_equal = 0x0 , natural_join = 0x0 , is_natural_join = false , join_using_fields = 0x0 , join_columns = 0x0 , is_join_columns_complete = false , next_name_resolution_table = 0x0 , index_hints = 0x0 , table = 0x5651c0951e68 , table_id = 0 , derived_result = 0x0 , delete_while_scanning = false , map = 0 , correspondent_table = 0x0 , derived = 0x0 , with = 0x0 , column_names = 0x0 , original_names = 0x0 , original_names_source = 0x0 , with_internal_reference_map = 0 , next_with_rec_ref = 0x0 , is_derived_with_recursive_reference = false , block_handle_derived = false , dt_handler = 0x0 , pushdown_derived = 0x0 , schema_table = 0x0 , schema_select_lex = 0x0 , schema_table_reformed = false , schema_table_param = 0x0 , select_lex = 0x0 , view = 0x0 , field_translation = 0x0 , field_translation_end = 0x0 , field_translation_updated = false , merge_underlying_list = 0x0 , view_tables = 0x0 , belong_to_view = 0x0 , belong_to_derived = 0x0 , referencing_view = 0x0 , view_used_tables = 0 , map_exec = 0 , tablenr_exec = 0 , maybe_null_exec = 0 , parent_l = 0x0 , security_ctx = 0x0 , tabledef_version_buf = '\000' <repeats 19 times>, tabledef_version = {str = 0x0 , length = 0 }, view_sctx = 0x0 , allowed_show = false , where = 0x0 , check_option = 0x0 , select_stmt = {str = 0x0 , length = 0 }, md5 = {str = 0x0 , length = 0 }, source = {str = 0x0 , length = 0 }, view_db = {<Lex_ident_fs> = {<Lex_ident<Compare_table_names>> = {<Lex_cstring> = {<st_mysql_const_lex_string> = {str = 0x0 , length = 0 }, <No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}, view_name = {<Lex_ident_fs> = {<Lex_ident<Compare_table_names>> = {<Lex_cstring> = {<st_mysql_const_lex_string> = {str = 0x0 , length = 0 }, <No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}, hr_timestamp = {str = 0x0 , length = 0 }, definer = {<AUTHID> = {user = {str = 0x0 , length = 0 }, host = {str = 0x0 , length = 0 }}, auth = 0x0 }, file_version = 0 , mariadb_version = 0 , updatable_view = 0 , algorithm = 0 , view_suid = 0 , with_check = 0 , effective_with_check = 0 '\000' , derived_type = 0 '\000' , grant = {grant_table_user = 0x0 , grant_table_role = 0x0 , grant_public = 0x0 , version = 0 , privilege = NO_ACL, want_privilege = NO_ACL, orig_want_privilege = NO_ACL, m_internal = {m_schema_lookup_done = false , m_schema_access = 0x0 , m_table_lookup_done = false , m_table_access = 0x0 }}, engine_data = 0 , callback_func = 0x0 , lock_type = TL_READ, mdl_type = MDL_INTENTION_EXCLUSIVE, table_options = 0 , outer_join = 0 , shared = 0 , updatable = true , straight = false , updating = false , ignore_leaves = false , crashed = false , skip_locked = false , dep_tables = 0 , on_expr_dep_tables = 0 , nested_join = 0x0 , embedding = 0x0 , join_list = 0x0 , lifted = false , cacheable_table = false , table_in_first_from_clause = false , open_type = OT_TEMPORARY_OR_BASE, contain_auto_increment = false , compact_view_format = false , where_processed = false , check_option_processed = false , required_type = TABLE_TYPE_UNKNOWN, db_type = 0x0 , timestamp_buffer = '\000' <repeats 19 times>, prelocking_placeholder = TABLE_LIST::PRELOCK_NONE, open_strategy = TABLE_LIST::OPEN_NORMAL, is_alias = false , is_fqtn = false , fill_me = false , merged = false , merged_for_insert = false , sequence = false , vers_skip_create = 0 , used_items = {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x0 , last = 0x0 , elements = 0 }, <No data fields>}, persistent_used_items = {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x0 , last = 0x0 , elements = 0 }, <No data fields>}, view_creation_ctx = 0x0 , view_client_cs_name = { str = 0x0 , length = 0 }, view_connection_cl_name = {str = 0x0 , length = 0 }, view_body_utf8 = {str = 0x0 , length = 0 }, trg_event_map = 0 '\000' , slave_fk_event_map = 0 '\000' , optimized_away = false , materialized = false , i_s_requested_object = 0 , prohibit_cond_pushdown = false , table_open_method = 0 , schema_table_state = NOT_PROCESSED, is_table_read_plan = 0x0 , mdl_request = {type = MDL_SHARED_READ, duration = MDL_TRANSACTION, next_in_list = 0x0 , prev_in_list = 0x0 , ticket = 0x5651c0534400 , key = {m_length = 15 , m_db_name_length = 5 , m_hash_value = 3811825376 , m_ptr = "\002mysql\000servers" , '\000' <repeats 372 times>}, m_src_file = 0x5651afc62b30 "/home/buildbot/amd64-rhel-9-rpm-autobake/build/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX/sql/table.h" , m_src_line = 2483 }, partition_names = 0x0 , vers_conditions = {type = SYSTEM_TIME_UNSPECIFIED, orig_type = SYSTEM_TIME_UNSPECIFIED, used = false , delete_history = false , start = {<vers_history_point_t> = {unit = VERS_UNDEFINED, item = 0x0 }, <No data fields>}, end = {<vers_history_point_t> = {unit = VERS_UNDEFINED, item = 0x0 }, <No data fields>}, name = {<Lex_ident_ci> = {<Lex_ident<Compare_ident_ci>> = {<Lex_cstring> = {<st_mysql_const_lex_string> = {str = 0x0 , length = 0 }, <No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}, field_start = 0x0 , field_end = 0x0 , period = 0x0 }, period_conditions = { type = SYSTEM_TIME_UNSPECIFIED, orig_type = SYSTEM_TIME_UNSPECIFIED, used = false , delete_history = false , start = {<vers_history_point_t> = {unit = VERS_UNDEFINED, item = 0x0 }, <No data fields>}, end = {<vers_history_point_t> = {unit = VERS_UNDEFINED, item = 0x0 }, <No data fields>}, name = {<Lex_ident_ci> = {<Lex_ident<Compare_ident_ci>> = {<Lex_cstring> = {<st_mysql_const_lex_string> = {str = 0x0 , length = 0 }, <No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}, field_start = 0x0 , field_end = 0x0 , period = 0x0 }, for_insert_data = 0 '\000' , m_table_ref_type = TABLE_REF_NULL, m_table_ref_version = 0 }} return_val = true # 8 0x00005651af4e5be2 in servers_init (dont_read_servers_table=dont_read_servers_table @entry = false ) at /usr/src/debug/MariaDB-/src_0/sql/sql_servers.cc: 265 end = <optimized out> thd = 0x5651c0947f38 return_val = false # 9 0x00005651af2972c7 in init_server_components () at /usr/src/debug/MariaDB-/src_0/sql/mysqld.cc: 5677 No locals. # 10 0x00005651af29c6bb in mysqld_main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/MariaDB-/src_0/sql/mysqld.cc: 6002 please_close_stdin = true ho_error = <optimized out> new_thread_stack_size = <optimized out> user = <optimized out> # 11 0x00007f86ea8295d0 in __libc_start_call_main (main=main @entry = 0x5651af24a7c0 <main( int , char **)>, argc=argc @entry = 1 , argv=argv @entry = 0x7fff27342808 ) at ../sysdeps/nptl/libc_start_call_main.h: 58 self = <optimized out> result = <optimized out> unwind_buf = {cancel_jmp_buf = {{jmp_buf = { 0 , - 8915013124524632179 , 140733851117576 , 94908830754752 , 94908848567064 , 140217454387200 , 8915381943290402701 , 8884009736342181773 }, mask_was_saved = 0 }}, priv = {pad = { 0x0 , 0x0 , 0x5651af24a7c0 <main( int , char **)>, 0x5651b0347318 }, data = {prev = 0x0 , cleanup = 0x0 , canceltype = - 1356552256 }}} not_first_call = <optimized out> # 12 0x00007f86ea829680 in __libc_start_main_impl (main= 0x5651af24a7c0 <main( int , char **)>, argc= 1 , argv= 0x7fff27342808 , init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end= 0x7fff273427f8 ) at ../csu/libc-start.c: 389 No locals. # 13 0x00005651af290725 in _start () No symbol table info available. Thank you again!
            elenst Elena Stepanova added a comment - - edited

            Thanks for the report. Reproducible upon upgrade from e.g. 11.6 or 11.4 (probably other versions too).
            On the old version, run

            create server s foreign data wrapper mysql options (host "127.0.0.1", database "test", user "root", port 3306);
            

            Shut down the instance normally.
            Run 11.7 on the same data directory.
            It crashes upon startup:

            11.7 44d0f5864e8dc04464524c42dd916be20e9f152e

            Thread 1 (Thread 0x7f18a7911dc0 (LWP 2461221)):
            #0  __pthread_kill_implementation (threadid=<optimized out>, signo=11, no_tid=<optimized out>) at ./nptl/pthread_kill.c:44
            #1  0x0000556c677a6ea2 in my_write_core (sig=11) at /data/bld/11.7-asan/mysys/stacktrace.c:424
            #2  0x0000556c661da24f in handle_fatal_signal (sig=11) at /data/bld/11.7-asan/sql/signal_handler.cc:298
            #3  <signal handler called>
            #4  0x0000556c65726a81 in Field::get_thd (this=0x0) at /data/bld/11.7-asan/sql/field.h:1510
            #5  0x0000556c65c4ba9b in get_field (mem=0x556c6a373080 <mem>, field=0x0) at /data/bld/11.7-asan/sql/table.cc:5292
            #6  0x0000556c65d2019e in get_server_from_table_to_cache (table=0x619000040198) at /data/bld/11.7-asan/sql/sql_servers.cc:476
            #7  0x0000556c65d1e71a in servers_load (thd=0x62c000150218, tables=0x7ffe60abec90) at /data/bld/11.7-asan/sql/sql_servers.cc:306
            #8  0x0000556c65d1eaa5 in servers_reload (thd=0x62c000150218) at /data/bld/11.7-asan/sql/sql_servers.cc:362
            #9  0x0000556c65d1e3a2 in servers_init (dont_read_servers_table=false) at /data/bld/11.7-asan/sql/sql_servers.cc:265
            #10 0x0000556c65467c47 in init_server_components () at /data/bld/11.7-asan/sql/mysqld.cc:5677
            #11 0x0000556c654693b9 in mysqld_main (argc=13, argv=0x621000000208) at /data/bld/11.7-asan/sql/mysqld.cc:6002
            #12 0x0000556c65450d59 in main (argc=12, argv=0x7ffe60ac1ee8) at /data/bld/11.7-asan/sql/main.cc:34
            

            The failure started happening after this commit in 11.7:

            commit d2eba35653b87a8fbd3bffe3ac4b4eb0ab7c0ca9
            Commit:     Yuchen Pei
            CommitDate: Tue Oct 15 10:50:22 2024 +1100
             
                MDEV-34716 Allow arbitrary options in CREATE SERVER
            

            elenst Elena Stepanova added a comment - - edited Thanks for the report. Reproducible upon upgrade from e.g. 11.6 or 11.4 (probably other versions too). On the old version, run create server s foreign data wrapper mysql options (host "127.0.0.1" , database "test" , user "root" , port 3306); Shut down the instance normally. Run 11.7 on the same data directory. It crashes upon startup: 11.7 44d0f5864e8dc04464524c42dd916be20e9f152e Thread 1 (Thread 0x7f18a7911dc0 (LWP 2461221)): #0 __pthread_kill_implementation (threadid=<optimized out>, signo=11, no_tid=<optimized out>) at ./nptl/pthread_kill.c:44 #1 0x0000556c677a6ea2 in my_write_core (sig=11) at /data/bld/11.7-asan/mysys/stacktrace.c:424 #2 0x0000556c661da24f in handle_fatal_signal (sig=11) at /data/bld/11.7-asan/sql/signal_handler.cc:298 #3 <signal handler called> #4 0x0000556c65726a81 in Field::get_thd (this=0x0) at /data/bld/11.7-asan/sql/field.h:1510 #5 0x0000556c65c4ba9b in get_field (mem=0x556c6a373080 <mem>, field=0x0) at /data/bld/11.7-asan/sql/table.cc:5292 #6 0x0000556c65d2019e in get_server_from_table_to_cache (table=0x619000040198) at /data/bld/11.7-asan/sql/sql_servers.cc:476 #7 0x0000556c65d1e71a in servers_load (thd=0x62c000150218, tables=0x7ffe60abec90) at /data/bld/11.7-asan/sql/sql_servers.cc:306 #8 0x0000556c65d1eaa5 in servers_reload (thd=0x62c000150218) at /data/bld/11.7-asan/sql/sql_servers.cc:362 #9 0x0000556c65d1e3a2 in servers_init (dont_read_servers_table=false) at /data/bld/11.7-asan/sql/sql_servers.cc:265 #10 0x0000556c65467c47 in init_server_components () at /data/bld/11.7-asan/sql/mysqld.cc:5677 #11 0x0000556c654693b9 in mysqld_main (argc=13, argv=0x621000000208) at /data/bld/11.7-asan/sql/mysqld.cc:6002 #12 0x0000556c65450d59 in main (argc=12, argv=0x7ffe60ac1ee8) at /data/bld/11.7-asan/sql/main.cc:34 The failure started happening after this commit in 11.7: commit d2eba35653b87a8fbd3bffe3ac4b4eb0ab7c0ca9 Commit: Yuchen Pei CommitDate: Tue Oct 15 10:50:22 2024 +1100   MDEV-34716 Allow arbitrary options in CREATE SERVER
            ycp Yuchen Pei added a comment -

            Hi holyfoot, ptal thanks

            4b3e225c486 upstream/bb-11.8-mdev-36087 MDEV-36087 Check for existence of the new Options JSON field in mysql.servers
            

            ycp Yuchen Pei added a comment - Hi holyfoot , ptal thanks 4b3e225c486 upstream/bb-11.8-mdev-36087 MDEV-36087 Check for existence of the new Options JSON field in mysql.servers

            ok to push.

            holyfoot Alexey Botchkov added a comment - ok to push.
            ycp Yuchen Pei added a comment - - edited

            Thanks for the review - pushed 6f1161aa34cbb178b00fc24cbc46e2e0e2af767a to 11.8.

            Also tested upgrade between two versions that both contain MDEV-34716
            (11.7->11.8) and it worked fine as expected.

            ycp Yuchen Pei added a comment - - edited Thanks for the review - pushed 6f1161aa34cbb178b00fc24cbc46e2e0e2af767a to 11.8. Also tested upgrade between two versions that both contain MDEV-34716 (11.7->11.8) and it worked fine as expected.

            People

              ycp Yuchen Pei
              liviuconcioiu Liviu-Mihail Concioiu
              Votes:
              0 Vote for this issue
              Watchers:
              6 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.