eclipse.platform.ui icon indicating copy to clipboard operation
eclipse.platform.ui copied to clipboard

Eclipse dump

Open elsazac opened this issue 1 year ago • 14 comments

Suggestion

From a fresh installation and clean workspace:

  • Run an application
  • Application gets into issues : crash / freeze / Exception ...

And would like to be able to

  • Have a menu option or a toolbar named dump
  • Clicking on that, eclipse collects diagnostic data (thread dumps, memory, java heap info etc.)
  • Dumps this information in a file

I get some information from About Eclipse->configuration tab but those are launch time information not runtime

Community

  • [x] I understand suggesting an enhancement doesn't mandate anyone to implement it. Other contributors may consider this suggestion, or not, at their own convenience. The most efficient way to get it fixed is that I implement it myself and contribute it back as a good quality patch to the project.

elsazac avatar Jan 30 '24 12:01 elsazac

I'm not sure if you are talking about a self-dump or a dump of something launched from the IDE. Problems are generally logged and visible in the Error Log view. There is optional freeze monitoring (Window -> Preferences -> General -> UI Freeze Monitoring) that logs information about when the UI thread is block.

Thread dumps can be collected externally.

https://wiki.eclipse.org/How_to_report_a_deadlock

I'm not sure a memory dump is possible or what tool would be able to read it to provide useful information.

merks avatar Jan 30 '24 12:01 merks

I'm not sure if you are talking about a self-dump or a dump of something launched from the IDE. Problems are generally logged and visible in the Error Log view. There is optional freeze monitoring (Window -> Preferences -> General -> UI Freeze Monitoring) that logs information about when the UI thread is block.

Thread dumps can be collected externally.

https://wiki.eclipse.org/How_to_report_a_deadlock

I'm not sure a memory dump is possible or what tool would be able to read it to provide useful information.

@merks I am talking about a self dump. instead of looking for issues in error log, thread dumps etc. separately it would be handy if we get everything in a single dump. Also I can ask my customers to collect all these informations using a single click if they get into problems.

for eg, Semuru java produces a java dump which provides rich set of JVM internal details. Refs: https://www.ibm.com/docs/en/semeru-runtime-ce-z/11?topic=dumps-java-dump

elsazac avatar Jan 30 '24 12:01 elsazac

Application gets into issues : crash / freeze / Exception ... Have a menu option or a toolbar named dump

If Eclipse is crashed or hangs, no Eclipse menu / toolbar will work. So are you requesting an additional application that would be installed next to Eclipse?

iloveeclipse avatar Jan 30 '24 12:01 iloveeclipse

If Eclipse is crashed or hangs, no Eclipse menu / toolbar will work. So are you requesting an additional application that would be installed next to Eclipse?

It's not an additional application. if eclipse crashes we can enable vm shut down hook (https://docs.oracle.com/javase/8/docs/api/java/lang/Runtime.html#addShutdownHook-java.lang.Thread-) that can collect the required data. if the UI freezes or hangs similar thing can be done by a non UI thread. And these behaviours may be controlled using user preferences.

elsazac avatar Jan 31 '24 07:01 elsazac

SAP's ABAP Development Tools (ADT) does have suche a feature. Let me show you how this looks like.

We have a Menu Entry Help > "Collect Support Information...". A user can trigger this once he encountered a problem in our product or when our support colleagues ask them to do so while handling a support ticket.

This looks like this:

image image image

This generated a ZIP file. This contains e.g.:

  • configured update sites
  • installed plugin versions
  • the error log
  • the preference settings
  • system properties set

You can try out our implementation by simply taking a plain eclipse and install our ADT via the https://tools.hana.ondemand.com/latest update site. See: https://tools.eu1.hana.ondemand.com/#abap

See: Screenshot 2024-01-31 at 08 26 29

This will also install the "SAP Support Tools": image

You don't need an ABAP server to test the support collector.

This is already build in a way that it's independent from our product "ADT". Product specific information can be provided via implementing extension points. Via this way we for example also add a trace of the communication that happens between the ADT (eclipse client) and our ABAP server. Eclipse platform specific stuff (like adding the error log to the zip file) are implemented directly.

So it should be relatively easy for us to contribute this to the Eclipse project. And we are willing to do so.

BeckerWdf avatar Jan 31 '24 07:01 BeckerWdf

Application gets into issues : crash / freeze / Exception ... Have a menu option or a toolbar named dump

If Eclipse is crashed or hangs, no Eclipse menu / toolbar will work. So are you requesting an additional application that would be installed next to Eclipse?

With SAP's implementation of that we can also collect information from a hanging eclipse installation - even though this is not possible by simply pressing a button.

BeckerWdf avatar Jan 31 '24 07:01 BeckerWdf

With SAP's implementation of that we can also collect information from a hanging eclipse installation - even though this is not possible by simply pressing a button.

Thanks @BeckerWdf for sharing the feature, this fits my use case perfectly. With or without a controlling button, as long as we are able to capture the valuable diagnostic data, my objective is met.

elsazac avatar Jan 31 '24 07:01 elsazac

Thanks @BeckerWdf for sharing the feature, this fits my use case perfectly. With or without a controlling button, as long as we are able to capture the valuable diagnostic data, my objective is met.

This is done via the command line then. From our documentation:

In rare situations, in which the IDE is frozen, it may still be possible to create a support file using the command line. Proceed as follows (the path to your eclipse installation may vary):

Windows: Open a terminal or command prompt Run the following command: "c:\path\to\eclipse\eclipse.exe" -application com.sap.ide.support.StandaloneInformationCollector -data @none

BeckerWdf avatar Jan 31 '24 07:01 BeckerWdf

Hi,

I have a repository that contains the code for SAP's Collect Support Information feature, implemented in a generic way

Could someone suggest the appropriate Eclipse repository to contribute this code to, or recommend the best approach to integrate this functionality within Eclipse?

Thanks, Praveen

praveen-skp avatar Mar 03 '25 08:03 praveen-skp

@praveen-skp Would you please share details what this feature does exactly? Also as you said it's SAP's code do you have approval from SAP to contribute it?

akurtakov avatar Mar 03 '25 08:03 akurtakov

@praveen-skp https://github.com/eclipse-platform seems appropriate, so the best would be to open a PR, and include a READEME.MD in the original repository what exactly the feature offers.

Also we likely need an official statement from the contributors (except you are the author/owner of all code) or a reference to the original sources that state under what license this is provided. At best all source files should ship with a appropriate license header.

laeubi avatar Mar 03 '25 08:03 laeubi

Also please add tests bundle, that at least does smoke tests for whatever contributed. If there is API provided but no clients exists in the SDK, ideally tests should cover this API as well.

iloveeclipse avatar Mar 03 '25 08:03 iloveeclipse

@praveen-skp Would you please share details what this feature does exactly? Also as you said it's SAP's code do you have approval from SAP to contribute it?

Hi @akurtakov, I'm from SAP and we are willing to contribute the feature to eclipse.

praveen-skp avatar Mar 03 '25 09:03 praveen-skp

@iloveeclipse and @laeubi, thanks for the quick feedbacks and opinions. I will work on them and create a PR for the same.

praveen-skp avatar Mar 03 '25 09:03 praveen-skp