Skip to content
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

Merged
merged 1 commit into from
Jul 21, 2022

Conversation

avagin
Copy link
Collaborator

@avagin avagin commented Jul 18, 2022

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.

@codecov
Copy link

codecov bot commented Jul 18, 2022

Codecov Report

Merging #3248 (2b8537d) into master (88cb138) will increase coverage by 0.0%.
The diff coverage is 75.0%.

❗ Current head 2b8537d differs from pull request most recent head 7ded609. Consider uploading reports for the commit 7ded609 to get more accurate results

Impacted Files Coverage Δ
pkg/ipc/ipc.go 48.4% <75.0%> (+0.6%) ⬆️

@avagin avagin force-pushed the fuzzer-wait branch 4 times, most recently from 4d0283a to 6f8d903 Compare July 18, 2022 23:22
pkg/ipc/ipc.go Outdated Show resolved Hide resolved
pkg/ipc/ipc.go Outdated Show resolved Hide resolved
pkg/ipc/ipc.go Outdated Show resolved Hide resolved
c.exited <- err
close(c.exited)
rp.SetDeadline(time.Now())
}(c)
Copy link
Collaborator

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.

https://pkg.go.dev/os#File.Fd

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).

Copy link
Collaborator Author

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.

Copy link
Collaborator

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.

@avagin avagin force-pushed the fuzzer-wait branch 3 times, most recently from 14c02d9 to 2b8537d Compare July 21, 2022 05:36
An executor can leak its file descriptor and we can block on reading
from it forever.

Signed-off-by: Andrei Vagin <avagin@google.com>
@dvyukov dvyukov merged commit 6e67af9 into google:master Jul 21, 2022
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.

None yet

2 participants