fuzzilli icon indicating copy to clipboard operation
fuzzilli copied to clipboard

Broken Pipe errors on JerryScript

Open bzyo opened this issue 4 years ago • 5 comments

On JerryScript, the following error occurs somewhat frequently:

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

bzyo avatar Aug 23 '20 15:08 bzyo

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.

WilliamParks avatar Aug 23 '20 16:08 WilliamParks

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 avatar Aug 24 '20 11:08 saelo

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)

saelo avatar Sep 07 '20 14:09 saelo

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.

bzyo avatar Sep 14 '20 00:09 bzyo

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

Limesss avatar Oct 13 '21 09:10 Limesss