You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Andrew Schwartzmeyer (JIRA)" <ji...@apache.org> on 2018/07/19 18:21:00 UTC

[jira] [Created] (MESOS-9097) `libwinio_loop` must be initialized before `Socket` constructor is called

Andrew Schwartzmeyer created MESOS-9097:
-------------------------------------------

             Summary: `libwinio_loop` must be initialized before `Socket` constructor is called
                 Key: MESOS-9097
                 URL: https://issues.apache.org/jira/browse/MESOS-9097
             Project: Mesos
          Issue Type: Bug
    Affects Versions: 1.7.0
         Environment: Windows with \{{-DENABLE_LIBWINIO=ON}}
            Reporter: Andrew Schwartzmeyer


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.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)