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

MariaDB Hangs Due to Stuck Queries, Refuses to Restart

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Incomplete
    • 10.11.11, 11.4.5, 11.4.7
    • N/A
    • None

    Description

      Summary
      MariaDB occasionally enters an unrecoverable state where multiple queries get stuck indefinitely and the mysqld process becomes unresponsive. Attempting to restart the process either fails or results in a hang during shutdown, requiring forceful intervention (e.g., kill -9).

      Steps to Reproduce
      Unfortunately, this issue is intermittent and non-deterministic. However, it has occurred multiple times across different workloads.

      Observed Behavior

      • Queries remain stuck indefinitely with no progress, running for hours until they reach Killed state and does not clean up the Killed state queries.
      • Running KILL ID from inside the MySQL client does not work for the stuck query.
      • Process does not respond to mysqladmin shutdown or systemctl stop mariadb
      • Requires `kill -9` to terminate.
      • No significant errors reported in the MariaDB error log around the time of the hang.

      Environment Details

      • MariaDB runs inside LXD Containers
      • Storage: ZFS on pd-ssd, no high IO noticed
      • OS: Ubuntu Noble
      • Kernel: 6.8.0-1029-gcp #31-Ubuntu SMP

      You may notice that the InnoDB buffer pool is low, and that's intended as we have a daemon that automatically raise innodb buffer pool limit based on certain metrics and cache performance. We also confirmed that this issue is happening with InnoDB buffer limit set from 16M limit to 2G limit and with InnoDB buffer usage didn't hit the limit as well.

      Attachments

        1. gdb_trace.txt
          186 kB
          mdb3547
        2. gdb_trace2.txt
          66 kB
          mdb3547
        3. global_status.txt
          66 kB
          mdb3547
        4. global_variables.txt
          79 kB
          mdb3547
        5. innodb_engine_status.txt
          28 kB
          mdb3547
        6. processlist.txt
          6 kB
          mdb3547
        7. table_information.txt
          3 kB
          mdb3547

        Issue Links

          Activity

            People

              debarun Debarun Banerjee (Inactive)
              mdb3547 mdb3547
              Votes:
              5 Vote for this issue
              Watchers:
              13 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.