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
    • Hide
      When using binlog-in-engine (configured via --binlog-storage-engine=innodb), executing SHUTDOWN WAIT FOR ALL SLAVES hung indefinitely because the replication binlog dump thread failed to stop after reaching the end of the current binary log. The dump thread now stops correctly, allowing the shutdown to complete.
      Show
      When using binlog-in-engine (configured via --binlog-storage-engine=innodb), executing SHUTDOWN WAIT FOR ALL SLAVES hung indefinitely because the replication binlog dump thread failed to stop after reaching the end of the current binary log. The dump thread now stops correctly, allowing the shutdown to complete.
    • 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:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 5h 17m
                  5h 17m
                  Remaining:
                  0d
                  Logged:
                  Time Not Required
                  Not Specified

                  Git Integration

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