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

Investigate the requirements of programmatically re-initializing libprocess

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Major
    • Resolution: Done
    • None
    • None
    • libprocess, test

    Description

      This issue is for investigating what needs to be added/changed in process::finalize such that process::initialize will start on a clean slate. Additional issues will be created once done. Also see the parent issue.

      process::finalize should cover the following components:

      • _s_ (the server socket)
        • delete should be sufficient. This closes the socket and thereby prevents any further interaction from it.
      • process_manager
        • Related prior work: MESOS-3158
        • Cleans up the garbage collector, help, logging, profiler, statistics, route processes (including this one, which currently leaks a pointer).
        • Cleans up any other spawn 'd process.
        • Manages the EventLoop.
      • Clock
        • The goal here is to clear any timers so that nothing can deference process_manager while we're finalizing/finalized. It's probably not important to execute any remaining timers, since we're "shutting down" libprocess. This means:
          • The clock should be paused and settled before the clean up of process_manager.
          • Processes, which might interact with the Clock, should be cleaned up next.
          • A new Clock::finalize method would then clear timers, process-specific clocks, and tick s; and then resume the clock.
      • _address_ (the advertised IP and port)
        • Needs to be cleared after process_manager has been cleaned up. Processes use this to communicate events. If cleared prematurely, TerminateEvents will not be sent correctly, leading to infinite waits.
      • socket_manager
        • The idea here is to close all sockets and deallocate any existing HttpProxy or Encoder objects.
        • All sockets are created via _s_, so cleaning up the server socket prior will prevent any new activity.
      • mime
        • This is effectively a static map.
        • It should be possible to statically initialize it.
      • Synchronization atomics initialized & initializing.
        • Once cleanup is done, these should be reset.

      Summary:

      • Implement Clock::finalize. MESOS-3882
      • Implement ~SocketManager. MESOS-3910
      • Make sure the MetricsProcess and ReaperProcess are reinitialized. MESOS-3934
      • (Optional) Clean up mime.
      • Wrap everything up in process::finalize.

      Attachments

        Activity

          People

            kaysoky Joseph Wu
            kaysoky Joseph Wu
            Joris Van Remoortere Joris Van Remoortere
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: