Skip to content

Shadow will return success even when plugins are killed by Linux OOM killer #2151

@stevenengler

Description

@stevenengler

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.

Metadata

Metadata

Assignees

Labels

Type: BugError or flaw producing unexpected results

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions