"silent" out of memories?

i'm seeing a lot of these errors lately:

To reindex this file IDEA has to be restarted: java.lang.RuntimeException: Mapping failed: T:\ideacaches\.IntelliJIdea90\system\index\idindex\IdIndex, position=31457280, length=10112408
java.lang.RuntimeException: java.lang.RuntimeException: Mapping failed: T:\ideacaches\.IntelliJIdea90\system\index\idindex\IdIndex, position=31457280, length=10112408
     at com.intellij.util.io.PersistentEnumerator.enumerateImpl(PersistentEnumerator.java:354)
     at com.intellij.util.io.PersistentEnumerator.enumerate(PersistentEnumerator.java:195)
     at com.intellij.util.io.PersistentHashMap$2.onDropFromCache(PersistentHashMap.java:84)
     at com.intellij.util.io.PersistentHashMap$2.onDropFromCache(PersistentHashMap.java:76)
     at com.intellij.util.containers.SLRUMap.clear(SLRUMap.java:128)
     at com.intellij.util.io.PersistentHashMap.force(PersistentHashMap.java:289)
     at com.intellij.util.io.PersistentEnumerator.markCorrupted(PersistentEnumerator.java:567)
     at com.intellij.util.io.PersistentEnumerator.enumerateImpl(PersistentEnumerator.java:353)
     at com.intellij.util.io.PersistentEnumerator.enumerate(PersistentEnumerator.java:195)
     at com.intellij.util.io.PersistentHashMap$2.onDropFromCache(PersistentHashMap.java:84)
     at com.intellij.util.io.PersistentHashMap$2.onDropFromCache(PersistentHashMap.java:76)
     at com.intellij.util.containers.SLRUMap$2.removeEldestEntry(SLRUMap.java:58)
     at com.intellij.util.containers.hash.LinkedHashMap.put(LinkedHashMap.java:98)
     at com.intellij.util.containers.SLRUMap.put(SLRUMap.java:91)
     at com.intellij.util.containers.SLRUCache.get(SLRUCache.java:41)
     at com.intellij.util.io.PersistentHashMap.appendData(PersistentHashMap.java:190)
     at com.intellij.util.indexing.MapIndexStorage$1.onDropFromCache(MapIndexStorage.java:116)
     at com.intellij.util.indexing.MapIndexStorage$1.onDropFromCache(MapIndexStorage.java:67)
     at com.intellij.util.containers.SLRUMap$2.removeEldestEntry(SLRUMap.java:58)
     at com.intellij.util.containers.hash.LinkedHashMap.put(LinkedHashMap.java:98)
     at com.intellij.util.containers.SLRUMap.put(SLRUMap.java:91)
     at com.intellij.util.containers.SLRUCache.get(SLRUCache.java:41)
     at com.intellij.util.indexing.MapIndexStorage.read(MapIndexStorage.java:230)
     at com.intellij.util.indexing.MapIndexStorage.addValue(MapIndexStorage.java:250)
     at com.intellij.util.indexing.MemoryIndexStorage.addValue(MemoryIndexStorage.java:133)
     at com.intellij.util.indexing.MapReduceIndex.updateWithMap(MapReduceIndex.java:223)
     at com.intellij.util.indexing.MapReduceIndex.update(MapReduceIndex.java:202)
     at com.intellij.util.indexing.FileBasedIndex$21.run(FileBasedIndex.java:1323)
     at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeNonCancelableSection(ProgressManagerImpl.java:135)
     at com.intellij.util.indexing.FileBasedIndex.a(FileBasedIndex.java:1320)
     at com.intellij.util.indexing.FileBasedIndex.indexFileContent(FileBasedIndex.java:1286)
     at com.intellij.util.indexing.UnindexedFilesUpdater.processFile(UnindexedFilesUpdater.java:53)
     at com.intellij.openapi.project.CacheUpdateSession.processFile(CacheUpdateSession.java:92)
     at com.intellij.openapi.project.CacheUpdateRunner$3$1.run(CacheUpdateRunner.java:151)
     at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:697)
     at com.intellij.openapi.project.CacheUpdateRunner$3.run(CacheUpdateRunner.java:155)
     at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:198)
     at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:223)
     at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:189)
     at com.intellij.openapi.project.CacheUpdateRunner.a(CacheUpdateRunner.java:130)
     at com.intellij.openapi.project.CacheUpdateRunner.processFiles(CacheUpdateRunner.java:88)
     at com.intellij.openapi.project.DumbServiceImpl$IndexUpdateRunnable$1.a(DumbServiceImpl.java:309)
     at com.intellij.openapi.project.DumbServiceImpl$IndexUpdateRunnable$1.run(DumbServiceImpl.java:289)
     at com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.run(ProgressManagerImpl.java:428)
     at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:198)
     at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:223)
     at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:189)
     at com.intellij.openapi.progress.impl.ProgressManagerImpl$6.run(ProgressManagerImpl.java:343)
     at com.intellij.openapi.application.impl.ApplicationImpl$5.run(ApplicationImpl.java:331)
     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
     at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
     at java.util.concurrent.FutureTask.run(FutureTask.java:138)
     at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
     at java.lang.Thread.run(Thread.java:619)
     at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:125)
Caused by: java.lang.RuntimeException: Mapping failed: T:\ideacaches\.IntelliJIdea90\system\index\idindex\IdIndex, position=31457280, length=10112408
     at com.intellij.util.io.ReadWriteMappedBufferWrapper.map(ReadWriteMappedBufferWrapper.java:51)
     at com.intellij.util.io.MappedBufferWrapper.buf(MappedBufferWrapper.java:68)
     at com.intellij.util.io.PagedFileStorage.getBuffer(PagedFileStorage.java:260)
     at com.intellij.util.io.PagedFileStorage.get(PagedFileStorage.java:170)
     at com.intellij.

util.io.PagedFileStorage.getInt(PagedFileStorage.java:121)
     at com.intellij.util.io.ResizeableMappedFile.getInt(ResizeableMappedFile.java:141)
     at com.intellij.util.io.PersistentEnumerator.enumerateImpl(PersistentEnumerator.java:279)
     ... 55 more
Caused by: java.io.IOException: Map failed
     at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:758)
     at com.intellij.util.io.ReadWriteMappedBufferWrapper.map(ReadWriteMappedBufferWrapper.java:48)
     ... 61 more
Caused by: java.lang.OutOfMemoryError: Map failed
     at sun.nio.ch.FileChannelImpl.map0(Native Method)
     at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:755)
     ... 62 more

what's wrong here? my machine has 8 gb, and idea can take up to 1.3 gb

4 comments
Comment actions Permalink

Your are probably running out of perm gen memory, not heap memory.

Try upping -XX:MaxPermSize

0
Comment actions Permalink

it's at 250mb
i suspect the non-vm (meaning native) memory to be used up here...
i encountered a similar problem using jmonkeyengine which used bytebuffers

0
Comment actions Permalink

if i'm right, switching to a 64 bit vm should solve the problem, but if i set IDEA_JDK to one, the last output i get is:
S:\Program Files (x86)\JetBrains\IntelliJ IDEA 95.214\bin>"S:\Program Files\Java
\jdk1.6.0_20\jre\bin\java.exe" "-Xms32m" "-Xmx1000m" "-XX:MaxPermSize=150m" -Xbo
otclasspath/a:../lib/boot.jar -Didea.properties.file=S:\localideafiles\idea.prop
erties -Xbootclasspath/a:../lib/boot.jar -Didea.properties.file=S:\localideafile
s\idea.properties -Xbootclasspath/a:../lib/boot.jar -Didea.properties.file=S:\lo
calideafiles\idea.properties -Xbootclasspath/a:../lib/boot.jar -Didea.properties
.file=S:\localideafiles\idea.properties  -cp "..\lib\bootstrap.jar;..\lib\util.j
ar;..\lib\jdom.jar;..\lib\log4j.jar;..\lib\extensions.jar;..\lib\trove4j.jar;S:\
Program Files\Java\jdk1.6.0_20\lib\tools.jar" com.intellij.idea.Main
java.lang.ClassNotFoundException: com.intellij.ide.plugins.PluginManager
        at com.intellij.util.lang.UrlClassLoader.findClass(UrlClassLoader.java:6
7)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at com.intellij.util.lang.UrlClassLoader.loadClass(UrlClassLoader.java:8
0)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:247)
        at com.intellij.ide.Bootstrap.main(Bootstrap.java:41)
        at com.intellij.ide.Bootstrap.main(Bootstrap.java:35)
        at com.intellij.idea.Main.main(Main.java:54)

and that's it, no idea starting

0
Comment actions Permalink

that was a weird problem with idea.propertie, i have to put it in the idea/bin-directory, everything else leads to the error above. so, now idea starts with a 64 bit vm, but as soon as i try to open the ide settings, memory usage spikes to >2gb..
this is more difficult than i thought

0

Please sign in to leave a comment.