Skip to content

VM launch failure doesn't report a useful error #397

Closed
@karlvr

Description

@karlvr

If the VM fails to launch, the error reported to the user is a timeout after 10,000ms rather than an exit status or anything from the stdout or stderr. This makes it very hard to debug launch failures when using the integrated console. If using a terminal, the errors are visible in the terminal.

AdvancedLaunchingConnector doesn't notice that the VM process has terminated and instead has to wait to catch the TransportTimeoutException and then it reports a timeout.

I would love to improve this!

After the timeout we could check if the process has terminated (process.isAlive()) and report that exit status instead of a timeout, and read from the stdout and stderr to construct a better error message and log the stdout / stderr to the console so the user can see what happened. The VMStartException doesn't seem very well suited to our purpose as although it includes the Process, because we .destroy() it we don't have access to the streams. Perhaps we can make our own exception here that can glean more information from the Process.

Ideally instead of waiting for timeout we could observe the process termination early, so the user isn't left hanging for 10s. But it doesn't seem like that's easily supported in the underlying Eclipse code.

I'm going to tinker with this, but I'd love to know if this sounds like the right track for improvement.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions