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

`libwinio_loop` must be initialized before `Socket` constructor is called

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.7.0
    • Fix Version/s: None
    • Component/s: libprocess
    • Labels:
    • Environment:

      Windows with -DENABLE_LIBWINIO=ON

      Description

      When building with -DENABLE_LIBWINIO, initializing the Windows event loop (specifically the pointer process::libwinio_loop) becomes a prerequisite to creating a Socket. If it has not been initialized, then when the Socket constructor calls prepare_async(), a null pointer is dereferenced, leading to a hang on Windows.

      This was discovered in the simple program test-linkee where a Socket is created and used, but the entire libprocess event loop is unused. This is temporarily fixed by calling process::initialize() early in test-linkee, but this should probably not be required. Instead, prepare_async() (or any use of libwinio_loop should probably auto-initialize the event loop if required.

      For now, I am adding fatal checks before a null pointer dereference.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              andschwa Andrew Schwartzmeyer
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: