WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
314593
MediaUsageManagerCocoa::removeMediaSession doesn't clear UsageTrackingAgent state when being released
https://bugs.webkit.org/show_bug.cgi?id=314593
Summary
MediaUsageManagerCocoa::removeMediaSession doesn't clear UsageTrackingAgent s...
Brent Fulgham
Reported
2026-05-11 16:30:45 PDT
WebKitTestRunner streams incoming test cases and rarely shuts down or cleans up like a user might when closing a tab. The logic in the various WebKitTestRunner test reset methods is meant to handle this, but we seem to have overlooked UsageTracking, which can lead to the system shutting the test runner down for holding too many active XPC connections to that process. We need to clean up when switching tests on some cadence so that we don't exceed the process limit and cause a spurious WKTR crash.
Attachments
Add attachment
proposed patch, testcase, etc.
Brent Fulgham
Comment 1
2026-05-11 16:32:04 PDT
Example: In a recent test I ran trying to stress a single test (by iterating 500 times), WKTR was killed for exceeding 2048 kqworkloops (hit 2049). Of those ~2049 workloops, 1994 (97%) were leaked `com.apple.NSXPCConnection.m-user.com.apple.UsageTrackingAgent` connections. It seems like each test iteration likely triggers a new XPC connection to that service that never gets torn down within the long-lived WebKitTestRunner process.
Radar WebKit Bug Importer
Comment 2
2026-05-11 16:32:18 PDT
<
rdar://problem/176832251
>
Brent Fulgham
Comment 3
2026-05-11 16:55:00 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/64713
EWS
Comment 4
2026-05-12 20:42:43 PDT
Committed
313125@main
(749fddf048e0): <
https://commits.webkit.org/313125@main
> Reviewed commits have been landed. Closing PR #64713 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug