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

--pause-isolates-on-exit results in a hung VM if it fails to start the VM Service #60256

Open
DanTup opened this issue Mar 5, 2025 · 0 comments
Assignees
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. triaged Issue has been triaged by sub team

Comments

@DanTup
Copy link
Collaborator

DanTup commented Mar 5, 2025

#60221 describes an issue where the VM Service fails to start. While debugging this, I noticed that the VM does not terminate in that case, which results in tests timing out instead of failing.

The reason for this seems to be that when the VM Service fails to start, if --pause-isolates-on-exit was set, the VM will remain paused at the end. However since the VM Service failed to start, it would never be possible to unpause this.

I don't know if it's feasible, but it would be nice if in this case the VM is able to terminate one way or another.

To repro:

  • Create a script void main() {} and save it somewhere
  • Run the script in a way that the VM service fails to start (here I'm using port 135 on Windows which we cannot bind to)
    & "D:\Tools\Dart\Latest (Bleeding Edge)\bin\dart.exe" --enable-vm-service=135 .\test\dap\integration\foo.dart
  • Note the VM terminates after printing the error
  • Re-run the script with --pause_isolates_on_exist:
    & "D:\Tools\Dart\Latest (Bleeding Edge)\bin\dart.exe" --pause_isolates_on_exit --enable-vm-service=135 .\test\dap\integration\foo.dart
  • Notice that the process does not terminate

Image

@lrhn lrhn added the area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. label Mar 6, 2025
@a-siva a-siva added the triaged Issue has been triaged by sub team label Mar 6, 2025
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. triaged Issue has been triaged by sub team
Projects
None yet
Development

No branches or pull requests

4 participants