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

An improper locking bug due to unreleased lock in the ds_xbstream.cc

Details

    Description

      The lock stream_ctxt->mutex is not released correctly when stream_ctxt->dest_file == NULL in the function xbstream_open
      https://github.com/MariaDB/server/blob/76f4a78ba2639b5abd01a88b24a3c509c11530ce/extra/mariabackup/ds_xbstream.cc#L126-L133

      Also mentioned in MDEV-26556.

      Attachments

        Activity

          wlad Vladislav Vaintroub added a comment - - edited

          Actually, this code is not even compiled. Perhaps you can adjust your static analyzer to work better with CMake. Actually, well, no. that code is bug description is compiled, but ds_archive.cc in the title is not compiled.

          wlad Vladislav Vaintroub added a comment - - edited Actually, this code is not even compiled. Perhaps you can adjust your static analyzer to work better with CMake. Actually, well, no. that code is bug description is compiled, but ds_archive.cc in the title is not compiled.
          Ryan Ryan added a comment -

          Sorry, I made a mistake on the title. Should be a real bug in the ds_xbstream.cc?

          Ryan Ryan added a comment - Sorry, I made a mistake on the title. Should be a real bug in the ds_xbstream.cc?

          Maybe. At least it looked obvious enough to fix.

          wlad Vladislav Vaintroub added a comment - Maybe. At least it looked obvious enough to fix.
          Ryan Ryan added a comment -

          Thanks, there are some other similar cases I found.

          Ryan Ryan added a comment - Thanks, there are some other similar cases I found.

          People

            wlad Vladislav Vaintroub
            Ryan Ryan
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.