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

controllernode race condition in oid creation

    XMLWordPrintable

Details

    • Task
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • None
    • Icebox
    • None
    • None

    Description

      Creating a file with 0666 permissions and chmod post fact is the wrong way to do it.

      openat(AT_FDCWD, "/var/lib/columnstore/data1/systemFiles/dbrm/oidbitmap", O_RDWR|O_CREAT|O_TRUNC, 0666) = -1 ENOENT (No such file or directory)
      futex(0x7fffb75b120c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
      chmod("/var/lib/columnstore/data1/systemFiles/dbrm/oidbitmap", 0664) = -1 ENOENT (No such file or directory)
      

      Set umask before files are opened.

      per: versioning/BRM/oidserver.cpp

      umask use

      :~/mariadb-server-10.5/storage/columnstore/columnstore$ git grep umask
      procmon/main.cpp:        umask(0);
      versioning/BRM/oidserver.cpp:            chmod(fFilename.c_str(), 0664);   // XXXPAT: override umask at least for testing
      versioning/BRM/save_brm.cpp:    (void)::umask(0);
      versioning/BRM/script-fcns:# Make sure umask is sane
      versioning/BRM/script-fcns:umask 022
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              danblack Daniel Black
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.