Skip to content

Add FuzzTargetsCount index and error log for bad targets - #5397

Merged
dylanjew merged 1 commit into
masterfrom
dylanj/bad-weights
Jul 31, 2026
Merged

Add FuzzTargetsCount index and error log for bad targets#5397
dylanjew merged 1 commit into
masterfrom
dylanj/bad-weights

Conversation

@dylanjew

@dylanjew dylanjew commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

When the fuzz_task_output has an invalid fuzz target, FuzzTargetCount.count = 0. This can happen when there are no fuzz target binaries found, or the build is entirely broken.

When this happens, no more fuzz tasks would be scheduled. We recover from this scenario by falling back to the default modifier when the FuzzerJob.multiplier would be 0:

# If the count is 0, it may be due to a bad build or some other issue. Use
# the default weight in that case to allow for recovery.
if targets_count and targets_count.count:
multiplier = targets_count.count

This is a health signal, and we should monitor it properly. This PR adds an index so we can look these up, and a specific error we can track this with.

@aakallam, I'm not sure whether we want to set up a metric for an alert on this, because we're going to have very large dimensionality here and we can just scan the logs/Datastore for bad fuzz targets. But I'm open to just throwing a Monarch metric here if that's the easiest way to alert us that something is broken.

Related to b/537750310

Testing

I pushed this change onto dev

@dylanjew
dylanjew requested a review from a team as a code owner July 28, 2026 21:58
@dylanjew
dylanjew requested a review from aakallam July 28, 2026 21:58

@aakallam aakallam left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Starting with an alert and then removing it if it is too noisy sounds good to me

@dylanjew
dylanjew force-pushed the dylanj/bad-weights branch from 34d4936 to 961ab55 Compare July 29, 2026 14:36
@dylanjew

Copy link
Copy Markdown
Collaborator Author

Starting with an alert and then removing it if it is too noisy sounds good to me

I'll see if we can set up alerting based on the log, otherwise I'll just send another PR to add a Monarch metric if that turns out to be difficult.

@dylanjew
dylanjew requested a review from hunsche July 29, 2026 14:37
@dylanjew
dylanjew force-pushed the dylanj/bad-weights branch from 961ab55 to 694537a Compare July 30, 2026 14:40
Comment thread src/clusterfuzz/_internal/bot/tasks/utasks/fuzz_task.py Outdated
Comment thread src/clusterfuzz/_internal/datastore/data_types.py
@dylanjew
dylanjew force-pushed the dylanj/bad-weights branch from 694537a to 21bcd63 Compare July 31, 2026 17:42
@dylanjew
dylanjew merged commit b264206 into master Jul 31, 2026
15 checks passed
@dylanjew
dylanjew deleted the dylanj/bad-weights branch July 31, 2026 19:42
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.

3 participants