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

Some library functions ignore failures from ::close which should probably be handled.

Agile BoardAttach filesAttach ScreenshotVotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.8.0
    • stout
    • None
    • Mesosphere RI-6 Sprint 2018-31, Storage R7 Sprint 33, Storage R8 Sprint 34, Storage R8 Sprint 35, Storage R9 Sprint 36, Storage R9 Sprint 37, Storage R10 Sprint 38
    • 1

    Description

      Multiple functions e.g., in stout ignore the return value of ::close with the following rationale,

      // We ignore the return value of close(). This is because users
      // calling this function are interested in the return value of
      // write(). Also an unsuccessful close() doesn't affect the write.

      I believe this is incorrect in general. Especially when not calling ::fsync after a write operation, the kernel might buffer writes and only trigger write-related failures when the file descriptor is closed, see e.g., the note on error handling here.

      We should audit our code to make sure that failures to ::close file descriptors are properly propagated when needed.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            bbannier Benjamin Bannier
            bbannier Benjamin Bannier
            Chun-Hung Hsiao Chun-Hung Hsiao
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Agile

                Completed Sprints:
                Mesosphere RI-6 Sprint 2018-31 ended 25/Oct/18
                Storage R7 Sprint 33 ended 21/Nov/18
                Storage R8 Sprint 34 ended 06/Dec/18
                Storage R8 Sprint 35 ended 19/Dec/18
                Storage R9 Sprint 36 ended 08/Jan/19
                Storage R9 Sprint 37 ended 16/Jan/19
                Storage R10 Sprint 38 ended 30/Jan/19
                View on Board

                Slack

                  Issue deployment