-
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-fuzzer: Wait for executors and print exit codes in logs #3248
Conversation
Codecov Report
|
4d0283a
to
6f8d903
Compare
c.exited <- err | ||
close(c.exited) | ||
rp.SetDeadline(time.Now()) | ||
}(c) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Humm... File.Fd docs say:
On Unix systems this will cause the SetDeadline methods to stop working.
and I see that os.startProcess calls Fd()
so does this work?
This code is super complex, I wonder if it's possible to unit test these scenarios. We could start executor with some special flags that will make it produce all kinds on bad things (fail handshake, leak descriptors, etc).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
os.startProcess calls Fd() on wp, but we are working with rp. I have added a test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right! OK, let's see how it works. Thanks for the test.
14c02d9
to
2b8537d
Compare
An executor can leak its file descriptor and we can block on reading from it forever. Signed-off-by: Andrei Vagin <avagin@google.com>
It has to be good to have such information in logs.
In addition, let's print all executors logs in the fuzzer log as soon as
it read them.