googleprojectzero / fuzzilli

A JavaScript Engine Fuzzer
Apache License 2.0
1.85k stars 300 forks source link

Broken Pipe errors on JerryScript #120

Open bzyo opened 4 years ago

bzyo commented 4 years ago

On JerryScript, the following error occurs somewhat frequently:

Script execution failed: Failed to send command to child process: Broken pipe. Retrying in 1 second...

WilliamParks commented 4 years ago

I have encountered the same issue intermittently with Spidermonkey as well. My initial guess is that it's due to short reads, but I haven't investigated further.

saelo commented 4 years ago

Thanks for the report. That would mean it fails here: https://github.com/googleprojectzero/fuzzilli/blob/8a7f4f36476e9ccd8f32589d203756c863acb0a5/Sources/libreprl/libreprl.c#L345 My guess is that this is the result of the child process dying (e.g. due to the OOM killer or if a background thread of the js shell crashes) while waiting for the next REPRL command. Then this would be the first place where the parent notices, since the pipe has now (unexpectedly) closed. Maybe we can add some code before this line to check if the child is still alive (e.g. through waitpid) and if it died, print some more information (e.g. stderr). But probably there isn't much more we can do, and Fuzzilli will also just retry the execution, so it shouldn't be much of an issue in any case

saelo commented 4 years ago

I added better logging to libreprl: https://github.com/googleprojectzero/fuzzilli/commit/bd2135d8fa1444b4237061882075d5fd636ea235 Let me know if the you still encounter the "Script execution failed" messages or if they have now become "Child unexpectedly exited/terminated" messages now (and in that case, please also include the exit code/signal number)

bzyo commented 4 years ago

I've seen just the new error of "Child unexpectedly terminated with signal 11 between executions" by itself and then also followed by the original error posted here.

Limesss commented 2 years ago

I've seen just the new error of "Child unexpectedly terminated with signal 11 between executions" by itself and then also followed by the original error posted here.

hi,did u solved it ? i hava the same question in the lastest jerry version