Repository navigation
fix(service-maker): release GIL during pipeline stop - #115
Draft
chunlinl1980 wants to merge 1 commit into
Draft
chunlinl1980 wants to merge 1 commit into
chunlinl1980 wants to merge 1 commit into
Conversation
Release the Python GIL while stop sends EOS so streaming probes can finish. Preserve the binding return value and add subprocess regression coverage for shutdown with and without a Python probe. Fixes #99 Signed-off-by: chunlinl <chunlinl@nvidia.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #99.
Release the GIL around the Python binding of
Pipeline::stop()usingpy::call_guard<py::gil_scoped_release>(), preserving the existing return value. Document the shutdown behavior and add subprocess regression tests for shutdown with and without a Python streaming probe.Reason
stop()sends EOS and can wait for a streaming lock while retaining the GIL. A streaming thread holding that lock may need the GIL to finish its Python probe, deadlocking shutdown and other Python threads. Releasing the GIL allows the callback to complete.This addresses the GIL/streaming-lock deadlock during playback; it does not guarantee bounded shutdown for an otherwise stalled pipeline.
Validation
bash ./build/build.sh --package)Additional verification:
git diff --checkpasses.The full build/package and source4 test with newly built binaries remain outstanding. Jetson is untested. The installed SDK was not replaced. Keep this PR in draft pending acceptance validation.
Checklist
NVIDIA/DeepStream:develop.NVIDIA/DeepStream:develop.bash ./build/build.sh --packagecompleted successfully.deepstream-appon x86 or Jetson.git commit -s).