syzkaller icon indicating copy to clipboard operation
syzkaller copied to clipboard

pkg/fuzzer: pregenerate gen/fuzz requests

Open dvyukov opened this issue 1 year ago • 4 comments

Mutation can be quite slow and it's on the critical ExchangeInfo path. Pregenerate gen/fuzz requests in a separate goroutine, so that they are readily available for consumption most of the time.

dvyukov avatar Mar 28 '24 18:03 dvyukov

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 62.0%. Comparing base (eaa9ee9) to head (359d28c). Report is 1 commits behind head on master.

Additional details and impacted files
Files Coverage Δ
pkg/fuzzer/fuzzer.go 82.2% <100.0%> (+1.3%) :arrow_up:

... and 1 file with indirect coverage changes

codecov[bot] avatar Mar 28 '24 18:03 codecov[bot]

It looks like a single goroutine can't keep up pregenerating inputs: image

I think we need to start NumCPU goroutines + pre-serialize programs in Requests, so that Exchange can just take the byte slice and send.

dvyukov avatar Mar 28 '24 18:03 dvyukov

Did you observe any performance improvements?

a-nogikh avatar Mar 28 '24 19:03 a-nogikh

And you tested it with the non-instrumented kernel on VMs, right? I think when a kernel is instrumented, and especially when we're on Cloud and have extra network-related delays, the CPU time spent on gen/fuzz operations won't be that much of a bottleneck.

a-nogikh avatar Apr 02 '24 07:04 a-nogikh