Bug 314593
| Summary: | MediaUsageManagerCocoa::removeMediaSession doesn't clear UsageTrackingAgent state when being released | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Brent Fulgham <bfulgham> |
| Component: | New Bugs | Assignee: | Brent Fulgham <bfulgham> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Brent Fulgham
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
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
<rdar://problem/176832251>
Brent Fulgham
Pull request: https://github.com/WebKit/WebKit/pull/64713
EWS
Committed 313125@main (749fddf048e0): <https://commits.webkit.org/313125@main>
Reviewed commits have been landed. Closing PR #64713 and removing active labels.