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

DELETE with CASCADE constraints takes long time and then crashes the instance with Signal 6

Details

    Description

      Running DELETE on a table with a single ROW which causes a cascade constraint to trigger hangs for long time (about 20 minutes in the reported case) and then crashes the instance with:

      InnoDB: ###### Diagnostic info printed to the standard error stream
      2017-08-10 19:08:35 140481422710528 [ERROR] [FATAL] InnoDB: Semaphore wait has lasted > 600 seconds. We intentionally crash the server becau
      se it appears to be hung.
      170810 19:08:35 [ERROR] mysqld got signal 6 ;

      To reproduce:

      1) Import attached dump

      2) Execute:

      DELETE FROM BRc273a13dfda91b1add89;

      3) Wait ~20 minutes

      On 10.1 the same completes successfully in 15 seconds.

      Attachments

        Issue Links

          Activity

            My observation of the predicate being not only slow but also possibly wrong could explain
            MDEV-13246 Stale rows despite ON DELETE CASCADE constraint

            There was a compilation error in my patch when WITH_WSREP was not enabled. Revised patch on bb-10.2-marko

            marko Marko Mäkelä added a comment - My observation of the predicate being not only slow but also possibly wrong could explain MDEV-13246 Stale rows despite ON DELETE CASCADE constraint There was a compilation error in my patch when WITH_WSREP was not enabled. Revised patch on bb-10.2-marko

            ok to push with change discussed on slack.

            jplindst Jan Lindström (Inactive) added a comment - ok to push with change discussed on slack.

            The change that was discussed: pick up the !wsrep_thd_is_BF() condition from Galera MW-369 FK fixes, which was missing from MariaDB 10.2.
            Side note: MariaDB 10.2 may also be missing some other changes from the Galera 5.7 branch.

            marko Marko Mäkelä added a comment - The change that was discussed: pick up the !wsrep_thd_is_BF() condition from Galera MW-369 FK fixes , which was missing from MariaDB 10.2. Side note: MariaDB 10.2 may also be missing some other changes from the Galera 5.7 branch.
            claudio.nanni Claudio Nanni added a comment -

            Now it's much faster on a single instance, but if Galera is enabled it's exactly like before, lasting so long it will eventually render the cluster unusable.

            claudio.nanni Claudio Nanni added a comment - Now it's much faster on a single instance, but if Galera is enabled it's exactly like before, lasting so long it will eventually render the cluster unusable.

            claudio.nanni, you are right, the Galera logic was not fixed yet. I filed MDEV-13678 to track that fix.

            marko Marko Mäkelä added a comment - claudio.nanni , you are right, the Galera logic was not fixed yet. I filed MDEV-13678 to track that fix.

            People

              marko Marko Mäkelä
              claudio.nanni Claudio Nanni
              Votes:
              0 Vote for this issue
              Watchers:
              5 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.