Skip to content

Capture user defined errors separately from UNHANDLED_EXCEPTION - #5402

Open
dylanjew wants to merge 1 commit into
masterfrom
dylanj/task-errors-1
Open

Capture user defined errors separately from UNHANDLED_EXCEPTION#5402
dylanjew wants to merge 1 commit into
masterfrom
dylanj/task-errors-1

Conversation

@dylanjew

@dylanjew dylanjew commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

In _MetricRecorder.__exit__, check whether the exception inherits from errors.Error or testcase_manager.TestcaseManagerError and record the coresponding error_condition instead of 'UNHANDLED_EXCEPTION'.

We want to alert based on UNHANDLED_EXCEPTION, and these user defined Errors represent exceptional but expected scenariors in Clusterfuzz where the task is not meant to succeed. For example, there is no build for a variant task that we triggered, or the fuzzer is no longer valid. In these cases, we typically want to ACK the task and skip it, but these expected errors make it hard to set up alerts on real issues.

Here's an example of logs of 2 deleted Testcases going through the Variant task, failing, and getting retried multiple times and triggering an alert due to the postprocess error rate spikes above 20%

Testing

deployed to dev. haven't seen any of these new metrics yet but no errors either.

Related PRs

  1. This PR: Capture user defined errors separately from UNHANDLED_EXCEPTION #5402
  2. Skip incompatible jobs in variant_task.utask_preprocess #5403
  3. Short-circuit duplicate/deleted testcases when processing/scheduling tasks #5405
  4. Gracefully handle InvalidTestcaseError in variant and minimize tasks #5406

@dylanjew
dylanjew requested a review from a team as a code owner July 30, 2026 15:29
@dylanjew
dylanjew requested a review from aakallam July 30, 2026 15:30
@dylanjew dylanjew changed the title Capture user-defined domain errors separately from UNHANDLED_EXCEPTIO… Capture user defined errors separately from UNHANDLED_EXCEPTION Jul 30, 2026
@dylanjew
dylanjew requested a review from hunsche July 30, 2026 15:39
…N in metrics

In _MetricRecorder.__exit__, check whether _exc_type inherits from errors.Error or testcase_manager.TestcaseManagerError and record error_condition as _exc_type.__name__ instead of 'UNHANDLED_EXCEPTION'.

We alert based on UNHANDLED_EXCEPTION, and these user defined Errors
represent exceptional but expected scenariors in Clusterfuzz where the
task is not meant to succeed. For example, there is no build for a
variant task that we triggered, or the fuzzer is no longer valid. In
these cases, we typically want to ACK the task and skip it, but these
expected errors make it hard to set up alerts on real issues.
@dylanjew
dylanjew force-pushed the dylanj/task-errors-1 branch from 796e707 to a805288 Compare July 31, 2026 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants