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

SHUTDOWN WAIT FOR ALL SLAVES hangs in dump thread when using binlog-in-engine

    XMLWordPrintable

Details

    • Can result in hang or crash
    • Q4/2026 Replic. Development

    Description

      EDIT: The bug here is with the dump thread code used in binlog-in-engine. When `SHUTDOWN WAIT FOR ALL SLAVES`, the dump thread never exits, and this causes the server shutdown to hang (unless something else causes dump thread shutdown, like eg. slave disconnect).

      So the bug isn't related to semi-sync or GTID domains or pending domains. Original bug report follows:

      SHUTDOWN WAIT FOR ALL SLAVES never completes when several transactions across different gtid_domain_ids are genuinely pending a semi-sync ACK at the moment shutdown is issued, on a server started with --binlog-storage-engine=innodb (binlog-in-engine, BiE). A client thread killed by close_connections() while parked in the semi-sync commit wait spins at ~100% CPU instead of unwinding — the master process never exits, and "Shutdown completed" is never logged.

      Confirmed via same-scenario A/B (3 pending transactions across 3 GTID domains, ACK withheld, SHUTDOWN WAIT FOR ALL SLAVES issued, then ACK released):

      • With BiE: hang reproduces — master stays alive, one thread spins, no "Shutdown completed".
      • Without BiE (normal binlog), same tree: shutdown completes cleanly in ~2s, no spin.

      Attachments

        Issue Links

          Activity

            People

              knielsen Kristian Nielsen
              Deepthi ES Deepthi Eranti Sreenivas
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - 5h 17m
                  5h 17m
                  Remaining:
                  Remaining Estimate - 5h 17m
                  5h 17m
                  Logged:
                  Time Spent - Not Specified
                  Not Specified

                  Git Integration

                    Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.