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

Oddities around innodb_fatal_semaphore_wait_threshold and global.innodb_disallow_writes

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

            Transition Time In Source Status Execution Times
            Jan Lindström (Inactive) made transition -
            Open In Progress
            284d 3h 21m 1
            Jan Lindström (Inactive) made transition -
            In Progress Stalled
            1h 9m 1
            Jan Lindström (Inactive) made transition -
            Stalled In Review
            99d 20h 27m 2
            Marko Mäkelä made transition -
            In Review Stalled
            4d 23h 44m 2
            Jan Lindström (Inactive) made transition -
            In Progress In Testing
            4d 1h 8m 3
            Marko Mäkelä made transition -
            In Testing Stalled
            5h 39m 3
            Jan Lindström (Inactive) made transition -
            Stalled In Progress
            17d 13h 14m 4
            Marko Mäkelä made transition -
            In Progress Closed
            8d 5h 25m 1

            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.