A task process may be killed by a SIGTERM or SIGKILL. The only possibility to check how the task process has exited is to examine the message: status.message().find("Terminated"). However, a task may not run in its own process, hence the executor may not be able to provide an exit status. What we actually want is an artificial task exit status that is rendered by the executor.
This may be resolved by adding second tier states or state explanations. Here is a link to a discussion: https://reviews.apache.org/r/26382/