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

Libprocess reinit code leaks SSL server socket FD

    XMLWordPrintableJSON

Details

    • Mesosphere Sprint 52, Mesosphere Sprint 53, Mesosphere Sprint 54, Mesosphere Sprint 55
    • 2

    Description

      After this commit, it was discovered that tests which use process::reinitialize to switch between SSL and non-SSL modes will leak the file descriptor associated with the server socket __s__. This can be reproduced by running the following trivial test in repetition:

      diff --git a/src/tests/scheduler_tests.cpp b/src/tests/scheduler_tests.cpp
      index 1ff423f..d5fd575 100644
      --- a/src/tests/scheduler_tests.cpp
      +++ b/src/tests/scheduler_tests.cpp
      @@ -1821,6 +1821,12 @@ INSTANTIATE_TEST_CASE_P(
       #endif // USE_SSL_SOCKET
      
      
      +TEST_P(SchedulerSSLTest, LeakTest)
      +{
      +  ::sleep(1);
      +}
      +
      +
       // Tests that a scheduler can subscribe, run a task, and then tear itself down.
       TEST_P(SchedulerSSLTest, RunTaskAndTeardown)
       {
      

      Attachments

        Issue Links

          Activity

            People

              kaysoky Joseph Wu
              greggomann Greg Mann
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: