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

handle_fatal_signal (sig=11) in __strlen_avx2 on START SLAVE | Assertion `global_system_variables.session_track_system_variables' failed in Session_sysvars_tracker::init | *** buffer overflow detected *** (on optimized builds)

Details

    Description

      CHANGE MASTER TO MASTER_HOST='h', MASTER_USER='u';
      SET @@GLOBAL.session_track_system_variables=NULL;
      START SLAVE IO_THREAD;
      

      Leads to:

      10.5.3 e8351934b68d6d3ee273292eaa2ece203bb2b846

      Core was generated by `/data/MD020420-mariadb-10.5.3-linux-x86_64-opt/bin/mysqld --no-defaults --core-'.
      Program terminated with signal SIGSEGV, Segmentation fault.
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11)
          at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      [Current thread is 1 (Thread 0x7f2c18bea700 (LWP 2364))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      #1  0x00005559193b1d47 in my_write_core (sig=sig@entry=11) at /data/10.5_opt/mysys/stacktrace.c:518
      #2  0x0000555918d7387a in handle_fatal_signal (sig=11) at /data/10.5_opt/sql/signal_handler.cc:325
      #3  <signal handler called>
      #4  __strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:62
      #5  0x00005559193ae49c in my_strdup (key=key@entry=0, from=0x0, my_flags=my_flags@entry=65552) at /data/10.5_opt/mysys/my_malloc.c:228
      #6  0x0000555918acc766 in Session_sysvars_tracker::init (this=<optimized out>, thd=0x7f2bbdc12018) at /data/10.5_opt/sql/session_tracker.cc:330
      #7  0x0000555918b9018b in plugin_thdvar_init (thd=thd@entry=0x7f2bbdc12018) at /data/10.5_opt/sql/sql_plugin.cc:3216
      #8  0x0000555918b3225c in THD::init (this=this@entry=0x7f2bbdc12018) at /data/10.5_opt/sql/sql_class.cc:1248
      #9  0x0000555918b375d9 in THD::THD (this=0x7f2bbdc12018, id=<optimized out>, is_wsrep_applier=<optimized out>) at /data/10.5_opt/sql/sql_class.cc:844
      #10 0x0000555918ade8c7 in handle_slave_io (arg=arg@entry=0x7f2bf77f4000) at /data/10.5_opt/sql/slave.cc:4727
      #11 0x0000555918fd99da in pfs_spawn_thread (arg=0x7f2beac62218) at /data/10.5_opt/storage/perfschema/pfs.cc:2201
      #12 0x00007f2c1805c6db in start_thread (arg=0x7f2c18bea700) at pthread_create.c:463
      #13 0x00007f2c1745a88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.3.23 (dbg), 10.3.23 (opt), 10.4.13 (dbg), 10.4.13 (opt), 10.5.3 (dbg), 10.5.3 (opt)

      Bug confirmed not present in:
      MariaDB: 10.1.45 (dbg), 10.1.45 (opt), 10.2.32 (dbg), 10.2.32 (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

        Issue Links

          Activity

            commit 1350fc3d6c2252929d3d12b98de710bdbad82235 (HEAD > bb-10.3MDEV-22134, origin/bb-10.3-MDEV-22134)
            Author: Oleksandr Byelkin <sanja@mariadb.com>
            Date: Tue Jul 21 14:56:47 2020 +0200

            MDEV-22134: handle_fatal_signal (sig=11) in __strlen_avx2 on START SLAVE | Assertion `global_system_variables.session_track_system_variables' failed in Session_sysvars_tracker::init | *** buffer overflow detected *** (on optimized builds)

            Be aware about posibility for tracking variables list be empty.

            sanja Oleksandr Byelkin added a comment - commit 1350fc3d6c2252929d3d12b98de710bdbad82235 (HEAD > bb-10.3 MDEV-22134 , origin/bb-10.3- MDEV-22134 ) Author: Oleksandr Byelkin <sanja@mariadb.com> Date: Tue Jul 21 14:56:47 2020 +0200 MDEV-22134 : handle_fatal_signal (sig=11) in __strlen_avx2 on START SLAVE | Assertion `global_system_variables.session_track_system_variables' failed in Session_sysvars_tracker::init | *** buffer overflow detected *** (on optimized builds) Be aware about posibility for tracking variables list be empty.

            Perhaps we could disallow setting NULL value for session_track_system_variables.

            bar Alexander Barkov added a comment - Perhaps we could disallow setting NULL value for session_track_system_variables.

            commit b7ad9baf501c8a208b370da755f330f280fdd680 (HEAD > bb-10.3MDEV-22134, origin/bb-10.3-MDEV-22134)
            Author: Oleksandr Byelkin <sanja@mariadb.com>
            Date: Tue Jul 21 14:56:47 2020 +0200

            MDEV-22134: handle_fatal_signal (sig=11) in __strlen_avx2 on START SLAVE | Assertion `global_system_variables.session_track_system_variables' failed in Session_sysvars_tracker::init | *** buffer overflow detected *** (on optimized builds)

            Prohibit assigning NULL as for other system variables.

            sanja Oleksandr Byelkin added a comment - commit b7ad9baf501c8a208b370da755f330f280fdd680 (HEAD > bb-10.3 MDEV-22134 , origin/bb-10.3- MDEV-22134 ) Author: Oleksandr Byelkin <sanja@mariadb.com> Date: Tue Jul 21 14:56:47 2020 +0200 MDEV-22134 : handle_fatal_signal (sig=11) in __strlen_avx2 on START SLAVE | Assertion `global_system_variables.session_track_system_variables' failed in Session_sysvars_tracker::init | *** buffer overflow detected *** (on optimized builds) Prohibit assigning NULL as for other system variables.
            bar Alexander Barkov added a comment - This patch: https://github.com/MariaDB/server/commit/b7ad9baf501c8a208b370da755f330f280fdd680 is OK to push.

            Confirmed that the patch for the moment seems to resolve all testcases. mysqld from the command line works with --log-bin --thread_handling=pool-of-threads --thread-pool-size=2047 so that is likely an MTR related thing.

            Roel Roel Van de Paar added a comment - Confirmed that the patch for the moment seems to resolve all testcases. mysqld from the command line works with --log-bin --thread_handling=pool-of-threads --thread-pool-size=2047 so that is likely an MTR related thing.

            People

              sanja Oleksandr Byelkin
              Roel Roel Van de Paar
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.