Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Out of memory #319

Closed
floitschG opened this issue Nov 3, 2011 · 10 comments
Closed

Out of memory #319

floitschG opened this issue Nov 3, 2011 · 10 comments
Assignees
Labels
P1 A high priority bug; for example, a single project is unusable or has many test failures

Comments

@floitschG
Copy link
Contributor

Editor became really slow and in the end became unusable. Wasn't even able to "Send Feedback" anymore. I really don't know if the attached debug-output below can help, but just in case.

Code Assist Stats (0 proposals)
Code Assist (setup): 0
Code Assist (collect): 1851
Code Assist (sort): 3
!SESSION 2011-11-03 14:03:18.384 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0-google-v4
java.vendor=Google Inc.
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Command-line arguments: -os linux -ws gtk -arch x86_64 -consoleLog -data workspace

!ENTRY com.google.dart.indexer 4 0 2011-11-03 14:06:20.928
!MESSAGE Unexpected Exception
!STACK 0
com.google.dart.indexer.workspace.index.TargetIndexingFailed: Failed to index file (first attempt): file:/usr/local/google/floitsch/code/dart/dart/frog/code_writer.dart
        at com.google.dart.indexer.workspace.index.WorkspaceIndexer.indexTarget(WorkspaceIndexer.java:482)
        at com.google.dart.indexer.workspace.index.WorkspaceIndexer.doIndexPendingFiles(WorkspaceIndexer.java:407)
        at com.google.dart.indexer.workspace.index.WorkspaceIndexer.indexPendingFiles(WorkspaceIndexer.java:234)
        at com.google.dart.indexer.workspace.driver.WorkspaceIndexingDriver$IndexingJob.run(WorkspaceIndexingDriver.java:60)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded
        at java.io.File.getParentFile(File.java:463)
        at org.eclipse.core.internal.filesystem.local.LocalFile.getParent(LocalFile.java:195)
        at org.eclipse.core.internal.localstore.FileSystemResourceManager.findLinkedResourcesPaths(FileSystemResourceManager.java:158)
        at org.eclipse.core.internal.localstore.FileSystemResourceManager.allPathsForLocationNonCanonical(FileSystemResourceManager.java:124)
        at org.eclipse.core.internal.localstore.FileSystemResourceManager.allPathsForLocation(FileSystemResourceManager.java:62)
        at org.eclipse.core.internal.localstore.FileSystemResourceManager.allResourcesFor(FileSystemResourceManager.java:216)
        at org.eclipse.core.internal.resources.WorkspaceRoot.findFilesForLocationURI(WorkspaceRoot.java:113)
        at org.eclipse.core.internal.resources.WorkspaceRoot.findFilesForLocationURI(WorkspaceRoot.java:104)
        at com.google.dart.tools.core.internal.util.ResourceUtil.getResources(ResourceUtil.java:106)
        at com.google.dart.tools.core.internal.util.ResourceUtil.getResource(ResourceUtil.java:61)
        at com.google.dart.tools.core.internal.util.ResourceUtil.getResource(ResourceUtil.java:76)
        at com.google.dart.tools.core.internal.model.DartLibraryImpl.isLocal(DartLibraryImpl.java:467)
        at com.google.dart.tools.core.utilities.bindings.BindingUtils.getLibraryCache(BindingUtils.java:936)
        at com.google.dart.tools.core.utilities.bindings.BindingUtils.getImmediateTypes(BindingUtils.java:917)
        at com.google.dart.tools.core.utilities.bindings.BindingUtils.getDartElement(BindingUtils.java:359)
        at com.google.dart.tools.core.utilities.bindings.BindingUtils.getDartElement(BindingUtils.java:451)
        at com.google.dart.tools.core.internal.indexer.contributor.AbstractDartContributor.getDartElement(AbstractDartContributor.java:133)
        at com.google.dart.tools.core.internal.indexer.contributor.MethodInvocationContributor.processMethod(MethodInvocationContributor.java:139)
        at com.google.dart.tools.core.internal.indexer.contributor.MethodInvocationContributor.visitMethodInvocation(MethodInvocationContributor.java:78)
        at com.google.dart.tools.core.internal.indexer.contributor.MethodInvocationContributor.visitMethodInvocation(MethodInvocationContributor.java:1)
        at com.google.dart.compiler.ast.DartMethodInvocation.accept(DartMethodInvocation.java:77)
        at com.google.dart.compiler.ast.DartVariable.visitChildren(DartVariable.java:56)
        at com.google.dart.tools.core.dom.visitor.ChildVisitor.visitVariable(ChildVisitor.java:129)
        at com.google.dart.tools.core.dom.visitor.ChildVisitor.visitVariable(ChildVisitor.java:1)
        at com.google.dart.compiler.ast.DartVariable.accept(DartVariable.java:62)
        at com.google.dart.tools.core.internal.indexer.contributor.AbstractDartContributor.visitChildren(AbstractDartContributor.java:302)
        at com.google.dart.tools.core.internal.indexer.contributor.AbstractDartContributor.visitNode(AbstractDartContributor.java:89)
        at com.google.dart.tools.core.internal.indexer.contributor.AbstractDartContributor.visitNode(AbstractDartContributor.java:1)
        at com.google.dart.compiler.ast.DartNodeTraverser.visitDeclaration(DartNodeTraverser.java:87)
        at com.google.dart.compiler.ast.DartNodeTraverser.visitVariable(DartNodeTraverser.java:396)
        at com.google.dart.compiler.ast.DartVariable.accept(DartVariable.java:62)
        at com.google.dart.compiler.ast.DartNodeTraverser.visit(DartNodeTraverser.java:413)

!ENTRY com.google.dart.tools.core 1 0 2011-11-03 14:06:22.551
!MESSAGE Exception caught while building file:/usr/local/google/floitsch/code/dart/dart/frog/leg/elements/elements.dart
!STACK 0
java.lang.OutOfMemoryError: GC overhead limit exceeded
        at com.google.dart.compiler.parser.DartScanner$Position.clone(DartScanner.java:38)
        at com.google.dart.compiler.parser.DartScanner.advance(DartScanner.java:682)
        at com.google.dart.compiler.parser.DartScanner.select(DartScanner.java:1354)
        at com.google.dart.compiler.parser.DartScanner.scanToken(DartScanner.java:1232)
        at com.google.dart.compiler.parser.DartScanner.scanFile(DartScanner.java:752)
        at com.google.dart.compiler.parser.DartScanner.<init>(DartScanner.java:490)
        at com.google.dart.compiler.parser.DartScanner.<init>(DartScanner.java:466)
        at com.google.dart.compiler.parser.DartScannerParserContext.createScanner(DartScannerParserContext.java:182)
        at com.google.dart.compiler.parser.DartScannerParserContext.<init>(DartScannerParserContext.java:38)
        at com.google.dart.compiler.parser.DartScannerParserContext.<init>(DartScannerParserContext.java:32)
        at com.google.dart.compiler.ast.LibraryUnit.parseApiUnit(LibraryUnit.java:433)
        at com.google.dart.compiler.ast.LibraryUnit.loadApi(LibraryUnit.java:267)
        at com.google.dart.compiler.DartCompiler$Compiler.parseOutOfDateFiles(DartCompiler.java:245)
        at com.google.dart.compiler.DartCompiler$Compiler.updateAndResolve(DartCompiler.java:201)
        at com.google.dart.compiler.DartCompiler$Compiler.compile(DartCompiler.java:166)
        at com.google.dart.compiler.DartCompiler$Compiler.access$3(DartCompiler.java:163)
        at com.google.dart.compiler.DartCompiler.compileLib(DartCompiler.java:1110)
        at com.google.dart.compiler.DartCompiler.compileLib(DartCompiler.java:1086)
        at com.google.dart.tools.core.utilities.compiler.DartCompilerUtilities.secureCompileLib(DartCompilerUtilities.java:737)
        at com.google.dart.tools.core.internal.builder.DartBuilder.buildLibrary(DartBuilder.java:356)
        at com.google.dart.tools.core.internal.builder.DartBuilder.buildAllApplications(DartBuilder.java:275)
        at com.google.dart.tools.core.internal.builder.DartBuilder.build(DartBuilder.java:249)
        at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:728)
        at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
        at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199)
        at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:239)
        at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292)
        at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
        at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:295)
        at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:351)
        at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:374)
        at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)

