Roadmapping: Graceful shutdown of managed processes #2034
Replies: 4 comments 2 replies
-
|
Documented PID numbering, and closed #1491 since that enables graceful shutdown. Supporting killall workflow tracked in #1986 Supporting fork+exec tracked in #1987 |
Beta Was this translation helpful? Give feedback.
-
|
I think Shadow's current behaviour is confusing, and we've discussed how we might want this to work in the future. Generally when a managed process exits, Shadow will check its exit code and if the exit code is non-zero, the simulation will eventually be marked as "failed". Currently when the simulation ends, Shadow will send a SIGKILL to all processes that are still running. These processes that are killed at the end of the simulation will not affect the successful/failed status of the simulation. This is sometimes what the user wants, for example long-running processes like tor or web servers will typically run until the simulation ends. But sometimes this is not what the user wants, for example if a process like curl is unable to connect to the server, continues trying until the end of the simulation, and is never successful. Once we have better support for shutting down managed processes, we can make it so that processes killed at the end of the simulation do affect the successful/failed status of the simulation. This would be a breaking change, so we'd have to do this in a major version bump. For applications like tor or web servers, the user would need to kill them explicitly with for example |
Beta Was this translation helpful? Give feedback.
-
|
We discussed this some more and haven't yet decided on a path forward. There are a few independent questions:
From discussion:
|
Beta Was this translation helpful? Give feedback.
-
|
We discussed this again at another roadmapping session and came with the following plan.
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Plan:
Reasoning:
Beta Was this translation helpful? Give feedback.
All reactions