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

DEBUG_SYNC cannot handle two signals in a row for multiple threads

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 10.6
    • Fix Version/s: 10.7
    • Component/s: Debug
    • Labels:
      None

      Description

      The current DBUG_SYNC implementation does not support two 'now SIGNAL xxx' commands
      in a row for multiple threads as the first one can get lost while
      the waiting threads are sleeping on mysql_cond_timedwait().

      This was the reason why deadlock_drop_table.test was failing.

      One reason for this is that the signal name is stored in a global variable
      that is overwritten. A better way would be to store all signals in
      an array together with a 'time' when the signal was sent. This array
      should be checked on broadcast.

      A workaround for test that uses DEBUG_SYNC with multiple connections is to signal all threads with the same signal. This avoids the issue.

      Until this is fixed, you should not use the following in MTR tests:

      set debug_sync='now SIGNAL go2';
      set debug_sync='now SIGNAL go3';

      Update: MySQL 5.7+ has fixed this (and added a lot of comments to debug_sync.cc, which is good!)

      The easiest way to fix this bug is to backport the latest debug_sync.cc from MySQL to MariaDB.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            monty Michael Widenius
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:

                Git Integration