Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Process.stop and Runtime.stop should clean up all SystemProcesses even if they were never started. #716

Open
tim-shea opened this issue Jun 16, 2023 · 0 comments
Labels
0-needs-review For all new issues 1-bug Something isn't working

Comments

@tim-shea
Copy link
Contributor

Describe the bug
When creating a process and calling process.create_runtime, that process will leak (i.e. leave open) channels and SystemProcesses on deletion if its run method is never called. If there is an exception or other problem during initialization, this could lead to inappropriate retention of system resources.

To reproduce current behavior
Create a process, call process.create_runtime(), call process.stop() or delete the process to trigger release of resources. Note that the spawned actors will not be joined and the channels will not be closed.

Expected behavior
Process.stop and runtime.stop should work correctly regardless of whether a process has ever been run. These methods should not rely on flags (_is_running, _is_initialized, etc) which are potentially incorrect to decide whether to clean up system resources, and should execute an exception-safe, comprehensive shutdown process whenever being deleted or stopped by the user.

@tim-shea tim-shea added the 1-bug Something isn't working label Jun 16, 2023
@github-actions github-actions bot added the 0-needs-review For all new issues label Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0-needs-review For all new issues 1-bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant