-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
syz-manager, syz-fuzzer: switch communication to flatrpc #4818
Conversation
b1ba91d
to
5c6018e
Compare
21ec294
to
c3ee288
Compare
Note: this breaks syz-runtest. But since we don't use it, it looks pointless to fix. We better restore it as part of syz-manager. Now with dynamic request source, it should fit into syz-manager very nicely -- after checking we just switch to runtest source instead of fuzzer source. |
c3ee288
to
7943311
Compare
We'd also need to deal with the web UI, corpus file operations and multiple ways in which the vm loop is interleaved with the fuzzer :( That's all doable, but unfortunately it's not "just switch" if we want to do it cleanly. |
I wouldn't bother about web UI. What do we need to do for the VM loop? |
Decouple it from syz-hub and bug reproduction (which we don't need for runtest). |
Switch to flatrpc connection between manager and fuzzer. With flatrpc we have a goroutine per connection instead of async RPC, which makes things a bit simpler. Now don't reordered messages (in particular start executing and finish executing for programs), race on the program during printing is no longer possible since we finish handlign start executing request before we even receive finish executing. We also don't need to lookup Runner for every RPC since it's now local to the handling goroutine. We also don't need to protect requests map since only single goroutine accesses it. We also send new programs to the fuzzer as soon as we receive start executing message, which provides better buffering. We also don't batch new requests and finish executing requests in a single RPC, which makes things a bit simpler. In my local run this reduces syz-manager heap size from 1.3GB to 1.1GB. Update google#1541
7943311
to
d98a661
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files
|
syz-manager, syz-fuzzer: switch communication to flatrpc
Switch to flatrpc connection between manager and fuzzer.
With flatrpc we have a goroutine per connection instead of async RPC,
which makes things a bit simpler. Now don't reordered messages
(in particular start executing and finish executing for programs),
race on the program during printing is no longer possible
since we finish handlign start executing request before we even
receive finish executing.
We also don't need to lookup Runner for every RPC since it's
now local to the handling goroutine.
We also don't need to protect requests map since only single
goroutine accesses it.
We also send new programs to the fuzzer as soon as we receive
start executing message, which provides better buffering.
We also don't batch new requests and finish executing requests
in a single RPC, which makes things a bit simpler.
Update #1541