In general Shadow will return a non-zero error code if any of the plugins failed. But since Shadow doesn't have a proper shutdown sequence, Shadow sends a SIGKILL to all plugin processes at the end of the simulation and does not consider those killed processes to be an error.
|
// if there was no error or was intentionally killed |
|
// TODO: once we've implemented clean shutdown via SIGTERM, |
|
// treat death by SIGKILL as a plugin error |
|
if (proc->returnCode == 0 || proc->returnCode == return_code_for_signal(SIGKILL)) { |
|
info("%s", mainResultString->str); |
|
} else { |
|
warning("%s", mainResultString->str); |
|
worker_incrementPluginError(); |
|
} |
This means that plugins killed by a SIGKILL for any reason will not be considered as an error. If Linux decides to kill plugin processes due to memory exhaustion (or any other reason), Shadow will not report that as an error and the simulation will have invalid results while reporting that the simulation was successful.
I have not actually tested this since I don't want to invoke the oom killer on my machine, but I'm pretty confident that it will break in this case.
Possibly related to #2134.
In general Shadow will return a non-zero error code if any of the plugins failed. But since Shadow doesn't have a proper shutdown sequence, Shadow sends a SIGKILL to all plugin processes at the end of the simulation and does not consider those killed processes to be an error.
shadow/src/main/host/process.c
Lines 392 to 400 in cc0ec72
This means that plugins killed by a SIGKILL for any reason will not be considered as an error. If Linux decides to kill plugin processes due to memory exhaustion (or any other reason), Shadow will not report that as an error and the simulation will have invalid results while reporting that the simulation was successful.
I have not actually tested this since I don't want to invoke the oom killer on my machine, but I'm pretty confident that it will break in this case.
Possibly related to #2134.