Skip to content

[core] Using simplified closing a socket on fork cleanup to prevent potential deadlocks#3330

Open
ethouris wants to merge 1 commit into
Haivision:masterfrom
ethouris:dev-fix-fork-deadlock
Open

[core] Using simplified closing a socket on fork cleanup to prevent potential deadlocks#3330
ethouris wants to merge 1 commit into
Haivision:masterfrom
ethouris:dev-fix-fork-deadlock

Conversation

@ethouris

@ethouris ethouris commented Jun 5, 2026

Copy link
Copy Markdown
Collaborator

Fixes #3326

Problem: The call to fork() may potentially catch the SRT library in the state with several active connections; in this case the forked-off version may be caught with some mutexes being locked forever. One of them is in use by the function that tries to close all sockets before deleting them. Therefore there's a special simplified version of closing that ignores the part that requires cleanup for any inter-connection data - stating that still every socket will be eventually closed and deleted anyway.

@ethouris ethouris added this to the v1.5.6 milestone Jun 5, 2026
@ethouris ethouris added Type: Bug Indicates an unexpected problem or unintended behavior [core] Area: Changes in SRT library core labels Jun 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[core] Area: Changes in SRT library core Type: Bug Indicates an unexpected problem or unintended behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] pthread_atfork child handler CUDT::cleanupAtFork deadlocks the child process

1 participant