Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 366825 - 100% CPU for long time in ASTUtils.createCompilationUnit
Summary: 100% CPU for long time in ASTUtils.createCompilationUnit
Status: RESOLVED FIXED
Alias: None
Product: WTP Webservices
Classification: WebTools
Component: jst.ws.jaxws (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.3.2   Edit
Assignee: Danail Branekov CLA
QA Contact: Shane Clarke CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-15 11:11 EST by arjan tijms CLA
Modified: 2012-01-25 03:48 EST (History)
0 users

See Also:


Attachments
Example stack trace of the problematic thread. (3.53 KB, text/plain)
2011-12-15 11:14 EST, arjan tijms CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description arjan tijms CLA 2011-12-15 11:11:37 EST
Build Identifier: 20110916-0149

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 is in the attachment.

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. I tried both Linux (Ubuntu 10.04 and 11.10) as well as OS X (10.6).

Also see: http://www.eclipse.org/forums/index.php?t=rview&goto=766296

Reproducible: Always
Comment 1 arjan tijms CLA 2011-12-15 11:14:09 EST
Created attachment 208447 [details]
Example stack trace of the problematic thread.
Comment 2 Shane Clarke CLA 2011-12-15 11:20:57 EST
Danail, could you take a look at this?

Looks like #347973‏. Targeting to 3.3.2
Comment 3 Danail Branekov CLA 2011-12-16 02:35:04 EST
Indeed, it is very probably to be a duplicate of bug 347973‏ and I will therefore downport the fix.
Arjan, in the meanwhile, could you confirm whether you have huge projects (more than 100K lines of code) in your workspace?
Comment 4 arjan tijms CLA 2011-12-16 08:21:30 EST
(In reply to comment #3)> 
> Arjan, in the meanwhile, could you confirm whether you have huge projects (more
> than 100K lines of code) in your workspace?

The amount of Java code isn't really huge. It concern an EAR project, with an EJB project having 20K lines of code, and a dynamic web project having 50K lines of code. There's also a separate EJB project in my workspace having 10K lines of code.

Especially in the dynamic web project there's a considerate amount of other code, like a huge amount of .js files and many .xhtml (Facelets) files among others.
Comment 5 Danail Branekov CLA 2011-12-16 09:45:20 EST
Thanks for the clarification, Arjan.
The web service model synchronizer processes all compilation units within the workspace and it does not matter whether they are situated in a single project or among several ones. Your codebase seems to reach 100K lines of code, so the fix would probably improve the situation.

The fix itself has been implemented in the maintenance branch and should be available in the next maintenance build. Let's wait for it and check whether this works for you

Regards, Danail
Comment 6 Shane Clarke CLA 2012-01-25 03:48:30 EST
This bugzilla is showing up in a list of open Indigo SR2 defects.

Fix has been committed. Marking this as resolved.

Arjan please reopen if you still see the issue in the 3.3.2 maintenance build.

Latest avaialble here http://download.eclipse.org/webtools/downloads/