Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 413870

Summary: Intermittent hanging when editing java files in eclipse
Product: [Eclipse Project] JDT Reporter: tony tony <xxteknolustxx>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: jarthana, timo.kinnunen
Version: 3.7.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard: stalebug
Attachments:
Description Flags
recent_eclipse_hang_7_27_2013_thread_dump
none
Threaddump of Eclipse "Not Responding" while a harddrive is powering up none

Description tony tony CLA 2013-07-27 19:35:53 EDT
Hello,

I'm seeing intermittent freezing/hanging behavior when using eclipse (I have never experienced this before with eclipse), unresponsive behavior for 1-2 minutes in certain cases.

I took two thread dumps while eclipse was freezing, please see attached (I actually posted a forum note about this first, where a user instructed me to file a bug report, see http://www.eclipse.org/forums/index.php/t/492933/ for thread dump attachments and users recommendation).

There aren't really steps to reproduce, sometimes it occurs when I'm not even doing anything to a java file. Also note, the file that was in focus was already saved. Note, my machine is still functioning properly while the unresponsive behavior occurs (no high memory or cpu usage during behavior).

Please let me know of any additional debugging I can do to figure this out or additional logging I can turn on to get more information.

See some of my machine/application specs below

Thank you!


Windows 7 (64 bit), Intel core2 extreme x9100 3.06ghz, 8gb of ram

Eclipse java EE web developer
version: indigo service release 2
build id: 20120216-1857
The project I have been working in is about 20-30 files (android/java project)

eclipse.ini

-startup
plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.100.v20110502
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
512m
--launcher.defaultAction
openFile
-vm
C:\Program Files\Java\jdk1.7.0_21\bin\javaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms1000m
-Xmx2000m
Comment 1 tony tony CLA 2013-07-27 21:35:18 EDT
Created attachment 233856 [details]
recent_eclipse_hang_7_27_2013_thread_dump
Comment 2 tony tony CLA 2013-07-27 21:38:29 EDT
Again eclipse was hanging, however lately I've been unable to get multiple thread dumps during the intermittent hang.

When I try to use jstack to attach to the java process from eclipse, jstack will just hang (used jstack -F <pid> >> dump.txt).

See recent attachment, it is the thread dump right as eclipse becomes usable again.

Below is what jstack (jdk 1.7.0_21) threw up at me:

Attaching to process ID 3416, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 23.21-b01
sun.jvm.hotspot.debugger.DebuggerException: Windbg Error: ReadVirtual failed!
        at sun.jvm.hotspot.debugger.windbg.WindbgDebuggerLocal.readBytesFromProc
ess0(Native Method)
        at sun.jvm.hotspot.debugger.windbg.WindbgDebuggerLocal.readBytesFromProc
ess(WindbgDebuggerLocal.java:485)
        at sun.jvm.hotspot.debugger.DebuggerBase$Fetcher.fetchPage(DebuggerBase.
java:76)
        at sun.jvm.hotspot.debugger.PageCache.getPage(PageCache.java:178)
        at sun.jvm.hotspot.debugger.PageCache.getLong(PageCache.java:100)
        at sun.jvm.hotspot.debugger.DebuggerBase.readCInteger(DebuggerBase.java:
356)
        at sun.jvm.hotspot.debugger.DebuggerBase.readAddressValue(DebuggerBase.j
ava:454)
        at sun.jvm.hotspot.debugger.windbg.WindbgDebuggerLocal.readAddress(Windb
gDebuggerLocal.java:316)
        at sun.jvm.hotspot.debugger.windbg.WindbgAddress.getAddressAt(WindbgAddr
ess.java:72)
        at sun.jvm.hotspot.debugger.cdbg.basic.amd64.AMD64CFrame.sender(AMD64CFr
ame.java:55)
        at sun.jvm.hotspot.tools.PStack.run(PStack.java:161)
        at sun.jvm.hotspot.tools.PStack.run(PStack.java:53)
        at sun.jvm.hotspot.tools.PStack.run(PStack.java:48)
        at sun.jvm.hotspot.tools.JStack.run(JStack.java:60)
        at sun.jvm.hotspot.tools.Tool.start(Tool.java:221)
        at sun.jvm.hotspot.tools.JStack.main(JStack.java:86)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at sun.tools.jstack.JStack.runJStackTool(JStack.java:136)
        at sun.tools.jstack.JStack.main(JStack.java:102)
sun.jvm.hotspot.debugger.UnalignedAddressException: f0809abb
        at sun.jvm.hotspot.debugger.windbg.WindbgDebuggerLocal$1.checkAlignment(
WindbgDebuggerLocal.java:104)
        at sun.jvm.hotspot.debugger.DebuggerBase.readCInteger(DebuggerBase.java:
349)
        at sun.jvm.hotspot.debugger.DebuggerBase.readAddressValue(DebuggerBase.j
ava:454)
        at sun.jvm.hotspot.debugger.windbg.WindbgDebuggerLocal.readAddress(Windb
gDebuggerLocal.java:316)
        at sun.jvm.hotspot.debugger.windbg.WindbgAddress.getAddressAt(WindbgAddr
ess.java:72)
        at sun.jvm.hotspot.debugger.cdbg.basic.amd64.AMD64CFrame.sender(AMD64CFr
ame.java:55)
        at sun.jvm.hotspot.tools.PStack.run(PStack.java:161)
        at sun.jvm.hotspot.tools.PStack.run(PStack.java:53)
        at sun.jvm.hotspot.tools.PStack.run(PStack.java:48)
        at sun.jvm.hotspot.tools.JStack.run(JStack.java:60)
        at sun.jvm.hotspot.tools.Tool.start(Tool.java:221)
        at sun.jvm.hotspot.tools.JStack.main(JStack.java:86)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at sun.tools.jstack.JStack.runJStackTool(JStack.java:136)
        at sun.tools.jstack.JStack.main(JStack.java:102)
sun.jvm.hotspot.debugger.UnalignedAddressException: 6461140000000065
        at sun.jvm.hotspot.debugger.windbg.WindbgDebuggerLocal$1.checkAlignment(
WindbgDebuggerLocal.java:104)
        at sun.jvm.hotspot.debugger.DebuggerBase.readCInteger(DebuggerBase.java:
349)
        at sun.jvm.hotspot.debugger.DebuggerBase.readAddressValue(DebuggerBase.j
ava:454)
        at sun.jvm.hotspot.debugger.windbg.WindbgDebuggerLocal.readAddress(Windb
gDebuggerLocal.java:316)
        at sun.jvm.hotspot.debugger.windbg.WindbgAddress.getAddressAt(WindbgAddr
ess.java:72)
        at sun.jvm.hotspot.debugger.cdbg.basic.amd64.AMD64CFrame.sender(AMD64CFr
ame.java:55)
        at sun.jvm.hotspot.tools.PStack.run(PStack.java:161)
        at sun.jvm.hotspot.tools.PStack.run(PStack.java:53)
        at sun.jvm.hotspot.tools.PStack.run(PStack.java:48)
        at sun.jvm.hotspot.tools.JStack.run(JStack.java:60)
        at sun.jvm.hotspot.tools.Tool.start(Tool.java:221)
        at sun.jvm.hotspot.tools.JStack.main(JStack.java:86)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at sun.tools.jstack.JStack.runJStackTool(JStack.java:136)
        at sun.tools.jstack.JStack.main(JStack.java:102)
Comment 3 Jay Arthanareeswaran CLA 2013-07-29 00:13:46 EDT
(In reply to comment #2)
> Again eclipse was hanging, however lately I've been unable to get multiple
> thread dumps during the intermittent hang.

This one is different from the suspects in other dumps you shared. From the previous ones, it would appear that there is some file operation (external to the workspace) that is causing some delay. Could that be some resource being accessed over a network, such as a JVM library?
Comment 4 Timo Kinnunen CLA 2013-07-29 03:35:30 EDT
Linked folders from a secondary harddrive that has been powered down due to inactivity could also do that, although that should hang for about 5 seconds rather than minutes.
Comment 5 tony tony CLA 2013-07-30 19:37:17 EDT
So, I made the following changes to my eclipse.ini


-vm
C:/Program Files/Java/jdk1.7.0_21/bin/java.exe
-vmargs
-Dosgi.requiredJavaVersion=1.6

I was using javaw.exe before and the osgi required version was 1.5 and I changed it to 1.6


I haven't seen a hang yet since these changes.

Regarding - "This one is different from the suspects in other dumps you shared. From the previous ones, it would appear that there is some file operation (external to the workspace) that is causing some delay. Could that be some resource being accessed over a network, such as a JVM library?"

- Eclipse IS stored on a drive that is not the boot partition drive, however nothing within the project file is referenced outside of the eclipse workspace, and the workspace is on the same drive.

- Now I do have other projects in my workspace that are on OTHER non boot partition drives (a external hd in one case), can this affect my work in projects on the same drive as eclipse?

Thanks!
Comment 6 Jay Arthanareeswaran CLA 2013-07-31 00:45:51 EDT
(In reply to comment #5)
> - Now I do have other projects in my workspace that are on OTHER non boot
> partition drives (a external hd in one case), can this affect my work in
> projects on the same drive as eclipse?
>

I have seen in my own experience that having resources stored in an external device does slow things down (in my case it was an SSD). But I don't think it should cause a hang. Please continue to observe and update us when you see the problem again. I will keep this bug open for some more time.
Comment 7 Timo Kinnunen CLA 2013-07-31 21:55:51 EDT
Created attachment 234002 [details]
Threaddump of Eclipse "Not Responding" while a harddrive is powering up

The brief hang is caused by the main thread opening a file while handling a keypress event. I have JDK source code folder on another drive and this happens when pressing F3 to open e.g. CharSequence.class from String.class. Changing power management options to shut down harddrives after 3 minutes instead of 20 minutes of inactivity makes reproducing this easier.
Comment 8 Timo Kinnunen CLA 2013-07-31 22:13:23 EDT
The same situation can also show up as content assist timing out and leaving an error message:

The 'org.eclipse.recommenders.subwords.rcp.category' proposal computer from the 'org.eclipse.recommenders.completion.rcp.subwords' plug-in did not complete normally. The extension took too long to return from the 'computeCompletionProposals()' operation.
Comment 9 Eclipse Genie CLA 2020-03-18 18:22:18 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.