Skip to content

Coordinate inspector and transport shutdown - #58996

Closed
Abbondanzo wants to merge 2 commits into
react:mainfrom
Abbondanzo:export-D124675718
Closed

Abbondanzo wants to merge 2 commits into
react:mainfrom
Abbondanzo:export-D124675718

Conversation

@Abbondanzo

Copy link
Copy Markdown
Contributor

Summary:
Retain the inspector until serialized target and socket cleanup has completed, reject late work during shutdown, and join the dispatcher from its external owner. Keep transport close requests callable from IO callbacks without self-joining or holding the socket lock across a join. Serialize writes and pings on the IO executor, discard expired implementation references, and make external-owner destruction finish cleanup when a closed callback throws.

Add focused inspector lifetime and real loopback transport regressions, including active-IO destruction, nested close, late connection completions, and invalid descriptors. Destruction of a socket wrapper on its own IO thread remains unsupported.

Changelog:
[General][Fixed] - Fix native inspector ownership and transport shutdown races

Differential Revision: D124675718

Summary:

Dispatch tasks through uniquely owned callable payloads so queue bookkeeping never copies or destroys populated captures while holding its mutex. Cancel queued work outside the queue lock, distinguish worker-thread shutdown requests from external-owner joining, and wake timed waits when the queue head changes.

Add focused dispatcher admission, cancellation, callable-copy, reentrant destruction and joining regressions. Inspector ownership and tester readiness are separate dependent increments, not behavior introduced here.

Changelog:
[General][Fixed] - Fix native dispatcher callback ownership and shutdown synchronization

Differential Revision: D124671180
Summary:
Retain the inspector until serialized target and socket cleanup has completed, reject late work during shutdown, and join the dispatcher from its external owner. Keep transport close requests callable from IO callbacks without self-joining or holding the socket lock across a join. Serialize writes and pings on the IO executor, discard expired implementation references, and make external-owner destruction finish cleanup when a closed callback throws.

Add focused inspector lifetime and real loopback transport regressions, including active-IO destruction, nested close, late connection completions, and invalid descriptors. Destruction of a socket wrapper on its own IO thread remains unsupported.

Changelog:
[General][Fixed] - Fix native inspector ownership and transport shutdown races

Differential Revision: D124675718
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 12, 2026
@meta-codesync

meta-codesync Bot commented Oct 12, 2026

Copy link
Copy Markdown

@Abbondanzo has exported this pull request. If you are a Meta employee, you can view the originating Diff in D124675718.

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

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant