Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug-1916751: don't throttle background process crashes #1069

Merged
merged 2 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions antenna/throttler.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,10 +457,14 @@ def match_unsupported_windows(throttler, data):
Rule(rule_name="has_phc", key="PHCKind", condition=always_match, result=ACCEPT),
# Bug #1547804: Accept crash reports from gpu crashes; we don't get many
# and our sampling reduces that to a handful that's hard to do things with
# Bug 1916751: Accept crash reports from rdd, plugin, utility and socket processes
# for the same reasons as for Bug 1547804 above.
Rule(
rule_name="is_gpu",
rule_name="is_background",
key="ProcessType",
condition=lambda throttler, x: x == "gpu",
condition=lambda throttler, x: (
x in {"gpu", "plugin", "rdd", "socket", "utility"}
),
result=ACCEPT,
),
# Bug #1624949: Throttle ipc_channel_error=ShutDownKill crash reports at
Expand Down
8 changes: 6 additions & 2 deletions tests/test_throttler.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,10 +502,14 @@ def test_phc(self, throttler):
(None, (ACCEPT, "accept_everything", 100)),
("", (ACCEPT, "accept_everything", 100)),
("content", (ACCEPT, "accept_everything", 100)),
("gpu", (ACCEPT, "is_gpu", 100)),
("gpu", (ACCEPT, "is_background", 100)),
("rdd", (ACCEPT, "is_background", 100)),
("plugin", (ACCEPT, "is_background", 100)),
("utility", (ACCEPT, "is_background", 100)),
("socket", (ACCEPT, "is_background", 100)),
],
)
def test_gpu(self, throttler, processtype, expected):
def test_background(self, throttler, processtype, expected):
raw_crash = {"ProductName": "BarTest"}
if processtype:
raw_crash["ProcessType"] = processtype
Expand Down