!ENTRY org.eclipse.ui 4 0 2011-11-03 14:06:22.552
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.OutOfMemoryError: GC overhead limit exceeded
        at org.eclipse.swt.custom.StyledText.getSelectionRange(StyledText.java:4646)
        at org.eclipse.jface.text.TextViewer.getSelectedRange(TextViewer.java:2366)
        at org.eclipse.jface.text.TextViewer.getSelection(TextViewer.java:2576)
        at org.eclipse.ui.texteditor.AbstractTextEditor.doGetSelection(AbstractTextEditor.java:2960)
        at org.eclipse.ui.texteditor.AbstractTextEditor$SelectionProvider.getSelection(AbstractTextEditor.java:1483)
        at org.eclipse.ui.internal.editors.quickdiff.QuickDiffRestoreAction.getSelection(QuickDiffRestoreAction.java:138)
        at org.eclipse.ui.internal.editors.quickdiff.QuickDiffRestoreAction.computeLine(QuickDiffRestoreAction.java:170)
        at org.eclipse.ui.internal.editors.quickdiff.QuickDiffRestoreAction.computeEnablement(QuickDiffRestoreAction.java:123)
        at org.eclipse.ui.internal.editors.quickdiff.RevertBlockAction.computeEnablement(RevertBlockAction.java:47)
        at org.eclipse.ui.internal.editors.quickdiff.QuickDiffRestoreAction.update(QuickDiffRestoreAction.java:99)
        at org.eclipse.ui.internal.editors.quickdiff.CompositeRevertAction.update(CompositeRevertAction.java:65)
        at org.eclipse.ui.internal.editors.quickdiff.CompositeRevertAction.selectionChanged(CompositeRevertAction.java:80)
        at org.eclipse.jface.text.TextViewer.firePostSelectionChanged(TextViewer.java:2749)
        at org.eclipse.jface.text.TextViewer.firePostSelectionChanged(TextViewer.java:2697)
        at org.eclipse.jface.text.TextViewer$5.run(TextViewer.java:2676)
        at org.eclipse.swt.widgets.Display.timerProc(Display.java:4154)
        at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native Method)
        at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:2258)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3207)
        at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
        at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
        at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
        at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
        at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
        at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
        at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
        at com.google.dart.tools.deploy.DartIDEApplication.start(DartIDEApplication.java:44)
        at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)

!ENTRY com.google.dart.tools.core 1 0 2011-11-03 14:06:58.079
!MESSAGE Exception caught while building file:/usr/local/google/floitsch/code/dart/dart/frog/lang.dart
!STACK 0
java.lang.OutOfMemoryError: GC overhead limit exceeded
        at java.util.ArrayList.<init>(ArrayList.java:132)
        at com.google.dart.compiler.parser.DartScanner.<init>(DartScanner.java:474)
        at com.google.dart.compiler.parser.DartScanner.<init>(DartScanner.java:466)
        at com.google.dart.compiler.parser.DartScannerParserContext.createScanner(DartScannerParserContext.java:182)
        at com.google.dart.compiler.parser.DartScannerParserContext.<init>(DartScannerParserContext.java:38)
        at com.google.dart.compiler.parser.DartScannerParserContext.<init>(DartScannerParserContext.java:32)
        at com.google.dart.compiler.ast.LibraryUnit.parseApiUnit(LibraryUnit.java:433)
        at com.google.dart.compiler.ast.LibraryUnit.loadApi(LibraryUnit.java:267)
        at com.google.dart.compiler.DartCompiler$Compiler.parseOutOfDateFiles(DartCompiler.java:245)
        at com.google.dart.compiler.DartCompiler$Compiler.updateAndResolve(DartCompiler.java:201)
        at com.google.dart.compiler.DartCompiler$Compiler.compile(DartCompiler.java:166)
        at com.google.dart.compiler.DartCompiler$Compiler.access$3(DartCompiler.java:163)
        at com.google.dart.compiler.DartCompiler.compileLib(DartCompiler.java:1110)
        at com.google.dart.compiler.DartCompiler.compileLib(DartCompiler.java:1086)
        at com.google.dart.tools.core.utilities.compiler.DartCompilerUtilities.secureCompileLib(DartCompilerUtilities.java:737)
        at com.google.dart.tools.core.internal.builder.DartBuilder.buildLibrary(DartBuilder.java:356)
        at com.google.dart.tools.core.internal.builder.DartBuilder.buildAllApplications(DartBuilder.java:275)
        at com.google.dart.tools.core.internal.builder.DartBuilder.build(DartBuilder.java:249)
        at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:728)
        at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
        at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199)
        at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:239)
        at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292)
        at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
        at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:295)
        at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:351)
        at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:374)
        at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
        at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

!ENTRY com.google.dart.indexer 4 0 2011-11-03 14:07:14.228
!MESSAGE Unexpected Exception
!STACK 0
com.google.dart.indexer.workspace.index.TargetIndexingFailed: Failed to index file (first attempt): file:/usr/local/google/floitsch/code/dart/dart/frog/gen.dart
        at com.google.dart.indexer.workspace.index.WorkspaceIndexer.indexTarget(WorkspaceIndexer.java:482)
        at com.google.dart.indexer.workspace.index.WorkspaceIndexer.doIndexPendingFiles(WorkspaceIndexer.java:407)
        at com.google.dart.indexer.workspace.index.WorkspaceIndexer.indexPendingFiles(WorkspaceIndexer.java:234)
        at com.google.dart.indexer.workspace.driver.WorkspaceIndexingDriver$IndexingJob.run(WorkspaceIndexingDriver.java:60)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "com.google.dart.tools.ui.internal.text.functions.DartReconciler" java.lang.OutOfMemoryError: GC overhead limit exceeded

!ENTRY org.eclipse.ui 4 4 2011-11-03 14:07:23.807
!MESSAGE Save Failed

!ENTRY org.eclipse.ui 2 0 2011-11-03 14:07:23.808
!MESSAGE Save Failed
!STACK 0
java.lang.OutOfMemoryError: GC overhead limit exceeded

!ENTRY com.google.dart.indexer 4 0 2011-11-03 14:08:02.702
!MESSAGE Unexpected Exception
!STACK 0
com.google.dart.indexer.workspace.index.TargetIndexingFailed: Failed to index file (first attempt): file:/usr/local/google/floitsch/code/dart/dart/frog/library.dart
        at com.google.dart.indexer.workspace.index.WorkspaceIndexer.indexTarget(WorkspaceIndexer.java:482)
        at com.google.dart.indexer.workspace.index.WorkspaceIndexer.doIndexPendingFiles(WorkspaceIndexer.java:407)
        at com.google.dart.indexer.workspace.index.WorkspaceIndexer.indexPendingFiles(WorkspaceIndexer.java:234)
        at com.google.dart.indexer.workspace.driver.WorkspaceIndexingDriver$IndexingJob.run(WorkspaceIndexingDriver.java:60)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded

!ENTRY com.google.dart.indexer 4 0 2011-11-03 14:08:07.217
!MESSAGE Unexpected Exception
!STACK 0
com.google.dart.indexer.workspace.index.TargetIndexingFailed: Failed to index file (first attempt): file:/usr/local/google/floitsch/code/dart/dart/frog/member.dart
        at com.google.dart.indexer.workspace.index.WorkspaceIndexer.indexTarget(WorkspaceIndexer.java:482)
        at com.google.dart.indexer.workspace.index.WorkspaceIndexer.doIndexPendingFiles(WorkspaceIndexer.java:407)
        at com.google.dart.indexer.workspace.index.WorkspaceIndexer.indexPendingFiles(WorkspaceIndexer.java:234)
        at com.google.dart.indexer.workspace.driver.WorkspaceIndexingDriver$IndexingJob.run(WorkspaceIndexingDriver.java:60)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded

!ENTRY com.google.dart.tools.core 1 0 2011-11-03 14:08:11.747
!MESSAGE Exception caught while building file:/usr/local/google/floitsch/code/dart/dart/frog/leg/scanner.dart
!STACK 0
java.lang.OutOfMemoryError: GC overhead limit exceeded

!ENTRY com.google.dart.indexer 4 0 2011-11-03 14:08:30.646
!MESSAGE Unexpected Exception
!STACK 0
com.google.dart.indexer.workspace.index.TargetIndexingFailed: Failed to index file (first attempt): file:/usr/local/google/floitsch/code/dart/dart/frog/options.dart
        at com.google.dart.indexer.workspace.index.WorkspaceIndexer.indexTarget(WorkspaceIndexer.java:482)
        at com.google.dart.indexer.workspace.index.WorkspaceIndexer.doIndexPendingFiles(WorkspaceIndexer.java:407)
        at com.google.dart.indexer.workspace.index.WorkspaceIndexer.indexPendingFiles(WorkspaceIndexer.java:234)
        at com.google.dart.indexer.workspace.driver.WorkspaceIndexingDriver$IndexingJob.run(WorkspaceIndexingDriver.java:60)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded

!ENTRY com.google.dart.indexer 4 0 2011-11-03 14:08:38.050
!MESSAGE Unexpected Exception
!STACK 0
com.google.dart.indexer.workspace.index.TargetIndexingFailed: Failed to index file (first attempt): file:/usr/local/google/floitsch/code/dart/dart/frog/parser.dart
        at com.google.dart.indexer.workspace.index.WorkspaceIndexer.indexTarget(WorkspaceIndexer.java:482)
        at com.google.dart.indexer.workspace.index.WorkspaceIndexer.doIndexPendingFiles(WorkspaceIndexer.java:407)
        at com.google.dart.indexer.workspace.index.WorkspaceIndexer.indexPendingFiles(WorkspaceIndexer.java:234)
        at com.google.dart.indexer.workspace.driver.WorkspaceIndexingDriver$IndexingJob.run(WorkspaceIndexingDriver.java:60)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded

!ENTRY com.google.dart.tools.core 1 0 2011-11-03 14:08:39.502
!MESSAGE Exception caught while building file:/usr/local/google/floitsch/code/dart/dart/frog/leg/scanner_implementation.dart
!STACK 0
java.lang.OutOfMemoryError: GC overhead limit exceeded

@stevemessick
Copy link
Contributor

It would be helpful to know the number of files open in the Libraries view, how many editor tabs were open (just a guess would help), and an approximate total size in bytes of the files.


Removed Priority-Medium label.
Added Priority-High, Usability labels.

@floitschG
Copy link
Contributor Author

number of files open: the leg library. (more or less 40 files) + the frog library (another 50? files).
number of open editor tabs: 5? (rather small number).
leg: $ find . -name '.dart' | xargs cat | wc
   6930 17310 244370
frog (includes leg) $ find . -name '
.dart' | xargs cat | wc
  50056 158705 1476293

@floitschG
Copy link
Contributor Author

Just happened again.
This time I payed attention: 3 editor views with 3, (5 + 8), 1 files open.
Indexer was stuck at 0% for some time. However somehow it was able to recover.

Here is just part of the debug-out.

!ENTRY com.google.dart.indexer 4 0 2011-11-03 15:53:52.857
!MESSAGE Unexpected Exception
!STACK 0
com.google.dart.indexer.workspace.index.TargetIndexingFailed: Failed to index file (first attempt): file:/usr/local/google/floitsch/code/dart/dart/frog/leg/ssa/tracer.dart
        at com.google.dart.indexer.workspace.index.WorkspaceIndexer.indexTarget(WorkspaceIndexer.java:482)
        at com.google.dart.indexer.workspace.index.WorkspaceIndexer.doIndexPendingFiles(WorkspaceIndexer.java:407)
        at com.google.dart.indexer.workspace.index.WorkspaceIndexer.indexPendingFiles(WorkspaceIndexer.java:234)
        at com.google.dart.indexer.workspace.driver.WorkspaceIndexingDriver$IndexingJob.run(WorkspaceIndexingDriver.java:60)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded
        at com.google.dart.compiler.parser.DartScanner$Position.clone(DartScanner.java:38)
        at com.google.dart.compiler.parser.DartScanner.advance(DartScanner.java:677)
        at com.google.dart.compiler.parser.DartScanner.select(DartScanner.java:1354)
        at com.google.dart.compiler.parser.DartScanner.scanToken(DartScanner.java:1256)
        at com.google.dart.compiler.parser.DartScanner.scanFile(DartScanner.java:752)
        at com.google.dart.compiler.parser.DartScanner.<init>(DartScanner.java:490)
        at com.google.dart.compiler.parser.DartScanner.<init>(DartScanner.java:466)
        at com.google.dart.compiler.parser.DartScannerParserContext.createScanner(DartScannerParserContext.java:182)
        at com.google.dart.compiler.parser.DartScannerParserContext.<init>(DartScannerParserContext.java:38)
        at com.google.dart.compiler.DartCompiler$Compiler.parse(DartCompiler.java:808)
        at com.google.dart.compiler.DartCompiler$SelectiveCompiler.parse(DartCompiler.java:859)
        at com.google.dart.compiler.DartCompiler$Compiler.parseOutOfDateFiles(DartCompiler.java:260)
        at com.google.dart.compiler.DartCompiler$Compiler.updateAndResolve(DartCompiler.java:201)
        at com.google.dart.compiler.DartCompiler$Compiler.access$4(DartCompiler.java:190)
        at com.google.dart.compiler.DartCompiler.analyzeLibrary(DartCompiler.java:1165)
        at com.google.dart.tools.core.utilities.compiler.DartCompilerUtilities.secureAnalyzeLibrary(DartCompilerUtilities.java:725)
        at com.google.dart.tools.core.utilities.compiler.DartCompilerUtilities$ResolverRunnable.run(DartCompilerUtilities.java:421)
        at com.google.dart.tools.core.utilities.compiler.DartCompilerUtilities$CompilerRunner.runSafe(DartCompilerUtilities.java:92)
        at com.google.dart.tools.core.utilities.compiler.DartCompilerUtilities.resolveLibrary(DartCompilerUtilities.java:583)
        at com.google.dart.tools.core.internal.util.ASTCache.getAST(ASTCache.java:116)
        at com.google.dart.tools.core.internal.indexer.contributor.DartProcessor.processTarget(DartProcessor.java:103)
        at com.google.dart.indexer.index.IndexTransaction.indexTarget(IndexTransaction.java:111)
        at com.google.dart.indexer.workspace.index.WorkspaceIndexer.indexTarget(WorkspaceIndexer.java:474)
        ... 4 more

@stevemessick
Copy link
Contributor

Thanks for the info, Florian. You're using the 64-bit linux distro, I assume. If you want to stop getting the OOM error you can change the memory allocation in your DartEditor.ini. I thought we were going to eliminate the custom memory allocation flags, but I see that they are still there, so you might try deleting the last three lines of DartEditor.ini. You could try using different values (like +Xmx1024M). Or you might try adding +XX:UseConcMarkSweepGC.

Aside: I investigate the Mac JVM arguments and found that none of the more esoteric options had any effect because the best ones were already enabled. I don't think anyone has had a chance to do the same for linux yet. OTOH I wasn't working with MBs of source, either, so I should probably do it all over.

@bwilkerson
Copy link
Member

Set owner to @bwilkerson.
Added Accepted label.

@bwilkerson
Copy link
Member

Set owner to @danrubel.

@danrubel
Copy link

danrubel commented Nov 7, 2011

ClassElementImplementation contains a ThreadLocal<Set<Element>> static field named "seenSupertypes" which is used in the #computeAllSupertypes() method. If this method should throw an exception, such as CyclicDeclarationException, the element added to this set at the beginning of this method would never be removed, thus causing the Dart Editor to slowly leak memory. The solution implemented in http://codereview.chromium.org/8477025/ is to use try/finally to ensure that the element is removed from the set.

@DartBot
Copy link

DartBot commented Nov 7, 2011

This comment was originally written by mmendez@google.com


That definitely seems like a problem, but were cyclic declarations at play in the code that triggered it?

@danrubel
Copy link

danrubel commented Nov 7, 2011

All I have wrt CyclicDeclarationException is circumstantial evidence. computeAllSupertypes() the only method touching that static field and the memory dump from Florian definitely implicates the static field named "seenSupertypes". If any exception was thrown, a leak would occur.

@danrubel
Copy link

danrubel commented Nov 7, 2011

Fixed in the latest continuous build.
Please let me know if you see this again.
Thanks!


Set owner to @floitschG.
Added Fixed label.

@floitschG floitschG added Type-Defect P1 A high priority bug; for example, a single project is unusable or has many test failures labels Nov 7, 2011
@floitschG floitschG self-assigned this Nov 7, 2011
nex3 pushed a commit that referenced this issue Aug 31, 2016
Qualified exports and inheritance for Closure
copybara-service bot pushed a commit that referenced this issue Nov 2, 2023
…lob, http_multi_server, http_parser, json_rpc_2, mockito, native, package_config, pool, sync_http, usage, webkit_inspection_protocol

Revisions updated by `dart tools/rev_sdk_deps.dart`.

args (https://github.com/dart-lang/args/compare/df9b428..46d5033):
  46d5033  2023-11-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#258)
  5f7c8b5  2023-11-01  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#259)

bazel_worker (https://github.com/dart-lang/bazel_worker/compare/b1b6a66..3d9cd58):
  3d9cd58  2023-11-02  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#83)
  1d7bed3  2023-11-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#84)

benchmark_harness (https://github.com/dart-lang/benchmark_harness/compare/59aea95..e59f675):
  e59f675  2023-11-01  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#96)
  1899e39  2023-11-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#95)

collection (https://github.com/dart-lang/collection/compare/d27bfaf..e8d7e92):
  e8d7e92  2023-11-02  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#318)
  1f5c234  2023-11-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#319)

file (https://github.com/google/file.dart/compare/e7c03aa..cd3a932):
  cd3a932  2023-11-01  dependabot[bot]  Bump actions/checkout from 3.6.0 to 4.1.1 (#232)

glob (https://github.com/dart-lang/glob/compare/0046533..7c9a121):
  7c9a121  2023-11-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#86)
  713142b  2023-11-01  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#85)

http_multi_server (https://github.com/dart-lang/http_multi_server/compare/03041aa..2238a6b):
  2238a6b  2023-11-01  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#60)

http_parser (https://github.com/dart-lang/http_parser/compare/c557f57..1cf5b7c):
  1cf5b7c  2023-11-02  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#80)
  cb6f142  2023-11-01  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#81)

json_rpc_2 (https://github.com/dart-lang/json_rpc_2/compare/0521afb..460545c):
  460545c  2023-11-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#105)
  189b1a8  2023-11-01  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#106)

mockito (https://github.com/dart-lang/mockito/compare/b7d752e..fcb9779):
  fcb9779  2023-11-01  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#713)
  1c4a6ff  2023-11-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#712)

native (https://github.com/dart-lang/native/compare/de9d59e..c72ed16):
  c72ed16  2023-11-01  Daco Harkes  [native_toolchain_c] Bump version to 0.3.2 (#184)
  4c9a50f  2023-11-01  Daco Harkes  [native_toolchain_c] Add workaround for minSdkVersion 19 and 20 (#181)
  45b5e6c  2023-11-01  Daco Harkes  [infra] Bump NDK version (#183)

package_config (https://github.com/dart-lang/package_config/compare/100533d..33dd246):
  33dd246  2023-11-01  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#144)
  30c8f25  2023-11-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#143)

pool (https://github.com/dart-lang/pool/compare/c78cef4..3c1bd42):
  3c1bd42  2023-11-01  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#77)

sync_http (https://github.com/dart-lang/sync_http/compare/8233f74..d8e9f3d):
  d8e9f3d  2023-11-01  dependabot[bot]  Bump actions/checkout from 3.6.0 to 4.1.1 (#40)
  c59b6d4  2023-11-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.0 to 1.6.0 (#41)

usage (https://github.com/dart-lang/usage/compare/d7d2964..e99690a):
  e99690a  2023-11-02  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#201)
  a540a6d  2023-11-01  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#200)

webkit_inspection_protocol (https://github.com/google/webkit_inspection_protocol.dart/compare/2c6f8b6..667c55e):
  667c55e  2023-11-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.0 to 1.6.0 (#113)

Change-Id: Ie6f2f0df0060cd77b9d56dc40172c134605417e7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/333680
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Devon Carew <devoncarew@google.com>
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 A high priority bug; for example, a single project is unusable or has many test failures
Projects
None yet
Development

No branches or pull requests

5 participants