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

Logrotate ContainerLogger may not handle FD ownership correctly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • None
    • 0.27.0
    • modules

    Description

      One of the patches for MESOS-4136 introduced the FDType::OWNED enum for Subprocess::IO::FD.

      The way the logrotate module uses this is slightly incorrect:

      1. The module starts a subprocess with an output Subprocess::PIPE().
      2. That pipe's FD is passed into another subprocess via Subprocess::IO::FD(pipe, IO::OWNED).
      3. When the second subprocess starts, the pipe's FD is closed in the parent.
      4. When the first subprocess terminates, the existing code will try to close the pipe again. This effectively closes a random FD.

      Attachments

        Activity

          People

            kaysoky Joseph Wu
            kaysoky Joseph Wu
            Benjamin Hindman Benjamin Hindman
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: