Joseph Wu created MESOS-3882:
--------------------------------

             Summary: Libprocess: Implement process::Clock::finalize
                 Key: MESOS-3882
                 URL: https://issues.apache.org/jira/browse/MESOS-3882
             Project: Mesos
          Issue Type: Task
          Components: libprocess, test
            Reporter: Joseph Wu
            Assignee: Joseph Wu


Tracks this 
[TODO|https://github.com/apache/mesos/blob/aa0cd7ed4edf1184cbc592b5caa2429a8373e813/3rdparty/libprocess/src/process.cpp#L974-L975].

The {{Clock}} is initialized with a callback that, among other things, will 
dereference the global {{process_manager}} object.

When libprocess is shutting down, the {{process_manager}} is cleaned up.  
Between cleanup and termination of libprocess, there is some chance that a 
{{Timer}} will time out and result in dereferencing {{process_manager}}.

*Proposal* 
* Implement {{Clock::finalize}}.  This would clear:
** existing timers
** process-specific clocks
** ticks
* Change {{process::finalize}}.
*# Resume the clock.  (The clock is only paused during some tests.)  When the 
clock is not paused, the callback does not dereference {{process_manager}}.
*# Clean up {{process_manager}}.  This terminates all the processes that would 
potentially interact with {{Clock}}.
*# Call {{Clock::finalize}}.



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

Reply via email to