Uploaded image for project: 'Red Hat OpenStack Services on OpenShift'
  1. Red Hat OpenStack Services on OpenShift
  2. OSPRH-17937

[fork vs multiprocessing] 1 - Introduce oslo_service._multiprocessing spawn-safe helpers

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Done
    • Icon: Critical Critical
    • None
    • None
    • python-oslo-service
    • None
    • Sprint 7, Sprint 8, Sprint 9, Sprint 10
    • 4
    • Important

      Goal: Provide a single utility module exposing get_spawn_context() and get_spawn_pool() so every future multiprocessing call inside oslo.service defaults to the spawn start method, eliminating fork-inherited lock deadlocks highlighted in the PythonSpeed article.

      Acceptance Criteria:

      • Verify new module oslo_service/_multiprocessing.py exists and is imported nowhere at import-time (no side-effects).
      • Verify get_spawn_context().get_start_method() returns "spawn".
      • Verify get_spawn_pool() returns a multiprocessing.pool.Pool created with spawn context.
      • Verify Sphinx docstring explains the deadlock scenario and rationale.
      • All existing unit tests still pass.

      Additional Details:
      See https://pythonspeed.com/articles/python-multiprocessing/ and video explanation at https://youtu.be/RIc-Tut95YM?t=185.

              mbollo@redhat.com Daniel Mats Niklas Bengtsson
              hberaud Hervé Beraud
              rhos-dfg-pidone
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: