Uploaded image for project: 'Mesos'
  1. Mesos
  2. MESOS-8646

Agent should be able to resolve file names on open files.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.5.0
    • 1.5.1, 1.6.0
    • None
    • None

    Description

      When implementing os::realpath, we needed to use GetFinalPathNameByHandle to properly resolve symlinks, which requires an actual HANDLE to the file. For the sharing permissions, we set FILE_SHARE_READ, // Just reading this file, allow others to do the same., thinking this correct because we only needed read permissions, and were otherwise willing to share the file.

      However, this is incorrect, as we need to share the file with other processes that may be writing or even trying to delete the file. So these sharing permissions should be FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE. Note that we still open the file only for reading with GENERIC_READ.

      This causes bugs when Mesos tries to get the realpath of files that may be "busy" elsewhere, such as log files or stderr/stdout files (which are open and being written to).

      Attachments

        Activity

          People

            johnkord John Kordich
            andschwa Andrew Schwartzmeyer
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: