Community
Participate
Working Groups
After fresh installs of Ubuntu 14.04 x64, Eclipse Kepler and Java a few days ago Eclipse freezes on the following occasions: - ALWAYS when invoking content assist - often when cutting code (ctrl-x) - sometimes when saving - sometimes for no apparent reason - it'll get into this cycle where it'll hang for a while, come back for a few seconds, hang again, and so on. During these episodes, running `top` on the command line shows it's giving both CPUs a major workout and hogging memory. If I wait it out (which can be minutes, sometimes), it often comes back like nothing happened, but occasionally will complain about being out of memory, the JavaScript proposal generator (or something like that) having taken too long, or exceeding the GC overhead limit. Killing it and restarting resolves the issue, but only for a few minutes, before it starts again. As is, it has become pretty much unusable. Here's what I have tried: - Set Xmx to 2GB in eclipse.ini - Ran on OpenJDK 7, Oracle Java 7 and 8 (all x64) - Reinstalled Eclipse - Downloaded the x86 version of Eclipse and ran it against Oracle Java 8 x86. This works (except the UI looks super ugly, but it has not frozen, except for content assist) Here's the corresponding question on StackOverflow: http://stackoverflow.com/questions/23271877/eclipse-kepler-freezes-on-64-bit-ubuntu
*bump* I think this has sort of slipped through the cracks of the bug report system...
Sravan, can you please investigate this?
Chris, I'm assuming you're using Kepler SR2, was it working well for you before upgrading to Ubuntu 14.04? Also, can you please try with a recent Luna (4.4) build to check if the problem is still there?
Yes, it's SR2. Before upgrading, I was on Ubuntu 12.04, but the 32 bit version. I didn't have any troubles there. I am setting up Luna M7 right now and see if the issue is still present in that. I hope this solves the problem, I really like Eclipse.
Okay, I've been trying Luna M7, and unfortunately, the issue hasn't gone away. I think it may have gotten marginally better, but not by a lot. It still freezes frequently (and will then complain about 'GC overhead limit exceeded'), and there's noticeable lag even on tiny operations like moving the caret position. Btw, I really like the new Luna look&feel. Looks cleaner than Kepler did. :)
This is the stack trace that I've been getting on the console: Exception in thread "org.eclipse.wst.jsdt.internal.ui.text.JavaReconciler" java.lang.OutOfMemoryError: Java heap space at org.eclipse.wst.jsdt.internal.compiler.util.Util.getInputStreamAsCharArray(Util.java:218) at org.eclipse.wst.jsdt.internal.compiler.util.Util.getFileCharContent(Util.java:84) at org.eclipse.wst.jsdt.internal.core.ClassFile.getContents(ClassFile.java:876) at org.eclipse.wst.jsdt.internal.compiler.parser.Parser.parse(Parser.java:6027) at org.eclipse.wst.jsdt.internal.compiler.parser.Parser.parse(Parser.java:5996) at org.eclipse.wst.jsdt.internal.compiler.parser.Parser.dietParse(Parser.java:4601) at org.eclipse.wst.jsdt.internal.core.CompilationUnitProblemFinder.accept(CompilationUnitProblemFinder.java:166) at org.eclipse.wst.jsdt.internal.compiler.lookup.LookupEnvironment.askForBinding(LookupEnvironment.java:287) at org.eclipse.wst.jsdt.internal.compiler.lookup.PackageBinding.getTypeOrPackage(PackageBinding.java:249) at org.eclipse.wst.jsdt.internal.compiler.lookup.Scope.getTypeOrPackage(Scope.java:2156) at org.eclipse.wst.jsdt.internal.compiler.lookup.Scope.getType(Scope.java:1927) at org.eclipse.wst.jsdt.core.infer.InferredType.resolveSuperType(InferredType.java:543) at org.eclipse.wst.jsdt.internal.compiler.lookup.ClassScope.findInferredSupertype(ClassScope.java:671) at org.eclipse.wst.jsdt.internal.compiler.lookup.ClassScope.connectSuperclass(ClassScope.java:473) at org.eclipse.wst.jsdt.internal.compiler.lookup.ClassScope.connectTypeHierarchy(ClassScope.java:540) at org.eclipse.wst.jsdt.internal.compiler.lookup.CompilationUnitScope.connectTypeHierarchy(CompilationUnitScope.java:858) at org.eclipse.wst.jsdt.internal.compiler.lookup.LookupEnvironment.completeTypeBindings(LookupEnvironment.java:492) at org.eclipse.wst.jsdt.internal.core.CompilationUnitProblemFinder.accept(CompilationUnitProblemFinder.java:175) at org.eclipse.wst.jsdt.internal.compiler.lookup.LookupEnvironment.askForBinding(LookupEnvironment.java:287) at org.eclipse.wst.jsdt.internal.compiler.lookup.PackageBinding.getTypeOrPackage(PackageBinding.java:249) at org.eclipse.wst.jsdt.internal.compiler.lookup.Scope.getTypeOrPackage(Scope.java:2156) at org.eclipse.wst.jsdt.internal.compiler.lookup.Scope.getType(Scope.java:1927) at org.eclipse.wst.jsdt.core.infer.InferredType.resolveType(InferredType.java:492) at org.eclipse.wst.jsdt.internal.compiler.ast.LocalDeclaration.resolveVarType(LocalDeclaration.java:138) at org.eclipse.wst.jsdt.internal.compiler.lookup.CompilationUnitScope$DeclarationVisitor.visit(CompilationUnitScope.java:114) at org.eclipse.wst.jsdt.internal.compiler.ast.LocalDeclaration.traverseLocal(LocalDeclaration.java:288) at org.eclipse.wst.jsdt.internal.compiler.ast.LocalDeclaration.traverse(LocalDeclaration.java:281) at org.eclipse.wst.jsdt.internal.compiler.ast.CompilationUnitDeclaration.traverse(CompilationUnitDeclaration.java:627) at org.eclipse.wst.jsdt.internal.compiler.ast.CompilationUnitDeclaration.traverse(CompilationUnitDeclaration.java:613) at org.eclipse.wst.jsdt.internal.compiler.lookup.CompilationUnitScope.buildTypeBindings(CompilationUnitScope.java:449) at org.eclipse.wst.jsdt.internal.compiler.lookup.LookupEnvironment.buildTypeBindings(LookupEnvironment.java:343) at org.eclipse.wst.jsdt.internal.compiler.lookup.LookupEnvironment.buildTypeBindings(LookupEnvironment.java:331)
Thanks for the updates! From the stack trace of the OOME above, this seems to be a problem with JSDT itself. Will transfer the bug to JSDT team for further investigations...
Chris, do you have a specific project or code example that reproduces this problem?
Chris, did you tried to increase memory for your eclipse? You can do this by modifying eclipse.ini file and adding/modifying the following properties in it (my own settings): --launcher.XXMaxPermSize 512m -vmargs -Xms256m -Xmx512m
@Chris Jaun: I'm really only working on one (Javascript) project atm, but on that it happens anywhere, i.e. not only on specific files or places. @Victor Rubezhny: Yes I have, it didn't make a difference. I think it has definitely gotten better with Luna, but it still happens.
I'm changing the target to future and lowered the severity to major since this is better in Luna and we don't have a recreate scenario. If we can get a solid reproduce scenario, we can address this in 3.6.1.
@Chris Jaun: Is there any way I can help? More stacktraces or something?
Chris, it would be great to have a project snippet that allows to reproduce the issue (I know not everybody's allowed to share their projects, but having it handy we get the best chance to address such issues. Also, we don't need whole the project - we need the only part (libraries, javascripts, might be some other files like html or php - whatever it is - that makes the issue reproducible). Of course, any logs (having exceptions) are appreciated - they're also very helpful for us. Knowing the configuration (architecture, JRE/JDK versions and architecture, Eclipse version/Features installed and so on) - also might help to address. Any info you can provide might be helpful potentially. Thanks for advance!
Unfortunately, I can't give you a single snippet that will reproduce it, because it happens anywhere in the project, unrelated to which files I have open. The project is available at https://github.com/chris-33/checkbook-web but I must warn you that being my learning project for Javascript, it's a bit of a mess. It'll probably make your skin crawl. ;) Here is how I'm running Eclipse: Eclipse Luna 4.4 M7 (Build-ID I20140501-0200) Android Development Tools 22.6.3.v201404151837-1123206 (and assorted) Eclipse Git Team Provider 3.4.0.201405051725-m7 Genymotion Eclipse Tools 1.0.3.201403261147 Nodeclipse Core and Node.js 0.15.1.201404300203 including: JSHint Eclipse Integration 0.9.9.20131029-1050 JSON Editor Plugin 0.9.7 Ansi Console 1.3.0.201404020252 Minimalist Jade Editor 0.15.1.201404300203 Nodeclipse ChromeDevTools SDK 0.3.9.201404300203 Nodeclipse Chromium JavaScript Remote Debugger 0.3.9.201404300203 Express 3.2.5 When I opened this bug, I was on Kepler SR2, but since it's gotten better with Luna I have deleted that so I can't give you any more specifics about build numbers and installed plugins. I'm running it on x64 Ubuntu 14.04 against Oracle JDK 1.8. Java -version: java version "1.8.0_05" Java(TM) SE Runtime Environment (build 1.8.0_05-b13) Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode) I've also tried different other JREs (see first post). I'll keep an eye on the error log - with Luna it usually doesn't get to the point where it throws an exception any more, though. It just freezes for a while and then comes back. If one does come up though, I'll be sure to upload it.
Created attachment 243967 [details] Stack trace (GC overhead limit exceeded)
Created attachment 244249 [details] Another, different stack trace (GC overhead limit exceeded)
Created attachment 244327 [details] Another one
I've been seeing it also, particularly when editing very large log files or launching complex projects
Same kind of issue for me when calling autocompletion in Javascript code into a JSP page or Javascript file, or even just hovering with the mouse a JavaScript code. The memory usage is playing the yoyo and Eclipse freezes. It was the same problem at least from Kepler. I switched on Luna because of that, thinking my Eclipse installation was corrupted by some 3rd part puglins. Unfortunately, I'm facing the same issue despite a fresh Luna JEE installation without any superfluities. Here are some errors reported into the Error Log view : org.eclipse.ui Error Fri Aug 29 14:41:12 CEST 2014 Unhandled event loop exception java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Arrays.java:2219) at java.util.ArrayList.grow(ArrayList.java:242) at java.util.ArrayList.ensureExplicitCapacity(ArrayList.java:216) at java.util.ArrayList.ensureCapacityInternal(ArrayList.java:208) at java.util.ArrayList.add(ArrayList.java:440) at org.eclipse.wst.jsdt.internal.compiler.lookup.CompilationUnitScope.mergeWithSuperBinding(CompilationUnitScope.java:676) at org.eclipse.wst.jsdt.internal.compiler.lookup.CompilationUnitScope.buildSuperType(CompilationUnitScope.java:549) at org.eclipse.wst.jsdt.internal.compiler.lookup.CompilationUnitScope.buildTypeBindings(CompilationUnitScope.java:409) at org.eclipse.wst.jsdt.internal.compiler.lookup.LookupEnvironment.buildTypeBindings(LookupEnvironment.java:343) at org.eclipse.wst.jsdt.internal.compiler.lookup.LookupEnvironment.buildTypeBindings(LookupEnvironment.java:327) at org.eclipse.wst.jsdt.internal.codeassist.SelectionEngine.select(SelectionEngine.java:754) at org.eclipse.wst.jsdt.internal.core.Openable.codeSelect(Openable.java:167) at org.eclipse.wst.jsdt.internal.core.CompilationUnit.codeSelect(CompilationUnit.java:330) at org.eclipse.wst.jsdt.web.core.javascript.JsTranslation.getElementsFromJsRange(JsTranslation.java:310) at org.eclipse.wst.jsdt.web.ui.internal.hyperlink.JSDTHyperlinkDetector.detectHyperlinks(JSDTHyperlinkDetector.java:176) at org.eclipse.ui.texteditor.HyperlinkDetectorRegistry$HyperlinkDetectorDelegate.detectHyperlinks(HyperlinkDetectorRegistry.java:80) at org.eclipse.jface.text.hyperlink.HyperlinkManager.findHyperlinks(HyperlinkManager.java:289) at org.eclipse.jface.text.hyperlink.HyperlinkManager.findHyperlinks(HyperlinkManager.java:261) at org.eclipse.jface.text.hyperlink.HyperlinkManager.mouseMove(HyperlinkManager.java:469) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:212) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4172) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579) org.eclipse.ui Error Fri Aug 29 14:56:40 CEST 2014 Unhandled event loop exception org.eclipse.e4.core.di.InjectionException: java.lang.OutOfMemoryError: Java heap space at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:62) at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:247) at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:229) at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132) at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:149) at org.eclipse.core.commands.Command.executeWithChecks(Command.java:499) at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508) at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:210) at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.executeCommand(KeyBindingDispatcher.java:286) at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.press(KeyBindingDispatcher.java:507) at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.processKeyEvent(KeyBindingDispatcher.java:558) at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.filterKeySequenceBindings(KeyBindingDispatcher.java:378) at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.access$0(KeyBindingDispatcher.java:324) at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher$KeyDownFilter.handleEvent(KeyBindingDispatcher.java:86) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1262) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1060) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1085) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1070) at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1112) at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1108) at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1529) at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:4722) at org.eclipse.swt.widgets.Canvas.WM_CHAR(Canvas.java:343) at org.eclipse.swt.widgets.Control.windowProc(Control.java:4610) at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:339) at org.eclipse.swt.widgets.Display.windowProc(Display.java:5023) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2549) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:135) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:382) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:236) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603) at org.eclipse.equinox.launcher.Main.run(Main.java:1465) at org.eclipse.equinox.launcher.Main.main(Main.java:1438) Caused by: java.lang.OutOfMemoryError: Java heap space eclipse.buildId=4.4.0.I20140606-1215 java.version=1.7.0_51 java.vendor=Oracle Corporation BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=fr_FR Framework arguments: -product org.eclipse.epp.package.jee.product Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product My project has the following natures : <natures> <nature>org.eclipse.jdt.core.javanature</nature> <nature>com.sysdeo.eclipse.tomcat.tomcatnature</nature> <nature>org.eclipse.wst.common.project.facet.core.nature</nature> </natures> If I deactivate JavaScript facet, of course it does not occurs. So where does this come?...
I have the same problem. I worked previously with Eclipse x84 and now on x64 I can't do nothing with Javascript files. I've tried with Kepler, Luna, Java 7 and Java 8. Eclipse is not usable at the moment on x64 with Javascript source files.
I'm having the same problem. Eclipse sporadically hangs, usually while typing in a javascript file. But editing javascript files is what I have been using eclipse mostly for lately so it could be a coincidence. Kepler SR1 64 bit Ubuntu 14.04
The same issue but I have more details to add. * The bug appears in Kepler and Luna * The bug persists even after updating kernel to 3.19
Could anybody, please, attach an example project and describe Eclipse's configuration (installed products, features, additional plug-ins, memory any any other special settings and required changes in preferences if any) which allows to reproduce the issue? I suppose that it should be pretty bug project or a javascript file to lead it not only to performance glitches, but to memory exceeding. But I don't see such issues on my test projects.
Created attachment 250847 [details] Sample project
I think I have isolated a code that seems to be problematic : var top = screen.height / 2; If you remove the division by 2, it's ok. If you add it back, the memory monitor is playing the yo-yo when you're hovering any JS statement, during something like 2 min. In the sample project, this does not freeze Eclipse but I think that if you have a lot more JS files into your project, the memory consumption phenomenon is amplified and finally freezes Eclipse... This is just a guess, at the beginning I thought it was because of the quantity of JS code but finally, it seems to be really specific to that kind of code.
Fixed in master: http://git.eclipse.org/c/jsdt/webtools.jsdt.git/commit/?id=f6bd2c69ce4a8036a52ddcee3bacc9f65ac8f285
Fixed for 3.7
*** Bug 448231 has been marked as a duplicate of this bug. ***
I can't confirm. Just updated to Eclipse Mars, and after ~30 minutes of work, it started freezing exactly like before. As a side note, Mars is running me at 100% CPU load, constantly...
To me this seems to be good because the memory level stops moving quickly when hovering JS elements. Then I can consider there's an effective improvement. I've just tested with the sample project I had supplied. I'll test soon with a more complete and real project.
Chris, could you, please, make a couple of stacktraces and attach them here while your eclipse is in such a freeze state? (It could be not too easy to catch the moment of "bad" activity, so that's why I'm asking about "a number of" stacktraces). This could be done, for example, with jstack utility: jstack -F PID_OF_YOUR_JAVA_PROCESS >~/stacktrace.log Feel free to erase any private info before attaching the logs. Thanks in advance.
Please find attached the stack trace (file) dumped using jstack, while below eclipse was 'not reponding' while trying to lookup javascript reference, I believe by ctrl+spacebar. Eventually it returned to responsive mode, after 15mins or so. I was able to type, debug, and do normal stuff, but would hanga again at eithe ctrl+space or ctrl+click (or I believe also f3 lookup) Heap was set to 4G and was hovering around 2G around stack dumping time. !SESSION 2016-04-29 13:45:37.746 ----------------------------------------------- eclipse.buildId=4.5.2.M20160212-1500 java.version=1.8.0_92 java.vendor=Oracle Corporation BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US Framework arguments: -product org.eclipse.epp.package.java.product Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.java.product
Created attachment 261381 [details] Stack from Mars