Bug 550346 - UI Freeze of approx 40 seconds on opening Launch Configuration Dialog
Summary: UI Freeze of approx 40 seconds on opening Launch Configuration Dialog
Status: VERIFIED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.13   Edit
Hardware: PC Windows 10
: P3 major (vote)
Target Milestone: 4.13 RC1   Edit
Assignee: Vikas Chandra CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2019-08-22 14:00 EDT by Noopur Gupta CLA
Modified: 2020-06-16 04:28 EDT (History)
5 users (show)

See Also:
sarika.sinha: review+


Attachments
Log 37s freeze (52.47 KB, application/octet-stream)
2019-08-22 14:00 EDT, Noopur Gupta CLA
no flags Details
Log 39s freeze (52.12 KB, application/octet-stream)
2019-08-22 14:01 EDT, Noopur Gupta CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Noopur Gupta CLA 2019-08-22 14:00:54 EDT
Created attachment 279663 [details]
Log 37s freeze

I am getting UI freeze of approx 40 seconds very frequently on opening the Launch (Run/Debug) configuration dialog on Windows 10 since at least a month.

Before that, I was using Windows 7 and wasn't facing this issue. 

So, the problem could be related to upgrade to Windows 10 or some recent change done in Eclipse around that time.

Attaching the UI responsiveness monitoring reports when the freeze happened in I20190821-1800. One report is of 37s freeze and other of 39s freeze. Both were performed 20 mins apart and no action was done in Eclipse in between the two.

When I opened the Launch Configuration dialog and the freeze happened, no other visible job was running in Eclipse at that time.
Comment 1 Noopur Gupta CLA 2019-08-22 14:01:44 EDT
Created attachment 279664 [details]
Log 39s freeze
Comment 2 Noopur Gupta CLA 2019-08-22 14:03:11 EDT
Let me know if I can get some other logs to analyze the issue.
Comment 3 Noopur Gupta CLA 2019-08-22 14:07:25 EDT
(In reply to Noopur Gupta from comment #0)
> When I opened the Launch Configuration dialog and the freeze happened, no
> other visible job was running in Eclipse at that time.
Also, note that approx 5 minutes before trying to open the launch config dialog, I had already opened (by clicking the toolbar button) and closed a runtime Eclipse workbench which had taken the normal time without any freeze.
Comment 4 Sarika Sinha CLA 2019-08-22 14:17:57 EDT
Both the logs have common log statements from PDE, adding @Vikas.

at org.eclipse.pde.internal.core.TracingOptionsManager.getOptions(TracingOptionsManager.java:175)
	at org.eclipse.pde.internal.core.TracingOptionsManager.addToTemplate(TracingOptionsManager.java:55)
	at org.eclipse.pde.internal.core.TracingOptionsManager.createTemplate(TracingOptionsManager.java:49)
	at org.eclipse.pde.internal.core.TracingOptionsManager.getTracingTemplateCopy(TracingOptionsManager.java:101)
	at org.eclipse.pde.internal.ui.launcher.TracingBlock.initializeFrom(TracingBlock.java:272)
	at org.eclipse.pde.ui.launcher.TracingTab.initializeFrom(TracingTab.java:81)
	at org.eclipse.pde.ui.launcher.AbstractPDELaunchConfigurationTabGroup.lambda$0(AbstractPDELaunchConfigurationTabGroup.java:63)
	at org.eclipse.pde.ui.launcher.AbstractPDELaunchConfigurationTabGroup$$Lambda$1137.000000003036FDE0.run(Unknown Source)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:72)
	at org.eclipse.pde.ui.launcher.AbstractPDELaunchConfigurationTabGroup.initializeFrom(AbstractPDELaunchConfigurationTabGroup.java:55)
	at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupWrapper.initializeFrom(LaunchConfigurationTabGroupWrapper.java:182)
Comment 5 Vikas Chandra CLA 2019-08-23 00:43:45 EDT
(In reply to Noopur Gupta from comment #2)
> Let me know if I can get some other logs to analyze the issue.

What are the steps?
Comment 6 Noopur Gupta CLA 2019-08-23 01:29:02 EDT
(In reply to Vikas Chandra from comment #5)
> (In reply to Noopur Gupta from comment #2)
> > Let me know if I can get some other logs to analyze the issue.
> 
> What are the steps?

Just open the run/debug configuration dialog via drop down in tool bar button. It takes 40s to open.
Comment 7 Andrey Loskutov CLA 2019-08-23 01:34:35 EDT
(In reply to Noopur Gupta from comment #6)
> (In reply to Vikas Chandra from comment #5)
> > (In reply to Noopur Gupta from comment #2)
> > > Let me know if I can get some other logs to analyze the issue.
> > 
> > What are the steps?
> 
> Just open the run/debug configuration dialog via drop down in tool bar
> button. It takes 40s to open.

I guess this is not that easy because it depends on found launch configs and also probably on the projects opened in the workspace.
Comment 8 Noopur Gupta CLA 2019-08-23 02:16:35 EDT
(In reply to Andrey Loskutov from comment #7)
> (In reply to Noopur Gupta from comment #6)
> > (In reply to Vikas Chandra from comment #5)
> > > (In reply to Noopur Gupta from comment #2)
> > > > Let me know if I can get some other logs to analyze the issue.
> > > 
> > > What are the steps?
> > 
> > Just open the run/debug configuration dialog via drop down in tool bar
> > button. It takes 40s to open.
> 
> I guess this is not that easy because it depends on found launch configs and
> also probably on the projects opened in the workspace.

My workspace has mainly 4 Eclipse applications and approx 15 JUnit plug-in tests created as launch configs. It has some imported projects from 11 repositories: jdt.ui/core/debug, jdt, pde.ui, orbit-recipes, platform.common/text/debug/releng/aggregator.
Comment 9 Noopur Gupta CLA 2019-08-23 02:24:28 EDT
JRE details from today's freeze of 44s:

eclipse.buildId=4.13.0.I20190821-1800
java.fullversion=11.0.4+11
JRE 11 Windows 8 amd64-64-Bit Compressed References 20190717_282 (JIT enabled, AOT enabled)
OpenJ9   - 0f66c6431
OMR      - ec782f26
JCL      - fa49279450 based on jdk-11.0.4+11
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_IN
Command-line arguments:  -os win32 -ws win32 -arch x86_64

org.eclipse.ui.monitoring
Error
Fri Aug 23 11:40:10 IST 2019
UI freeze of 44s at 11:39:26.731
Comment 10 Vikas Chandra CLA 2019-08-23 02:29:47 EDT
(In reply to Noopur Gupta from comment #8)
> (In reply to Andrey Loskutov from comment #7)
> > (In reply to Noopur Gupta from comment #6)
> > > (In reply to Vikas Chandra from comment #5)
> > > > (In reply to Noopur Gupta from comment #2)
> > > > > Let me know if I can get some other logs to analyze the issue.
> > > > 
> > > > What are the steps?
> > > 
> > > Just open the run/debug configuration dialog via drop down in tool bar
> > > button. It takes 40s to open.
> > 
> > I guess this is not that easy because it depends on found launch configs and
> > also probably on the projects opened in the workspace.
> 
> My workspace has mainly 4 Eclipse applications and approx 15 JUnit plug-in
> tests created as launch configs. It has some imported projects from 11
> repositories: jdt.ui/core/debug, jdt, pde.ui, orbit-recipes,
> platform.common/text/debug/releng/aggregator.

Does the freeze happen in a brand new workspace location with 0 workspace project?
Comment 11 Noopur Gupta CLA 2019-08-23 02:37:28 EDT
(In reply to Vikas Chandra from comment #10)
> Does the freeze happen in a brand new workspace location with 0 workspace
> project?
No, haven't seen that yet.
Comment 12 Sarika Sinha CLA 2019-08-23 02:44:58 EDT
@Vikas,
Can you check what kind of zip file is being tried to open while at org.eclipse.pde.internal.core.TracingOptionsManager.getOptions(TracingOptionsManager.java:175)

And can that be done in a non blocking thread?
Comment 13 Dani Megert CLA 2019-08-23 08:32:24 EDT
Noopur, is it OK when using 4.12?
Comment 14 Noopur Gupta CLA 2019-08-23 09:32:19 EDT
(In reply to Dani Megert from comment #13)
> Noopur, is it OK when using 4.12?

Yes, in the same workspace, the launch config dialog is opening in 1-3 seconds using 4.12 build.
Comment 15 Dani Megert CLA 2019-08-23 09:36:58 EDT
Sarika and Vikas, please investigate for RC1.
Comment 16 Noopur Gupta CLA 2019-08-23 10:20:11 EDT
(In reply to Noopur Gupta from comment #14)
> (In reply to Dani Megert from comment #13)
> > Noopur, is it OK when using 4.12?
> 
> Yes, in the same workspace, the launch config dialog is opening in 1-3
> seconds using 4.12 build.

After moving that workspace from 4.12 to I20190821-1800, it was taking very less time to open the dialog. But again it took close to 40s after a couple of trials. 

The behavior is very inconsistent. 

In Windows Task Manager, I usually see Eclipse and Windows Defender Antivirus (Antimalware Service Executable) taking most CPU when freeze happens.

I thought of disabling the Antimalware Service to check if the freeze still happens but I get access denied trying to disable it.
Comment 17 Sarika Sinha CLA 2019-08-26 01:26:43 EDT
@Noopur, 
Are you opening the Run/Debug Launch Configuration Dialog or you are doing Ctrl+ Click on an Eclipse Application Launch Configuration?

I don't see TracingOptionsManager getting invoked unless we are doing something with an Eclipse Application.

Also, as we are unable to reproduce. Can you try taking Yourkit snapshot for the freeze  ?
Comment 18 Vikas Chandra CLA 2019-08-26 02:25:39 EDT
I removed the tracing tab altogether ( temporarily) in my debug setup and didn't see a tangible difference in launching ( run or debug) eclipse.
Comment 19 Vikas Chandra CLA 2019-08-26 02:31:16 EDT
(In reply to Sarika Sinha from comment #12)
> @Vikas,
> Can you check what kind of zip file is being tried to open while at
> org.eclipse.pde.internal.core.TracingOptionsManager.
> getOptions(TracingOptionsManager.java:175)
> 
> And can that be done in a non blocking thread?

All the target jar files are processed
zf=C:\eclipse\uname_413\21Aug\eclipse-SDK-I20190821-1800-win32-x86_64\eclipse\plugins\com.google.gson_2.8.2.v20180104-1110.jar
zf=C:\eclipse\uname_413\21Aug\eclipse-SDK-I20190821-1800-win32-x86_64\eclipse\plugins\com.google.gson.source_2.8.2.v20180104-1110.jar
zf=C:\eclipse\uname_413\21Aug\eclipse-SDK-I20190821-1800-win32-x86_64\eclipse\plugins\com.ibm.icu_64.2.0.v20190507-1337.jar
zf=C:\eclipse\uname_413\21Aug\eclipse-SDK-I20190821-1800-win32-x86_64\eclipse\plugins\com.ibm.icu.source_64.2.0.v20190507-1337.jar
zf=C:\eclipse\uname_413\21Aug\eclipse-SDK-I20190821-1800-win32-x86_64\eclipse\plugins\com.jcraft.jsch_0.1.55.v20190404-1902.jar

..
+ 100s of such files

I don't think a non-UI thread of 40 seconds would be acceptable ( and tracing tab probably wont work till then).
Comment 20 Noopur Gupta CLA 2019-08-26 02:34:57 EDT
(In reply to Sarika Sinha from comment #17)
> @Noopur, 
> Are you opening the Run/Debug Launch Configuration Dialog or you are doing
> Ctrl+ Click on an Eclipse Application Launch Configuration?
I am selecting "Debug Configuration..." from the drop-down next to Debug button on the toolbar. 

> Also, as we are unable to reproduce. Can you try taking Yourkit snapshot for
> the freeze  ?
Sure. Any additional settings required in Yourkit to get more details than the UI responsive monitoring?
Comment 21 Sarika Sinha CLA 2019-08-26 02:44:10 EDT
(In reply to Noopur Gupta from comment #20)
> (In reply to Sarika Sinha from comment #17)
> > @Noopur, 
> > Are you opening the Run/Debug Launch Configuration Dialog or you are doing
> > Ctrl+ Click on an Eclipse Application Launch Configuration?
> I am selecting "Debug Configuration..." from the drop-down next to Debug
> button on the toolbar. 

And when it opens up, the selected Launch Configuration is of type "Eclipse Application" as Tracing tab is present only there.

> 
> > Also, as we are unable to reproduce. Can you try taking Yourkit snapshot for
> > the freeze  ?
> Sure. Any additional settings required in Yourkit to get more details than
> the UI responsive monitoring?

CPU Tracing should be enabled, nothing else.


40 seconds is not acceptable in any case, but most of the time we don't even visit Tracing tab but still all the processing is happening in the UI thread. 


Moving to PDE.
Comment 22 Vikas Chandra CLA 2019-08-26 05:50:54 EDT
I was able to recreate on Kalyan's machine once but then tried on virtual windows 10 machine and I was unable to recreate.
Comment 23 Eclipse Genie CLA 2019-08-27 11:29:17 EDT
New Gerrit change created: https://git.eclipse.org/r/148466
Comment 24 Sarika Sinha CLA 2019-08-27 14:03:41 EDT
+1 for RC1.
This fixes the issue while launching the Launch Configuration dialog.

Another bug can be created to track if still freeze is observed on the selection of "Tracing Tab".
Comment 26 Vikas Chandra CLA 2019-08-29 06:41:21 EDT
I tried for more than 10 times on a windows 10 machine ( noopur's machine) and it didnt happen.

Further work will be taken up with bug 550506
Comment 27 Vikas Chandra CLA 2019-08-29 06:42:54 EDT
I checked on I20190828-0600/
Comment 28 Andrey Loskutov CLA 2020-03-25 06:08:17 EDT
(In reply to Eclipse Genie from comment #25)
> Gerrit change https://git.eclipse.org/r/148466 was merged to [master].
> Commit:
> http://git.eclipse.org/c/pde/eclipse.pde.ui.git/commit/
> ?id=a8ab10f84ff3b7080516961f6901ad1864257445

This caused a bad regression via bug 561424: opening launch config with existing tracing data automatically discards all the data and silently saves that to the launch configuration back.
Comment 29 Vikas Chandra CLA 2020-03-27 02:47:01 EDT
Launch config opens in 3 sec on win 10 machine on eclipse-SDK-I20200326-1800-win32-x86_64.zip as well as 4.15RC2 build.