Skip to content

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

Open
@DanTup

Description

@DanTup

#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

Metadata

Metadata

Assignees

Labels

area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.triagedIssue has been triaged by sub team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions