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

VM Service should finish processing RPC responses from service extensions before shutting down #56831

Open
bkonyi opened this issue Oct 1, 2024 · 2 comments
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. P2 A bug or feature request we're likely to work on triaged Issue has been triaged by sub team vm-service The VM Service Protocol, both the specification and its implementation

Comments

@bkonyi
Copy link
Contributor

bkonyi commented Oct 1, 2024

It's possible for the VM to shutdown immediately after the main isolate returns from a service extension if there's no longer any events in the queue and no ports remain open. This can cause a race where the VM starts to shutdown as the service isolate is in the middle of processing the service extension response, preventing the VM service client from actually getting the service extension result.

We should investigate whether or not it's possible to prevent the service isolate from shutting down while it's in the middle of processing a response.

@bkonyi bkonyi added area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. P3 A lower priority bug or feature request triaged Issue has been triaged by sub team vm-service The VM Service Protocol, both the specification and its implementation labels Oct 1, 2024
@bkonyi
Copy link
Contributor Author

bkonyi commented Oct 1, 2024

@rmacnak-google can you think of any reason why this wouldn't be feasible or would otherwise be a bad idea?

@rmacnak-google
Copy link
Contributor

Seems reasonable. We'd need to make sure we're only waiting to finish the pending outgoing responses and not accepting new requests or we risk never actually reaching shutdown.

@bkonyi bkonyi added P2 A bug or feature request we're likely to work on and removed P3 A lower priority bug or feature request labels Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. P2 A bug or feature request we're likely to work on triaged Issue has been triaged by sub team vm-service The VM Service Protocol, both the specification and its implementation
Projects
None yet
Development

No branches or pull requests

2 participants