Skip to content

libgstd: fix race conditions in pipeline list and session property access#342

Open
rwang-mtdata wants to merge 5 commits into
RidgeRun:developfrom
rwang-mtdata:pr/race-cond-fixes
Open

libgstd: fix race conditions in pipeline list and session property access#342
rwang-mtdata wants to merge 5 commits into
RidgeRun:developfrom
rwang-mtdata:pr/race-cond-fixes

Conversation

@rwang-mtdata
Copy link
Copy Markdown

Summary

Thread-safety fixes for concurrent gstd clients accessing pipelines and session
properties. Addresses several races and a use-after-free observed under load.

Changes

  • gstd_list: count pipelines under lock at point-of-use; lock shared linked access.
  • gstd_list_reader / gstd_parser / gstd_pipeline: find_child now returns an
    owned reference, fixing a use-after-free when the child is removed concurrently.
  • gstd_session: lock PROP_PIPELINES / PROP_DEBUG accessors; unref the old
    value when swapping.

Files changed

libgstd/gstd_list.c, gstd_list.h, gstd_list_reader.c, gstd_parser.c,
gstd_pipeline.c, gstd_session.c (+116 / -55)

Testing

  • Built against current upstream/develop (rebased onto e95cd75).
  • Internal CI (mtdata) build: passing.
  • Running our system over 24 hours continously, then multiple restarts.

Risk

  • N/a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant