google / clusterfuzz

Scalable fuzzing infrastructure.
https://google.github.io/clusterfuzz
Apache License 2.0
5.26k stars 550 forks source link

Allow job weights to be set manually #3937

Open jonathanmetzman opened 4 months ago

jonathanmetzman commented 4 months ago

Android and Chrome have both expressed interest in getting more cycles for their engine fuzzers. But it appears impossible to change this manually because our cron job resets weights. Let's figure out a nice way to make the cron job respect the user's wish

jonathanmetzman commented 4 months ago

CC @marktefftech @letitz

letitz commented 4 months ago

If I read the code correctly, the cron job only mutates FuzzerJob.multiplier values, not FuzzerJob.weight values. Can we simply manually set FuzzerJob.weight instead?

letitz commented 3 months ago

Ah, I misread the issue. This is about engine fuzzers. There is indeed no way to manually set weights for libfuzzer and afl fuzz targets, since the weights are clobbered by a cron job. It currently works for centipede targets because there is no support in the cron job for other fuzzing engines.

letitz commented 3 months ago

It seems to me the most straightforward solution here would be to introduce the weight/multiplier distinction for fuzz targets as is done for fuzzers, and have the cron job adjusts multipliers instead of weights. It's pretty simple, and that way it would work just like fuzzer weights for consistency.

marktefftech commented 3 months ago

I don't have any input on the existing logic for assigning weights and multipliers. Generally speaking I have found it confusing in the past.

The core issue here (at least, for Android) are our host jobs are not running basically at all.

In a design discussion yesterday, it was decided to create a new pool of hosts dedicated specifically for running our jobs.

I just wanted to leave this note in case this decision affects the work items in this ticket.