-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
testing: fuzz reports spurious "process hung or terminated unexpectedly" errors #56238
Comments
I've seen this a lot too, exact same status and the failed test passing on rerun. I see two place this occurs in source, one marked with a to-do. Other discussions mention this could be a bug as well. |
TODO in source links to #48127 cmd/go: -keepfuzzing needs renaming, does not exist |
I have a repro for this issue, as described by @rsc. In my specific case usually fails within seconds during the In my case it looks like a race condition on coordinator/worker pipe:
@katiehockman @rolandshoemaker @jayconrod @bcmills : I see you authored most of the fuzzing code. Any chance you want to take a look? I don't want to share my repro here, but I'm happy to share privately. |
@mprimi, note that of all the folks you've tagged only @rolandshoemaker and I are still on the Go team. 😅 (@golang/fuzzing is the right entity to tag for this sort of issue.) |
@mprimi, I'm not sure I quite follow. What triggers the suspected race condition? (Is it caused by a worker that finds a crashing input, and finishes crashing before the coordinator has read that input?) |
@bcmills This is NOT a case of:
The issue described seems like a bug in the fuzzer itself where something goes wrong at the worker level, but it's not clear what. I posted a response here because:
If anyone from @golang/fuzzing is willing to take a look, I can share a (GitHub) link to a test that reproduces the issue reliably. (even if it's public code, I'll share that link privately, I don't want to link to my repro from this issue). |
Any resolution or update on this? It's blocking my usage of go fuzzing EDIT I ran the test case through delve and set a breakpoint where the crash seems to originate.
EDIT: OS info: |
I wonder if that issue is somehow architecture-specific? I hit it almost every minute on Mac mini with an Intel process, but can't replicate it with the same code on Apple silicon. EDIT: never mind, it fails in the same way on Apple silicon, it just takes hours, not minutes |
I think there are two related issues that get mixed up. The cause for the fuzzer crashing can either be:
I was able to extract the following stack trace for case 2 by using strace:
After this crash the worker process exits with exit code 2 according to strace. This is the commit that introduced the behavior of crashing if a test case takes longer than 10s to execute. We still need a real fix though to avoid the whole fuzzer to stop when this panic is thrown. There seems to be another bug somewhere. Potentially it has to do with the fact that the panic is thrown in a timer. |
If you want to help test this workaround:
|
To summarize: This is not a bug but expected behavior until #48157 is fixed. I would recommend closing this issue and continuing working on a PR for that. Maybe we should improve the error message. We can add a field to the serialized data sent between the worker and the coordinator that indicates a hang. Mabye difficult though because we would need to interrupt the current worker and then return an error. |
go test -v -fuzz=Decode image/gif
consistently produces output like:
Of course the test case changes each time, but when I rerun it using 'go test' the test case passes fine. This happens in the current Go dev branch too. I tried Go 1.19 to make sure it wasn't related to changes I have made to package testing.
The text was updated successfully, but these errors were encountered: