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

SHUTDOWN-caused SIGSEGV's, SIGABRTS's, error 22 and heap-use-after-free when using event_scheduler

    XMLWordPrintable

Details

    Description

      Execute the following repeatedly (using using multiple threads and random order, if you like, though these are likely not necessary from current observations).

      Note that there is a significant SHUTDOWN command in the testcase, so standard run methods (like MTR/CLI) may not work. We have a specialized script for this in the mariadb-qa (multirun_mysqld_text) which can be setup to produce this issue in 1-2 minutes. Please let me know if this would help and I will set it up for you.

      The issue tends to reproduce quite easily with 200 non-random client threads against approx 10 mysqld's.

      DROP DATABASE test;
      CREATE DATABASE test;
      USE test;
      SET GLOBAL binlog_checksum=NONE;
      SHUTDOWN;
      SET GLOBAL event_scheduler=1;
      SELECT SLEEP (3);
      

      Leads, sporadically, to:

      10.6.0 03ff588d153f22f00ff00923e82498cbac63505f (Debug)

      Core was generated by `/test/MD060321-mariadb-10.6.0-linux-x86_64-dbg/bin/mysqld --core-file --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:56
      [Current thread is 1 (Thread 0x14955d4ea700 (LWP 173779))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x00005652e630a3f3 in my_write_core (sig=sig@entry=11) at /test/10.6_dbg/mysys/stacktrace.c:424
      #2  0x00005652e5aaf195 in handle_fatal_signal (sig=11) at /test/10.6_dbg/sql/signal_handler.cc:331
      #3  <signal handler called>
      #4  0x00005652e5cd553a in Event_queue::recalculate_activation_times (this=0x1494ec02a470, thd=thd@entry=0x1494e002ebd8) at /test/10.6_dbg/sql/event_queue.cc:464
      #5  0x00005652e5cd3aa5 in Event_scheduler::run (this=this@entry=0x1494ec02a5d0, thd=0x1494e002ebd8) at /test/10.6_dbg/sql/event_scheduler.cc:485
      #6  0x00005652e5cd3da8 in event_scheduler_thread (arg=arg@entry=0x1494e003d138) at /test/10.6_dbg/sql/event_scheduler.cc:236
      #7  0x00005652e5df0ce9 in pfs_spawn_thread (arg=0x1494e003d1e8) at /test/10.6_dbg/storage/perfschema/pfs.cc:2201
      #8  0x0000149575aed609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #9  0x00001495756dc293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Attachments

        Issue Links

          Activity

            People

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