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

SIGABRT in safe_mutex_unlock with session_track_system_variables and max_relay_log_size

    XMLWordPrintable

Details

    Description

      SET SESSION session_track_system_variables="*";
      SET SESSION max_relay_log_size=3*1024*1024;
      

      Leads to:

      10.5.2 535c284aedddb6cc3bedba4a8877b501f456991e

      Core was generated by `/test/MD180320-mariadb-10.5.2-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
          at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      [Current thread is 1 (Thread 0x14b24c4d9700 (LWP 42163))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      #1  0x0000560a84e7f7d4 in my_write_core (sig=sig@entry=6) at /data/git/10.5_dbg/mysys/stacktrace.c:518
      #2  0x0000560a84628b5f in handle_fatal_signal (sig=6) at /data/git/10.5_dbg/sql/signal_handler.cc:325
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
      #5  0x000014b24ac1d801 in __GI_abort () at abort.c:79
      #6  0x0000560a84e84e44 in safe_mutex_unlock (mp=<optimized out>, file=file@entry=0x560a85032ad0 "/data/git/10.5_dbg/sql/sys_vars.cc", line=line@entry=5335) at /data/git/10.5_dbg/mysys/thr_mutex.c:415
      #7  0x0000560a844edcf2 in inline_mysql_mutex_unlock (src_line=5335, src_file=0x560a85032ad0 "/data/git/10.5_dbg/sql/sys_vars.cc", that=<optimized out>) at /data/git/10.5_dbg/include/mysql/psi/mysql_thread.h:829
      #8  Sys_var_multi_source_ulonglong::get_master_info_ulonglong_value (this=0x560a85bd8060 <Sys_max_relay_log_size>, thd=0x14b229015088, offset=<optimized out>) at /data/git/10.5_dbg/sql/sys_vars.cc:5335
      #9  0x0000560a8450208a in Sys_var_multi_source_ulonglong::session_value_ptr (this=<optimized out>, thd=<optimized out>, base=<optimized out>) at /data/git/10.5_dbg/sql/sys_vars.ic:2381
      #10 0x0000560a84299e80 in sys_var::value_ptr (this=this@entry=0x560a85bd8060 <Sys_max_relay_log_size>, thd=thd@entry=0x14b229015088, type=SHOW_OPT_SESSION, base=0x560a84ff6410 <null_clex_str>) at /data/git/10.5_dbg/sql/set_var.cc:283
      #11 0x0000560a8441d37d in get_one_variable (thd=thd@entry=0x14b229015088, variable=variable@entry=0x14b24c4d74b0, value_type=value_type@entry=SHOW_OPT_SESSION, show_type=<optimized out>, show_type@entry=SHOW_SYS, status_var=status_var@entry=0x0, charset=charset@entry=0x14b24c4d74a0, buff=0x14b24c4d74e0 "\311C", length=0x14b24c4d74a8) at /data/git/10.5_dbg/sql/sql_show.cc:3532
      #12 0x0000560a84298027 in Session_sysvars_tracker::vars_list::store (this=this@entry=0x14b22901af20, thd=0x14b229015088, buf=0x14b24c4d7e00) at /data/git/10.5_dbg/sql/session_tracker.cc:445
      #13 0x0000560a8429885f in Session_sysvars_tracker::store (this=0x14b22901af10, thd=<optimized out>, buf=<optimized out>) at /data/git/10.5_dbg/sql/session_tracker.cc:495
      #14 0x0000560a84298d48 in Session_tracker::store (this=this@entry=0x14b22901aea8, thd=thd@entry=0x14b229015088, buf=buf@entry=0x14b24c4d7e00) at /data/git/10.5_dbg/sql/session_tracker.cc:1251
      #15 0x0000560a8428efba in net_send_ok (thd=0x14b229015088, server_status=server_status@entry=16386, statement_warn_count=statement_warn_count@entry=0, affected_rows=affected_rows@entry=0, id=id@entry=0, message=<optimized out>, message@entry=0x14b22901ab8b "", is_eof=false, skip_flush=false) at /data/git/10.5_dbg/sql/protocol.cc:282
      #16 0x0000560a8428f1e6 in Protocol::send_ok (this=0x14b229015650, server_status=16386, statement_warn_count=0, affected_rows=0, last_insert_id=0, message=0x14b22901ab8b "", skip_flush=false) at /data/git/10.5_dbg/sql/protocol.cc:643
      #17 0x0000560a8428fb71 in Protocol::end_statement (this=0x14b229015650) at /data/git/10.5_dbg/sql/protocol.cc:606
      #18 0x0000560a8437caab in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14b229015088, packet=<optimized out>, packet@entry=0x14b229067089 "SET SESSION max_relay_log_size=3*1024*1024", packet_length=<optimized out>, packet_length@entry=42, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /data/git/10.5_dbg/sql/sql_parse.cc:2430
      #19 0x0000560a84378eaf in do_command (thd=0x14b229015088) at /data/git/10.5_dbg/sql/sql_parse.cc:1358
      #20 0x0000560a844d2a09 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x14b22be2b3a8, put_in_cache=put_in_cache@entry=true) at /data/git/10.5_dbg/sql/sql_connect.cc:1422
      #21 0x0000560a844d2d38 in handle_one_connection (arg=arg@entry=0x14b22be2b3a8) at /data/git/10.5_dbg/sql/sql_connect.cc:1319
      #22 0x0000560a8492fcfc in pfs_spawn_thread (arg=0x14b24a045888) at /data/git/10.5_dbg/storage/perfschema/pfs.cc:2201
      #23 0x000014b24b9006db in start_thread (arg=0x14b24c4d9700) at pthread_create.c:463
      #24 0x000014b24acfe88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.2.32 (dbg), 10.3.23 (dbg), 10.4.13 (dbg), 10.5.2 (dbg), 10.5.3 (dbg). Optimized builds affect too, ref comments below.

      Bug confirmed not present in:
      MariaDB: 10.1.45 (dbg), 10.1.45 (opt)
      MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.47 (dbg), 5.6.47 (opt), 5.7.29 (dbg), 5.7.29 (opt), 8.0.19 (dbg), 8.0.19 (opt)

      Attachments

        Activity

          People

            holyfoot Alexey Botchkov
            Roel Roel Van de Paar
            Votes:
            0 Vote for this issue
            Watchers:
            5 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.