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

We fail to terminate transaction early with ER_LOCK_TABLE_FULL when lock memory is growing

Details

    Description

      This issue was found while analysing MDEV-28800. When lock memory started occupying large amount of buffer pool we fail to terminate the transaction with ER_LOCK_TABLE_FULL. It eventually leads to a server crash with Innodb exiting with Fatal Error.

      ib::fatal() << "Over 95 percent of the buffer pool is"
                  " occupied by lock heaps"
      

      This is a regression looks to have been introduced in 10.6 by

      commit b6a2472489accf0ae9ac3655ffe9b2997ab267ba
      Author: Daniel Black <daniel@mariadb.org>
      Date:   Tue Feb 22 17:42:59 2022 +1100
       
          MDEV-27891: SIGSEGV in InnoDB buffer pool resize
      

         bool running_out() const
         {
           return !recv_recovery_is_on() &&
      -      UNIV_UNLIKELY(UT_LIST_GET_LEN(free) + UT_LIST_GET_LEN(LRU) <
      -                    std::min(curr_size, old_size) / 4);
      +      UT_LIST_GET_LEN(free) + UT_LIST_GET_LEN(LRU) <
      +        n_chunks_new / 4 * chunks->size;
      +  }
      

      The integer division (n_chunks_new / 4) becomes zero whenever the total number of chunks are < 4 making the check completely ineffective for such cases. Also the check is inaccurate for larger chunks and needs to be corrected.

      I will put forward a patch soon.

      Attachments

        Issue Links

          Activity

            debarun Debarun Banerjee created issue -
            debarun Debarun Banerjee made changes -
            Field Original Value New Value
            Fix Version/s 10.6 [ 24028 ]
            Labels regression-10.6
            debarun Debarun Banerjee made changes -
            Status Open [ 1 ] Confirmed [ 10101 ]
            debarun Debarun Banerjee made changes -
            Assignee Debarun Banerjee [ JIRAUSER54513 ] Marko Mäkelä [ marko ]
            Status Confirmed [ 10101 ] In Review [ 10002 ]
            marko Marko Mäkelä made changes -
            marko Marko Mäkelä made changes -
            Assignee Marko Mäkelä [ marko ] Debarun Banerjee [ JIRAUSER54513 ]
            Status In Review [ 10002 ] Stalled [ 10000 ]
            debarun Debarun Banerjee made changes -
            Fix Version/s 10.6.19 [ 29833 ]
            Fix Version/s 10.6 [ 24028 ]
            Resolution Fixed [ 1 ]
            Status Stalled [ 10000 ] Closed [ 6 ]
            JIraAutomate JiraAutomate made changes -
            Fix Version/s 10.11.9 [ 29834 ]
            Fix Version/s 11.1.6 [ 29835 ]
            Fix Version/s 11.2.5 [ 29836 ]
            Fix Version/s 11.4.3 [ 29837 ]
            Roel Roel Van de Paar made changes -
            Priority Major [ 3 ] Critical [ 2 ]
            mariadb-jira-automation Jira Automation (IT) made changes -
            Zendesk active tickets 206179

            People

              debarun Debarun Banerjee
              debarun Debarun Banerjee
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.