Bug 553017 - Eclipse crashes when started with an in-use transport connection
Summary: Eclipse crashes when started with an in-use transport connection
Status: CLOSED WONTFIX
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Launcher (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2019-11-13 14:15 EST by Ed Willink CLA
Modified: 2019-11-14 16:16 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Willink CLA 2019-11-13 14:15:11 EST
Using eclipse-SDK-I20191112-1800-win32-x86_64.zip, it seems that the recent changes to workspace selection have opened a hole.

To start a new workspace, I took my usual short and changed the workspace to the required new name. Starting Eclipse via the new short cut crashes; giving the Java failed pop up.

Surely it should just work, or perhaps offer a do you want to create workspace pop up? Certainly not a crash.
Comment 1 Andrey Loskutov CLA 2019-11-13 14:31:14 EST
(In reply to Ed Willink from comment #0)
> Using eclipse-SDK-I20191112-1800-win32-x86_64.zip, it seems that the recent
> changes to workspace selection have opened a hole.

*which* changes?

> To start a new workspace, I took my usual short and changed the workspace to
> the required new name. Starting Eclipse via the new short cut crashes;
> giving the Java failed pop up.

Please provide error log and clear steps to reproduce.

> Surely it should just work, or perhaps offer a do you want to create
> workspace pop up? Certainly not a crash.

If it crashed, please provide crash dump.
Comment 2 Ed Willink CLA 2019-11-14 06:01:36 EST
The actual problem in the re-used short cut 

E:\Tools\Eclipse\4.11\eclipse.exe -clean -data E:\Development\Rusa\Workspace -vm "%JAVA_HOME%\bin\javaw.exe" -vmargs -Xmx4g -XX:PermSize=100M -XX:MaxPermSize=300M -Xrunjdwp:server=y,transport=dt_socket,address=14143,suspend=n

was not the new workspace but the re-used 14143 socket. So behind the scenes was some form of port-in-use IOException.

(In reply to Andrey Loskutov from comment #1)
> If it crashed, please provide crash dump.

Unfortunately the Eclipse-failed-to-launch dialog is pretty verbose and also pretty useless. It shows the full command line (sometimes useful) but no more diagnosis than Java exited with some numeric code.

The IOException does not appear directly.

There is no hyperlink to a log file that might contain it.

There is no hyperlink to a crash dump.

----

Therefore this bug is the absence of any clues that the failure to launch with a re-used socket was due to a socket connection failure.
Comment 3 Andrey Loskutov CLA 2019-11-14 06:20:05 EST
Closing as user error. VM can't start if the debug port is already in use.
Comment 4 Ed Willink CLA 2019-11-14 06:46:19 EST
Yes. But the Eclipse launcher runs before the VM start so surely the Eclipse launcher can diagnose the problem much much better?
Comment 5 Andrey Loskutov CLA 2019-11-14 06:51:21 EST
(In reply to Ed Willink from comment #4)
> Yes. But the Eclipse launcher runs before the VM start so surely the Eclipse
> launcher can diagnose the problem much much better?

In theory, yes. However it will require parsing of various ways to open some port (like -Xrunjdwp) and checking if that port is in use on the current system, which is probably not worth the effort.

If you have time & energy to contribute this non trivial, cross-platform VM attributes parsing/network checking C++ code (launcher code is C++), feel free to reopen.
Comment 6 Ed Willink CLA 2019-11-14 15:43:21 EST
Surely the VM has an API like Process; simple programming just propagates the trivial integer exitValue(); serious applications hook up the output/errorStream?

And as a minimum the dialog could identify the directory of a log file / dump.
Comment 7 Andrey Loskutov CLA 2019-11-14 15:53:14 EST
https://wiki.eclipse.org/Platform_UI/How_to_Contribute
Comment 8 Ed Willink CLA 2019-11-14 16:14:18 EST
You may not have noticed but I in addition to three existing projects, I am just making another major contribution by rescuing for Modisco from termination. I do not have time to get up to speed on the platform whose developers can react at least ten times more proficiently than me.
Comment 9 Andrey Loskutov CLA 2019-11-14 16:16:17 EST
Ed, I've just added a hint how to proceed here (and also did it in my free time).