Details

    Description

      There's potential deadlock between "thread killing another thread that has open InnoDB HANDLER or delayed insert thread performing insert into InnoDB table" and "InnoDB service threads like srv_monitor_thread that calls thd_get_error_context_description".

      I doubt MariaDB is affected, because it does try_lock in thd_get_error_context_description, see 6e9a48b67fceab17089ca4cd1406e302386a601b.

      But anyway, since InnoDB doesn't use thr_lock anymore, it is probably a good idea to get rid of ha_innobase::store_lock() by moving some code to external_lock. Note: compared to store_lock external_lock can be called for temporary tables too.

      Attachments

        Issue Links

          Activity

            svoj Sergey Vojtovich created issue -
            marko Marko Mäkelä made changes -
            Field Original Value New Value
            marko Marko Mäkelä made changes -
            Fix Version/s 10.4 [ 22408 ]
            Fix Version/s 10.3 [ 22126 ]
            marko Marko Mäkelä made changes -
            Assignee Marko Mäkelä [ marko ] Sergey Vojtovich [ svoj ]

            As far as I can tell, MDEV-11896 changed the potential deadlock to a real deadlock. It was semi-accidentally fixed later, as noted in MDEV-13983.

            I think that it would be very welcome to remove ha_innobase::store_lock() and to simplify the locking logic. I wonder why that was not done when MDL was introduced.

            marko Marko Mäkelä added a comment - As far as I can tell, MDEV-11896 changed the potential deadlock to a real deadlock. It was semi-accidentally fixed later, as noted in MDEV-13983 . I think that it would be very welcome to remove ha_innobase::store_lock() and to simplify the locking logic. I wonder why that was not done when MDL was introduced.
            marko Marko Mäkelä made changes -
            marko Marko Mäkelä made changes -
            marko Marko Mäkelä made changes -
            marko Marko Mäkelä made changes -
            Assignee Sergey Vojtovich [ svoj ] Sergei Golubchik [ serg ]
            Labels deadlock
            Summary MySQL Bug#17606098: DEADLOCK INVOLVING SRV_MONITOR_THREAD AND LOCK_THD_DATA Remove handler::store_lock()
            serg Sergei Golubchik made changes -
            Affects Version/s 10.3 [ 22126 ]
            Issue Type Bug [ 1 ] Task [ 3 ]
            serg Sergei Golubchik made changes -
            Fix Version/s 10.4 [ 22408 ]
            serg Sergei Golubchik made changes -
            Fix Version/s 10.7 [ 24805 ]
            serg Sergei Golubchik made changes -
            Fix Version/s 10.8 [ 26121 ]
            Fix Version/s 10.7 [ 24805 ]
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 81407 ] MariaDB v4 [ 130678 ]
            serg Sergei Golubchik made changes -
            Fix Version/s 10.9 [ 26905 ]
            Fix Version/s 10.8 [ 26121 ]
            serg Sergei Golubchik made changes -
            Fix Version/s 10.10 [ 27530 ]
            Fix Version/s 10.9 [ 26905 ]
            serg Sergei Golubchik made changes -
            Fix Version/s 10.11 [ 27614 ]
            Fix Version/s 10.10 [ 27530 ]
            serg Sergei Golubchik made changes -
            Fix Version/s 10.12 [ 28320 ]
            Fix Version/s 10.11 [ 27614 ]

            People

              serg Sergei Golubchik
              svoj Sergey Vojtovich
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

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