Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 317830 - Eclipse Helios Hanging
Summary: Eclipse Helios Hanging
Status: RESOLVED FIXED
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: jst.jsp (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows 7
: P3 critical with 2 votes (vote)
Target Milestone: 3.2.2   Edit
Assignee: Nitin Dahyabhai CLA
QA Contact: Nitin Dahyabhai CLA
URL:
Whiteboard: http://dev.eclipse.org/viewcvs/index....
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-24 10:23 EDT by Ivan Rei CLA
Modified: 2010-12-06 11:43 EST (History)
9 users (show)

See Also:
nsand.dev: review+


Attachments
threaddump (31.77 KB, text/plain)
2010-06-24 13:06 EDT, Ivan Rei CLA
no flags Details
threaddump (32.33 KB, text/plain)
2010-06-24 13:07 EDT, Ivan Rei CLA
no flags Details
threaddump (26.24 KB, text/plain)
2010-06-24 13:09 EDT, Ivan Rei CLA
no flags Details
threaddump (16.94 KB, text/plain)
2010-06-24 13:10 EDT, Ivan Rei CLA
no flags Details
threaddump (16.74 KB, text/plain)
2010-06-24 13:11 EDT, Ivan Rei CLA
no flags Details
threaddump (22.90 KB, text/plain)
2010-06-24 13:14 EDT, Ivan Rei CLA
no flags Details
threaddump (23.05 KB, text/plain)
2010-06-24 13:15 EDT, Ivan Rei CLA
no flags Details
threaddump (21.34 KB, text/plain)
2010-06-24 13:16 EDT, Ivan Rei CLA
no flags Details
Eclipse Workspace with CVS and Server "Labels" Missing (330.79 KB, image/jpeg)
2010-07-06 09:52 EDT, Ivan Rei CLA
no flags Details
After 2 minutes CVS and Server "Labels" Appear (388.91 KB, image/jpeg)
2010-07-06 09:54 EDT, Ivan Rei CLA
no flags Details
After 8 Minutes Eclipse hasn't completed startup (404.11 KB, image/jpeg)
2010-07-06 09:55 EDT, Ivan Rei CLA
no flags Details
With no processes running I get a waiting window (422.09 KB, image/jpeg)
2010-07-06 09:58 EDT, Ivan Rei CLA
no flags Details
Thread dump containing suspicious creation of ProjectDescription. (22.79 KB, text/plain)
2010-07-23 07:57 EDT, Andree Wormuth CLA
no flags Details
proposed patch (3.28 KB, patch)
2010-07-29 19:37 EDT, Nitin Dahyabhai CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Rei CLA 2010-06-24 10:23:23 EDT
Build Identifier: I20100608-0911

Can someone please help me, I've been struggling with this problem for ages. 

The only Helios I can use is eclipse-SDK-3.6M4-win32, from eclipse-SDK-3.6M5-win32 to eclipse-SDK-3.6-win32, eclipse is unusable. When I open eclipse it hangs for ages, all the projects in the Package Explorer view show up without the CVS Server label. After quite a few minutes the CVS labels start showing up. The server view does the same thing, after quite a few minutes the [Stopped, Republish] shows up. In the eclipse-SDK-3.6M4-win32, they show up right after I open eclipse.

This all happens with the CPU at 100%. I then try to do an action like publish the server and it comes up as waiting, but in the process view there is nothing running. I eventually give up and go back to eclipse-SDK-3.6M4-win32.

I also downloaded the eclipse-jee-helios-win32.zip SR, but to no avail. Same problem persists. I then decided to create a new workspace to see if that was the problem, but the same thing happens after I import the projects and create the servers.

I have 47 projects in the workspace and 12 servers (In the new workspace created I have only 2) created. I'm using JDK1.6.0_20 and Tomcat 6.0.26 on a Windows 7 machine.

Please HELP!!!! 

Reproducible: Always

Steps to Reproduce:
1. Open Eclipse
2. Eclipse hangs as written in the details.
3. Never recovers, eventually have to kill process.
Comment 1 Remy Suen CLA 2010-06-24 11:30:07 EDT
Please attach a thread dump.
http://wiki.eclipse.org/index.php/How_to_report_a_deadlock
Comment 2 Ivan Rei CLA 2010-06-24 13:06:11 EDT
Created attachment 172644 [details]
threaddump

First threaddump
Comment 3 Ivan Rei CLA 2010-06-24 13:07:49 EDT
Created attachment 172645 [details]
threaddump
Comment 4 Ivan Rei CLA 2010-06-24 13:09:47 EDT
Created attachment 172646 [details]
threaddump
Comment 5 Ivan Rei CLA 2010-06-24 13:10:40 EDT
Created attachment 172647 [details]
threaddump
Comment 6 Ivan Rei CLA 2010-06-24 13:11:54 EDT
Created attachment 172648 [details]
threaddump
Comment 7 Ivan Rei CLA 2010-06-24 13:14:23 EDT
Created attachment 172649 [details]
threaddump
Comment 8 Ivan Rei CLA 2010-06-24 13:15:52 EDT
Created attachment 172650 [details]
threaddump
Comment 9 Ivan Rei CLA 2010-06-24 13:16:58 EDT
Created attachment 172651 [details]
threaddump
Comment 10 Ivan Rei CLA 2010-06-24 13:18:16 EDT
I've attaced a few Thread Dumps, I did a dump every minute or so till eclipse got stuck in "waiting".
Comment 11 Dani Megert CLA 2010-07-02 04:17:47 EDT
The stack traces don't indicate a lock in the main thread. Is it really stuck or are just the decorators not updating?

The stack traces indicate that JST and JSP is also installed. Can you please try with a pure Eclipse SDK R3.6 (Helios):
http://download.eclipse.org/eclipse/downloads/drops/R-3.6-201006080911/index.php
Comment 12 Ivan Rei CLA 2010-07-05 14:23:54 EDT
I ran the pure Eclipse SDK R3.6 (Helios), it seems to be working OK. So it must be something with WTP. The problems happen even if I use the "Eclipse IDE for Java EE Developers" version (http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/helios/R/eclipse-jee-helios-win32.zip).

Any ideas on what to try next?
Comment 13 Dani Megert CLA 2010-07-06 01:43:27 EDT
>Any ideas on what to try next?
Answer all my questions as a start? ;-)
Comment 14 Ivan Rei CLA 2010-07-06 09:52:56 EDT
Created attachment 173553 [details]
Eclipse Workspace with CVS and Server "Labels" Missing
Comment 15 Ivan Rei CLA 2010-07-06 09:54:01 EDT
Created attachment 173555 [details]
After 2 minutes CVS and Server "Labels" Appear
Comment 16 Ivan Rei CLA 2010-07-06 09:55:57 EDT
Created attachment 173556 [details]
After 8 Minutes Eclipse hasn't completed startup
Comment 17 Ivan Rei CLA 2010-07-06 09:58:26 EDT
Created attachment 173557 [details]
With no processes running I get a waiting window
Comment 18 Ivan Rei CLA 2010-07-06 10:09:55 EDT
(In reply to comment #13)
> >Any ideas on what to try next?
> Answer all my questions as a start? ;-)

I've attached some screenshots. As you can see, to me it looks like it's hanging. Almost 20 minutes to start Eclipse and with CPU at 100%. And every process I do after that causes a hang. Even my mouse cursor doesn't flow evenly.

If I open the same workspace with Milestone 4 version it works fine, and starts up in 5 minutes.
Comment 19 Dani Megert CLA 2010-07-06 10:17:07 EDT
This might be the culprit, given that it works with plain Eclipse SDK:
"Worker-0" prio=6 tid=0x54909800 nid=0x448 waiting for monitor entry [0x5583f000]
   java.lang.Thread.State: BLOCKED (on object monitor)
	at org.eclipse.jst.jsp.core.taglib.TaglibIndex$ClasspathChangeListener.elementChanged(TaglibIndex.java:79)


John?
Comment 20 Andree Wormuth CLA 2010-07-23 07:57:05 EDT
Created attachment 175055 [details]
Thread dump containing suspicious creation of ProjectDescription.

Hi all,
I'm facing a related problem. Seems to be a problem with the org.eclipse.jst.jsp.core.taglib.TaglibIndex.

The ProjectDescriptions seem to be rebuilt for each project on build path after opening a JSP file or even simply typing or removing an "<" in a JSP file, time after time. Each rebuild takes about two minutes, so it's absolutely impossible for me at the moment to edit my JSP files with WTP 3.2.

Removing all projects from build path and replacing them with the according jar-file (which I create independently from eclipse with ANT) solves the problem for me.

I know this is not the exact right place to report a bug in WTP, but perhaps the infos are helpful nevertheless :-)

Greetz,
Andree
Comment 21 Ivan Rei CLA 2010-07-23 10:31:41 EDT
Seams there is a problem with Java 1.6.0 update 21 with Eclipse. Followed the link form the eclipse download page. "Attention Windows users running Java 1.6.0 update 21 with Eclipse. Please follow the instructions here to resolve crashing and freezing issues." http://wiki.eclipse.org/FAQ_How_do_I_run_Eclipse%3F#Oracle.2FSun_VM_1.6.0_21_on_Windows

I did step 2 and 3 from the instructions, the only difference is that I deleted the original dll as it does not specify that.

Also updated WTP to the latest version 3.2.1 (wtp-M-3.2.1-20100716070539).

For now it seems to be working fine. Will be testing it further and will let everyone know if it was resolved.
Comment 22 John Arthorne CLA 2010-07-28 17:05:47 EDT
(In reply to comment #9)
> Created an attachment (id=172651) [details]
> threaddump

This one looks like a possible deadlock between worker 0 and worker 4. If so, it is because TagLibIndex#ClasspathChangeListener#elementChanged is trying to lock an object within a resource change event, but the lock is held by worker 4 which is waiting for the change event. Moving to JST for further analysis.

"Worker-0" prio=6 tid=0x54909800 nid=0x448 waiting for monitor entry [0x5583f000]
   java.lang.Thread.State: BLOCKED (on object monitor)
	at org.eclipse.jst.jsp.core.taglib.TaglibIndex$ClasspathChangeListener.elementChanged(TaglibIndex.java:79)
	at org.eclipse.jdt.internal.core.DeltaProcessor$3.run(DeltaProcessor.java:1557)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)


"Worker-4" prio=6 tid=0x5490c400 nid=0xb74 in Object.wait() [0x5617d000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on <0x40f540c8> (a org.eclipse.core.internal.jobs.Semaphore)
	at org.eclipse.core.internal.jobs.Semaphore.acquire(Semaphore.java:39)
	- locked <0x40f540c8> (a org.eclipse.core.internal.jobs.Semaphore)
	at org.eclipse.core.internal.jobs.OrderedLock.doAcquire(OrderedLock.java:176)
	at org.eclipse.core.internal.jobs.OrderedLock.acquire(OrderedLock.java:110)
	at org.eclipse.core.internal.jobs.OrderedLock.acquire(OrderedLock.java:84)
	at org.eclipse.core.internal.resources.WorkManager.checkIn(WorkManager.java:118)
	at org.eclipse.core.internal.resources.Workspace.prepareOperation(Workspace.java:1914)
	at org.eclipse.core.internal.resources.SaveManager.addParticipant(SaveManager.java:128)
	at org.eclipse.core.internal.resources.Workspace.addSaveParticipant(Workspace.java:290)
	at org.eclipse.jst.jsp.core.internal.JSPCorePlugin.start(JSPCorePlugin.java:80)
Comment 23 Nitin Dahyabhai CLA 2010-07-29 07:31:49 EDT
That makes sense, but the lock acquisition for Worker 0 happens on line 74--line 79 shouldn't be waiting on new locks.  Can I not trust that number?  I'm not sure what the thread's blocking on, otherwise, unless it's a freak occurrence due to an earlier PermGen failure.

Ivan, do you have a .log file you can attach from that session?
Comment 24 Nitin Dahyabhai CLA 2010-07-29 19:37:30 EDT
Created attachment 175532 [details]
proposed patch
Comment 25 Nick Sandonato CLA 2010-08-17 13:16:38 EDT
Patch looks good to me.
Comment 26 Nitin Dahyabhai CLA 2010-08-24 12:16:36 EDT
Applied
Comment 27 David Mansfield CLA 2010-11-30 10:20:29 EST
the target milestone shows 3.2.2 but according to "about" i have 3.2.2 built a few days before the "applied" comment (comment#26).  is there any way to get a WTP build to test the fix against current helios?
Comment 28 Nitin Dahyabhai CLA 2010-11-30 16:18:27 EST
(In reply to comment #27)
> the target milestone shows 3.2.2 but according to "about" i have 3.2.2 built a
> few days before the "applied" comment (comment#26).  is there any way to get a
> WTP build to test the fix against current helios?

Current Helios, SR1, should already have it in there.
Comment 29 David Mansfield CLA 2010-12-01 10:29:09 EST
I'm experiencing exactly the symptoms described in this bug w.r.t opening JSP or editing JSP (placing angle brackets in the code causes the hang).  hang lasts 40 seconds or so.

as I mentioned in the previous comment, the date stamps in my build version pre-date the date of the "applied" in comment#26. 

the build id is: Build id: 20100915173744

is there an M build I can test with?
Comment 30 David Mansfield CLA 2010-12-06 11:32:00 EST
after looking at a threaddump, my symptom is the same, my trigger is the same, but the cause may not be the same. 

it seems the "main" thread is processing every JAR in my classpath searching for the taglib descriptor every time I:

- open a jsp
- add/remove a scriptlet tag in a jsp

this processing in the "main" thread blocks all UI interaction

this behaviour is new in Helios.

should I open a different bug for this?
Comment 31 David Mansfield CLA 2010-12-06 11:43:35 EST
okay, my problem is different and is already a different (resolved) bug, bug#326332. thanks for all your help.