Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » 100% CPU for long time in ASTUtils.createCompilationUnit
100% CPU for long time in ASTUtils.createCompilationUnit [message #766245] Thu, 15 December 2011 07:50 Go to next message
arjan tijms is currently offline arjan tijms
Messages: 2
Registered: December 2011
Junior Member
Using Eclipse 3.7.1 for Java EE developers, when I rebuild my project and/or automatic validation kicks in after I pull in changes from a repository, I noticed Eclipse hangs for a long time.

Looking at a stack trace (taken via Jstack) it seems there's always the same call inside one of the threads:

org.eclipse.jst.ws.jaxws.utils.clazz.ASTUtils.createCompilationUnit(ASTUtils.java:89)


The calls made from thereon vary, but the above call is always there. E.g. one example stack trace:

   java.lang.Thread.State: RUNNABLE
	at org.eclipse.jdt.core.dom.MethodDeclaration.setConstructor(MethodDeclaration.java:528)
	at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:429)
	at org.eclipse.jdt.core.dom.ASTConverter.buildBodyDeclarations(ASTConverter.java:183)
	at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:2659)
	at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:1220)
	at org.eclipse.jdt.core.dom.CompilationUnitResolver.convert(CompilationUnitResolver.java:289)
	at org.eclipse.jdt.core.dom.ASTParser.internalCreateAST(ASTParser.java:1207)
	at org.eclipse.jdt.core.dom.ASTParser.createAST(ASTParser.java:807)
	at org.eclipse.jst.ws.jaxws.utils.clazz.ASTUtils.createCompilationUnit(ASTUtils.java:89)
	at org.eclipse.jst.ws.jaxws.utils.internal.annotations.impl.AnnotationInspectorImpl.getCompilationUnit(AnnotationInspectorImpl.java:659)
	at org.eclipse.jst.ws.jaxws.utils.internal.annotations.impl.AnnotationInspectorImpl.getSpecificAnnotationFromMember(AnnotationInspectorImpl.java:591)
	at org.eclipse.jst.ws.jaxws.utils.internal.annotations.impl.AnnotationInspectorImpl.inspectType(AnnotationInspectorImpl.java:183)
	at org.eclipse.jst.ws.jaxws.dom.runtime.persistence.sync.AbstractModelSynchronizer.processCompilationUnit(AbstractModelSynchronizer.java:116)
	at org.eclipse.jst.ws.jaxws.dom.runtime.persistence.sync.AbstractModelSynchronizer$LoaderCompilationUnitHandler.handle(AbstractModelSynchronizer.java:252)
	at org.eclipse.jst.ws.jaxws.dom.runtime.persistence.WorkspaceCUFinder.parseProject(WorkspaceCUFinder.java:94)
	at org.eclipse.jst.ws.jaxws.dom.runtime.persistence.WorkspaceCUFinder.find(WorkspaceCUFinder.java:57)
	at org.eclipse.jst.ws.jaxws.dom.runtime.persistence.sync.OnEventModelSynchronizer.handleOpenedProject(OnEventModelSynchronizer.java:230)
	at org.eclipse.jst.ws.jaxws.dom.runtime.persistence.sync.OnEventModelSynchronizer.handleChangedProject(OnEventModelSynchronizer.java:170)
	at org.eclipse.jst.ws.jaxws.dom.runtime.persistence.sync.OnEventModelSynchronizer.elementChanged(OnEventModelSynchronizer.java:86)
	at org.eclipse.jdt.internal.core.DeltaProcessor$4.run(DeltaProcessor.java:1670)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.jdt.internal.core.DeltaProcessor.notifyListeners(DeltaProcessor.java:1660)
	at org.eclipse.jdt.internal.core.DeltaProcessor.firePostChangeDelta(DeltaProcessor.java:1494)
	at org.eclipse.jdt.internal.core.DeltaProcessor.fire(DeltaProcessor.java:1470)
	at org.eclipse.jdt.internal.core.DeltaProcessor.resourceChanged(DeltaProcessor.java:2082)
	at org.eclipse.jdt.internal.core.DeltaProcessingState.resourceChanged(DeltaProcessingState.java:470)
	at org.eclipse.core.internal.events.NotificationManager$1.run(NotificationManager.java:291)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:285)
	at org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java:149)
	at org.eclipse.core.internal.resources.Workspace.broadcastPostChange(Workspace.java:395)
	at org.eclipse.core.internal.resources.Workspace.endOperation(Workspace.java:1530)
	at org.eclipse.core.internal.resources.Resource.refreshLocal(Resource.java:1670)
	at com.vectrace.MercurialEclipse.team.cache.RefreshWorkspaceStatusJob.refreshProject(RefreshWorkspaceStatusJob.java:94)
	at com.vectrace.MercurialEclipse.team.cache.RefreshWorkspaceStatusJob.run(RefreshWorkspaceStatusJob.java:74)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)


I never experienced this with other Eclipse versions for the project where it happens. Even on a fast machine (Sandy bridge quad core 3.4Ghz with 16GB of memory) it's on 100% cpu for minutes at end.
Re: 100% CPU for long time in ASTUtils.createCompilationUnit [message #766296 is a reply to message #766245] Thu, 15 December 2011 09:20 Go to previous messageGo to next message
Shane Clarke is currently offline Shane Clarke
Messages: 67
Registered: July 2009
Member
Hi Arjan,

Could you open a bugzilla against the WebTools > WTP Webservices > jst.ws.jaxws component for this?

Thanks,
Shane
Re: 100% CPU for long time in ASTUtils.createCompilationUnit [message #766361 is a reply to message #766296] Thu, 15 December 2011 11:16 Go to previous message
arjan tijms is currently offline arjan tijms
Messages: 2
Registered: December 2011
Junior Member
Hi,

Sure, the bugzilla was created here: bugs.eclipse.org/bugs/show_bug.cgi?id=366825
Previous Topic:new Javascript editor
Next Topic:installation problem for tomact server
Goto Forum:
  


Current Time: Fri Aug 29 10:15:26 EDT 2014

Powered by FUDForum. Page generated in 0.08400 seconds