Joseph Wu created MESOS-6832:
--------------------------------

             Summary: Review how Mesos handles loading and unloading of dynamic 
libraries
                 Key: MESOS-6832
                 URL: https://issues.apache.org/jira/browse/MESOS-6832
             Project: Mesos
          Issue Type: Improvement
          Components: gpu, cmake, java api, modules
    Affects Versions: 1.2.0
            Reporter: Joseph Wu


There are three instances in the codebase where we load a dynamic library into 
a static variable and leak said variable on purpose:

* https://github.com/apache/mesos/blob/1.1.x/src/jvm/jvm.cpp#L83
* 
https://github.com/apache/mesos/blob/1.1.x/src/slave/containerizer/mesos/isolators/gpu/nvml.cpp#L78
* https://github.com/apache/mesos/blob/1.1.x/src/module/manager.hpp#L181
^ This last one will be changed to leak as part of MESOS-6658

Since the dynamic libraries are loaded into static variables, they will only be 
destructed when the library (i.e. libmesos) gets unloaded. This might lead to 
inconsistencies when libmesos's own destruction unloads e.g., a dynamic 
libprocess, which might be opened by a {{dlopen}} of a module.  The module's 
cleanup would not find libprocess anymore and potentially crash during 
unloading.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to