Skip to content

fix: make rtmp2 cancel_all_commands re-entrancy safe - #87

Open
mchelnokov wants to merge 1 commit into
masterfrom
fix-rtmp-cancel-reentrancy
Open

fix: make rtmp2 cancel_all_commands re-entrancy safe#87
mchelnokov wants to merge 1 commit into
masterfrom
fix-rtmp-cancel-reentrancy

Conversation

@mchelnokov

Copy link
Copy Markdown
Contributor

The rtmp2 patches close the connection from inside a command callback, which re-enters cancel_all_commands while it walks its lists: the callback runs twice and double-unrefs its GTask (SIGSEGV in g_object_unref on the rtmp2src task thread). Detach the lists before walking them.

The rtmp2 patches close the connection from inside a command callback,
which re-enters cancel_all_commands while it walks its lists: the
callback runs twice and double-unrefs its GTask (SIGSEGV in
g_object_unref on the rtmp2src task thread). Detach the lists before
walking them.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 4, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • coderabbit

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Essentials

Run ID: eaba89ca-0b50-400b-a340-4de5293f8a73

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@ArmorDarks
ArmorDarks requested a balanced review from Copilot September 4, 2026 12:44

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The detached-list approach directly prevents nested cancellation from processing commands twice.

Pull request overview

Updates the downstream GStreamer RTMP2 patch to prevent duplicate callbacks and task double-unrefs during connection closure.

Changes:

  • Detaches pending command lists before invoking callbacks.
  • Documents the re-entrancy fix in patch metadata.
File summaries
File Description
docker/build-gstreamer/patch/gstreamer/0004-rtmp2-rtmpclient-Close-the-connection-when-the-conne.patch Makes command cancellation re-entrancy safe.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants