Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eclipse with WDT - high cpu usage and slow changes in workspaces #362

Open
slavus opened this issue Dec 2, 2019 · 2 comments
Open

Eclipse with WDT - high cpu usage and slow changes in workspaces #362

slavus opened this issue Dec 2, 2019 · 2 comments

Comments

@slavus
Copy link

slavus commented Dec 2, 2019

Describe the bug
I have a multimodule maven project in workspaces ( 3 war, 3ears). Deployed to open liberty.
After any changes in pom.xml eclipse gets high cpu usage for long time (couple of hours).
It looks like it is some kind related to eclipse , liberty tools, and maven multimodule project.

This is stack i can see in threaddump that runs for prolonged time.

"Worker-3: Building workspace" - Thread t@36
   java.lang.Thread.State: RUNNABLE
	at java.util.zip.Inflater.inflateBytesBytes(Native Method)
	at java.util.zip.Inflater.inflate(Inflater.java:385)
	- locked <124041ac> (a java.util.zip.Inflater$InflaterZStreamRef)
	at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:153)
	at java.io.BufferedInputStream.read1(BufferedInputStream.java:290)
	at java.io.BufferedInputStream.read(BufferedInputStream.java:351)
	- locked <265f4813> (a java.io.BufferedInputStream)
	at org.eclipse.jdt.internal.compiler.util.Util.getInputStreamAsByteArray(Util.java:509)
	at org.eclipse.jdt.core.ToolFactory.createDefaultClassFileReader(ToolFactory.java:314)
	at org.eclipse.jst.j2ee.internal.archive.JavaEEArchiveUtilities.isEJBArchive(JavaEEArchiveUtilities.java:923)
	at org.eclipse.jst.j2ee.internal.archive.JavaEEArchiveUtilities.refineForJavaEE(JavaEEArchiveUtilities.java:620)
	at org.eclipse.jst.j2ee.internal.archive.JavaEEArchiveUtilities.openArchive(JavaEEArchiveUtilities.java:381)
	at org.eclipse.jst.jee.archive.internal.ArchiveFactoryImpl.openArchive(ArchiveFactoryImpl.java:47)
	at org.eclipse.jst.j2ee.internal.componentcore.JavaEEBinaryComponentHelper.getJavaEEQuickPeek(JavaEEBinaryComponentHelper.java:80)
	at org.eclipse.jst.j2ee.internal.deployables.J2EEDeployableFactory.createChildModule(J2EEDeployableFactory.java:274)
	at org.eclipse.jst.jee.internal.deployables.JEEFlexProjDeployable.gatherModuleReference(JEEFlexProjDeployable.java:57)
	at org.eclipse.wst.web.internal.deployables.FlatComponentDeployable.getModules(FlatComponentDeployable.java:274)
	at com.ibm.ws.st.jee.core.internal.JEEServerExtension.getChildModules(JEEServerExtension.java:172)
	at com.ibm.ws.st.core.internal.ServerExtensionWrapper.getChildModules(ServerExtensionWrapper.java:289)
	at com.ibm.ws.st.core.internal.WebSphereServer.getChildModules(WebSphereServer.java:356)
	at org.eclipse.wst.server.core.internal.Server.getChildModules(Server.java:2649)
	at org.eclipse.wst.server.core.internal.Server.visitModule(Server.java:3070)
	at org.eclipse.wst.server.core.internal.Server.visit(Server.java:3051)
	at org.eclipse.wst.server.core.internal.Server.getAllModules(Server.java:1554)
	at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.getAllModules(ServerBehaviourDelegate.java:1311)
	at com.ibm.ws.st.core.internal.WebSphereServerBehaviour.getPublishedModules(WebSphereServerBehaviour.java:1356)
	at com.ibm.ws.st.jee.core.internal.JEEServerExtension.isPublishRequired(JEEServerExtension.java:480)
	at com.ibm.ws.st.core.internal.ServerExtensionWrapper.isPublishRequired(ServerExtensionWrapper.java:280)
	at com.ibm.ws.st.core.internal.WASPublishControllerDelegate.isPublishRequired(WASPublishControllerDelegate.java:59)
	at org.eclipse.wst.server.core.internal.PublishController.isPublishRequired(PublishController.java:89)
	at org.eclipse.wst.server.core.ServerCore.isPublishRequired(ServerCore.java:579)
	at org.eclipse.wst.server.core.internal.ResourceManager$3.visit(ResourceManager.java:1134)
	at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:67)
	at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:77)
	at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:77)
	at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:77)
	at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:77)
	at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:51)
	at org.eclipse.wst.server.core.internal.ResourceManager.getPublishRequiredServers(ResourceManager.java:1111)
	at org.eclipse.wst.server.core.internal.ResourceManager.publishHandleProjectChange(ResourceManager.java:1077)
	at org.eclipse.wst.server.core.internal.ResourceManager$ServerResourceChangeListener$1.visit(ResourceManager.java:127)
	at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:67)
	at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:77)
	at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:51)
	at org.eclipse.wst.server.core.internal.ResourceManager$ServerResourceChangeListener.resourceChanged(ResourceManager.java:121)
	at org.eclipse.core.internal.events.NotificationManager$1.run(NotificationManager.java:305)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:295)
	at org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java:158)
	at org.eclipse.core.internal.resources.Workspace.broadcastBuildEvent(Workspace.java:365)
	at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:157)
	at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:244)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

Steps to Reproduce
Steps to reproduce the bug

Expected behavior
A clear and concise description of what you expected to happen.

Diagnostic information:

  • OpenLiberty Version: Open Liberty 19.0.0.10 (1.0.33.cl191020191002-0300) on
  • Java Version: OpenJDK 64-Bit Server VM, version 1.8.0_232-b09 (hr_HR)
  • eclipse 2019-9
@eharris369 eharris369 transferred this issue from OpenLiberty/open-liberty Dec 2, 2019
@theshovon-zz theshovon-zz removed their assignment Aug 26, 2020
@mithatbozkurt
Copy link

This problem is still alive. I decompile the class WASPublishControllerDelegate and add code block to check if auto publish disabled.

public class WASPublishControllerDelegate extends PublishControllerDelegate {
  public boolean isPublishRequired(IServer server, IResourceDelta delta) {
    //fix block start
    int autoPublishSettings = server.getAttribute("auto-publish-setting", 1);
    if (autoPublishSettings < 2)
      return false; 
   //fix block end
    WebSphereServer wsServer = (WebSphereServer)server.loadAdapter(WebSphereServer.class, null);
..

@pnickoll
Copy link
Member

I have taken a look and agree. If auto publish is disabled and Eclipse is asking us to check if publishing is required we should bypass the check. I will push this into the next release. Thank you for pointing this out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants