Bug 108165 - JDT Hangs (Takes long time) for even simple tasks like save
Summary: JDT Hangs (Takes long time) for even simple tasks like save
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 major with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2005-08-26 14:54 EDT by Prasad Dixit CLA
Modified: 2007-03-26 12:00 EDT (History)
1 user (show)

See Also:


Attachments
Thread dump in debug mode (17.18 KB, text/plain)
2005-08-26 18:44 EDT, Prasad Dixit CLA
no flags Details
Eclipse hangs very very frequently while editing java program (11.18 KB, image/gif)
2005-08-31 14:57 EDT, Prasad Dixit CLA
no flags Details
two thread dumps (19.43 KB, text/plain)
2005-10-13 14:57 EDT, Mike Garrahan CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Prasad Dixit CLA 2005-08-26 14:54:40 EDT
Environment:
I am using eclipse 3.1.0. I have 1gb of memory and fast processor. Windows XP
with service pack 2.

Summary of the problem : 
User operation is blocked for considerable amount of time when working in JDT.

When it happens:
1. Try to edit and then save. (On Save)
2. On autobuild. I have disabled autobuild (with autobuild on most of the time
its hanging)
3. On code assist (Ctrl+space) also, sometimes it takes really long time.
4. I create a new file and open it, i can not start typing immediately, it takes
a while to let me start editing.

I tried running ProcessExplorer (www.sysinternals.com) and it shows that,
MSVCRT.dll and javaw.exe is taking processor times with ThreadState as
Wait:UserRequest.
Comment 1 Olivier Thomann CLA 2005-08-26 14:58:15 EDT
Please try to attach some thread dumps.
Start Eclipse with -debug -consolelog and in the console do a Ctrl + Break when
you find it hangs.
Thanks.
Comment 2 Olivier Thomann CLA 2005-08-26 14:59:29 EDT
Do you use a plain 3.1 drop or you have some other plugins installed?
Comment 3 Prasad Dixit CLA 2005-08-26 15:18:25 EDT
I am using following specific version
Version: 3.1.0
Build id: I20050627-1435

I have additionally IBM jar finder plugin. 

I am seeing this only with 3.1+ versions (including .M7) prior versions (3.0)
does not give this error. I keep getting "User operation is waiting" message all
the time. (even when i do Organize Imports)
Comment 4 Olivier Thomann CLA 2005-08-26 15:32:11 EDT
so then please provide thread dumps.
I use this version of Eclipse every day and I don't experience this kind of hangs.
Comment 5 Prasad Dixit CLA 2005-08-26 18:44:25 EDT
Created attachment 26568 [details]
Thread dump in debug mode
Comment 6 Prasad Dixit CLA 2005-08-26 18:59:57 EDT
Attaching the thread dump file.

I am running eclipse with following parameters

C:\eclipse\3.1_WTP\eclipse.exe  -debug -consolelog -vm 
C:\Programs\java_1.4.2_08\bin\java.exe

One thing i noticed in debug mode with java instead of javaw is that, the 
frequency of non responsive behaviour has reduced alot (i will say 90%). I 
am not sure what could be the reason.

Attached dump is taken when automatic build was going on and it was not 
letting me do the editing. If i double click in the editor, toolbar area of 
eclipse goes white.
Comment 7 Prasad Dixit CLA 2005-08-31 14:57:07 EDT
Created attachment 26731 [details]
Eclipse hangs very very frequently while editing java program

Attached is the screenshot taken when the editor is hung while performing
Ctrl+S (save).
Following is the statck trace when it is hung.

ntdll.dll!KiFastSystemCallRet
kernel32.dll!WaitForSingleObject+0x12
jvm.dll!JVM_FindSignal+0x1a3e0
jvm.dll!JVM_RegisterPerfMethods+0x136e6
jvm.dll!JVM_MonitorWait+0x4f
jvm.dll+0x7137d
jvm.dll!JVM_FindSignal+0x1efef
jvm.dll+0x7128a
jvm.dll+0x74bd9
jvm.dll+0x75b4d
swt-win32-3138.dll!Java_org_eclipse_swt_internal_Callback_reset+0x180
swt-win32-3138.dll!Java_org_eclipse_swt_internal_win32_OS_SendMessageW__II_3I_3I+0x2427

USER32.dll!GetDC+0x14f
USER32.dll!GetWindowLongW+0x127
USER32.dll!DispatchMessageW+0xf
swt-win32-3138.dll!Java_org_eclipse_swt_internal_win32_OS_DispatchMessageW+0x31

jvm.dll+0x7137d
jvm.dll!JVM_FindSignal+0x1efef
jvm.dll+0x7128a
jvm.dll!JVM_RegisterPerfMethods+0x7b09
jvm.dll!JVM_RegisterPerfMethods+0x90bd
jvm.dll!JVM_InvokeMethod+0x7e
java.dll!Java_sun_reflect_NativeMethodAccessorImpl_invoke0+0x15
jvm.dll+0x7137d
jvm.dll!JVM_FindSignal+0x1efef
jvm.dll+0x7128a
jvm.dll+0x77087
jvm.dll+0x77cec
java.exe+0x14bf
java.exe+0x624d
kernel32.dll!RegisterWaitForInputIdle+0x49
Comment 8 Mike Garrahan CLA 2005-10-13 14:57:15 EDT
Created attachment 28249 [details]
two thread dumps

Had a similar problem on Eclipse SDK 3.1.1 + vssplugin 1.6.1, Sun JDK 1.5.0_05,
WinXP Pro SP2.	Attached thread dumps "BEFORE" and "AFTER" differ in thread
"Worker-80," in ZipFile.close() like Prasad Dixit's thread "Worker-30."

My project build path was using several JARs from a remote shared folder. 
Workaround: using local copies of those JARs, the build no longer hangs.
Comment 9 Jerome Lanneluc CLA 2007-03-26 12:00:27 EDT
In 3.3 M6, classpath validation is no longer done on each build (only when this is necessary). 

Please reopen if you see the problem with a build >= 3.3 M6. In this case, please provide steps to reproduce.