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

Don't retry close() on EINTR.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.25.0
    • None
    • None
    • 1

    Description

      On Linux, retrying close on EINTR is dangerous because the fd is already released and we may accidentally close a newly opened fd (from another thread), see:

      http://ewontfix.com/4/
      http://lwn.net/Articles/576478/
      http://lwn.net/Articles/576591/

      It appears that other OSes, like HPUX, require a retry of close on EINTR. The Austin Group recently proposed changes to POSIX to require that the EINTR case need a retry, but EINPROGRESS be used for when a retry should not occur:

      http://austingroupbugs.net/view.php?id=529

      However, Linux does not follow this and so we need to remove our EINTR retries.

      Some more links for posterity:

      https://github.com/wahern/cqueues/issues/56#issuecomment-108656004
      https://code.google.com/p/chromium/issues/detail?id=269623
      https://codereview.chromium.org/23455051/

      Attachments

        Activity

          People

            bmahler Benjamin Mahler
            bmahler Benjamin Mahler
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: