Uploaded image for project: 'MariaDB ColumnStore'
  1. MariaDB ColumnStore
  2. MCOL-4253

Possible race in the take-ownership code in storagemanager, needs investigation

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.4.4, 1.5.3
    • Fix Version/s: Icebox
    • Component/s: Storage Manager
    • Labels:
      None
    • Environment:
      any

      Description

      We ran into an assertion failure in Cache::getPCache(), and I did a little investigation. The assertion verifies that the PrefixCache for the given prefix exists before we use it.

      The prefix-cache is made on the first access of that prefix, in the code to take ownership of a prefix. Looking at the code for Ownership::takeOwnership(), I think if there are two 'simultaneous' requests for the same prefix (2 concurrent takeOwnership() fcns running), one will be allowed to continue (and access the prefix via the prefix-cache I presume), while the other one is still getting ownership. Look at the code near the top of that function. It checks for existence of ownedPrefixes[p], and if it doesn't exist yet it creates it atomically. The next call sees it ... then ... assumes the prefix is already owned?

      Needs further investigation. Either need to prove this works the way it's supposed to (ie, find out what prevents another caller from returning before a prefix is owned), or need to find the real culprit & fix it.

        Attachments

          Activity

            People

            Assignee:
            ben.thompson Ben Thompson
            Reporter:
            pleblanc Patrick LeBlanc (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.