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

Oddities around innodb_fatal_semaphore_wait_threshold and global.innodb_disallow_writes

    XMLWordPrintable

Details

    Description

      Discussing with Marko.

      # mysqld options required for replay:  --innodb_fatal_semaphore_wait_threshold=7
      SET @@global.innodb_disallow_writes=ON;
      CREATE TABLE t (c INT);
      

      Then connect with another client:

      10.6.0 bfb4761ca04704d68dba51f76d7c9967f880a6ee (Debug)

      10.6.0>SHOW FULL PROCESSLIST;
      +----+------+-----------+------+---------+------+----------------+------------------------+----------+
      | Id | User | Host      | db   | Command | Time | State          | Info                   | Progress |
      +----+------+-----------+------+---------+------+----------------+------------------------+----------+
      |  4 | root | localhost | test | Query   |  225 | creating table | CREATE TABLE t (c INT) |    0.000 |
      |  5 | root | localhost | test | Query   |    0 | starting       | SHOW FULL PROCESSLIST  |    0.000 |
      +----+------+-----------+------+---------+------+----------------+------------------------+----------+
      2 rows in set (0.000 sec)
      ...
      10.6.0>SHOW FULL PROCESSLIST;
      +----+------+-----------+------+---------+------+----------------+------------------------+----------+
      | Id | User | Host      | db   | Command | Time | State          | Info                   | Progress |
      +----+------+-----------+------+---------+------+----------------+------------------------+----------+
      |  4 | root | localhost | test | Query   |  604 | creating table | CREATE TABLE t (c INT) |    0.000 |
      |  5 | root | localhost | test | Query   |    0 | starting       | SHOW FULL PROCESSLIST  |    0.000 |
      +----+------+-----------+------+---------+------+----------------+------------------------+----------+
      2 rows in set (0.000 sec)
      

      This looks normal, except that it should abort after 7 seconds due to the setting. And, CTRL+C kills the query but makes the client hang:

      10.6.0 bfb4761ca04704d68dba51f76d7c9967f880a6ee (Debug)

      10.6.0>CREATE TABLE t (c INT);
      ^CCtrl-C -- query killed. Continuing normally.
      

      And in the other client we can then see a hanging killed thread:

      10.6.0 bfb4761ca04704d68dba51f76d7c9967f880a6ee (Debug)

      10.6.0>SHOW FULL PROCESSLIST;
      +----+------+-----------+------+---------+------+----------------+------------------------+----------+
      | Id | User | Host      | db   | Command | Time | State          | Info                   | Progress |
      +----+------+-----------+------+---------+------+----------------+------------------------+----------+
      |  4 | root | localhost | test | Killed  |  683 | creating table | CREATE TABLE t (c INT) |    0.000 |
      |  5 | root | localhost | test | Query   |    0 | starting       | SHOW FULL PROCESSLIST  |    0.000 |
      +----+------+-----------+------+---------+------+----------------+------------------------+----------+
      2 rows in set (0.000 sec)
      

      Another CTRL+C in the CLI lets us loose connection with the server (ERROR 2013 (HY000): Lost connection to MySQL server during query), and we can then exit to the command line and re-enter the client, but the killed hanging CREATE TABLE remains.

      10.6.0 bfb4761ca04704d68dba51f76d7c9967f880a6ee (Debug)

      10.6.0>SHOW FULL PROCESSLIST;
      +----+------+-----------+------+---------+------+----------------+------------------------+----------+
      | Id | User | Host      | db   | Command | Time | State          | Info                   | Progress |
      +----+------+-----------+------+---------+------+----------------+------------------------+----------+
      |  4 | root | localhost | test | Killed  |  811 | creating table | CREATE TABLE t (c INT) |    0.000 |
      |  5 | root | localhost | test | Query   |    0 | starting       | SHOW FULL PROCESSLIST  |    0.000 |
      |  8 | root | localhost | test | Sleep   |   83 |                | NULL                   |    0.000 |
      +----+------+-----------+------+---------+------+----------------+------------------------+----------+
      3 rows in set (0.001 sec)
      

      Other various related testcases give other outcomes it seems (more testing to be done).

      Attachments

        Issue Links

          Activity

            People

              jplindst Jan Lindström (Inactive)
              Roel Roel Van de Paar
              Votes:
              1 Vote for this issue
              Watchers:
              9 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.