Intellij Idea 9 and Ubuntu 9.10 with JDK 1.6.0_18
Hi there,
I previously posted about this problem here and made a bug report here. I think I found out some new information so hopefully it will help.
First the specs:
System:
Ubuntu 9.10 x86_64
4GB ram
Java:
java version "1.6.0_18"
Java(TM) SE Runtime Environment (build 1.6.0_18-b07)
Java HotSpot(TM) 64-Bit Server VM (build 16.0-b13, mixed mode)
Idea:
idea-IC-94.539
idea.vmoptions:
-Xms256m
-Xmx1536m
-XX:MaxPermSize=500m
-Dsun.java2d.pmoffscreen=false
I realize that Xmx is a bit high, but even with that, it said it ran out of heap space.
The errors I was getting in the console were these ones:
Caused by: java.io.IOException: Negative seek offset
at java.io.RandomAccessFile.seek(Native Method)
at com.intellij.util.io.RandomAccessDataFile.seek(RandomAccessDataFile.java:267)
.
.
And
com.intellij.util.indexing.StorageException: java.lang.RuntimeException: java.lang.IndexOutOfBoundsException
at com.intellij.util.indexing.MapReduceIndex.updateWithMap(MapReduceIndex.java:249)
at com.intellij.util.indexing.MapReduceIndex.update(MapReduceIndex.java:232)
So I was looking around at the .IdeaIC90 directory and decided to list the files present by file size...these are the top 4:
0 -rw-r--r-- 1 ronnie ronnie 207769926 2010-03-17 13:49 records.dat
0 -rw-r--r-- 1 ronnie ronnie 501547008 2010-03-17 13:52 content.dat.storageRecordIndex
0 -rw-r--r-- 1 ronnie ronnie 904242400 2010-03-17 13:51 content.dat.storageData
0 -rw-r--r-- 1 ronnie ronnie 2044025568 2010-03-17 13:51 attrib.dat.storageRecordIndex
I understand that these are sparse files, but the last file is what bothered me. Being that it is over 2GB large, it would seem to perhaps be why I get errors about a negative seek offset, since the value used to seek is a signed int. (Altho I am not an expert on Java's file i/o or anything like that).
Could this possibly be the problem? Is the project I'm using to large to open with Idea? What would cause such a large file size in one of the indexes?
I hope you can answer my question. I've been using netbeans for the past month, and it's not quite up to the standards of Idea. Thanks!
Please sign in to leave a comment.
Hi there,
try invalidating Idea caches (file > invalidate caches) and set -XX:+UseCompressedOops vm option on a 64 jvm,
I work with following settings on a quite large projects without any problems (also on linux):
-Xmx712m
-XX:MaxPermSize=396m
-XX:+AggressiveOpts
-XX:+UseCompressedOops
-XX:+UnlockExperimentalVMOptions
-XX:+UseG1GC
-ea
(Just testing G1 collector, you should disable that one)
Also, attaching a memory snapshot would help fixing any memory leak issues...
hth, cheers
-m
Thanks for the quick response. I added those things (expect for the G1 thing) and it does seem to be running a lot better. I'm hoping it will work well once I restart it. I still seem to be getting a few of the IndexOutOfBoundsExceptions still, but they are not flying by in the console any more and I haven't seen any degredation in the application.
I tried enabling the profiling to get a memory dump as outlined in http://www.jetbrains.net/devnet/docs/DOC-192. The startup says that it's running, but there aren't any buttons in the toolbar for the CPU or Memory dumps. Am I really dumb or something?
Still isn't working well. I'm getting errors like this currently.
[61415559] ERROR - currency.PrioritizedFutureTask - IntelliJ IDEA (Community Edition) IC-94.539 Build #IC-94.539
[61415559] ERROR - currency.PrioritizedFutureTask - JDK: 1.6.0_18
[61415560] ERROR - currency.PrioritizedFutureTask - VM: Java HotSpot(TM) 64-Bit Server VM
[61415560] ERROR - currency.PrioritizedFutureTask - Vendor: Sun Microsystems Inc.
[61415561] ERROR - currency.PrioritizedFutureTask - OS: Linux
[61415561] ERROR - currency.PrioritizedFutureTask - Last Action: EditorEnter
[61415561] ERROR - currency.PrioritizedFutureTask - Original exception:
java.lang.RuntimeException: java.lang.IllegalArgumentException: Negative position
at com.intellij.openapi.vfs.newvfs.persistent.FSRecords$DbConnection.handleError(FSRecords.java:426)
at com.intellij.openapi.vfs.newvfs.persistent.FSRecords$DbConnection.access$500(FSRecords.java:98)
at com.intellij.openapi.vfs.newvfs.persistent.FSRecords$AttributeOutputStream.close(FSRecords.java:964)
at com.intellij.openapi.vfs.newvfs.persistent.PersistentFS.contentsToByteArray(PersistentFS.java:402)
at com.intellij.openapi.vfs.newvfs.impl.VirtualFileImpl.contentsToByteArray(VirtualFileImpl.java:87)
.
.
.
Also, there was a pop-up that said "Could not save project - Assertion Error", before it told me it ran out of memory and shut down.
I think I will have to switch back to NetBeans if I can't get this working!
Just wanted to give a little more information. I thought there might be something with the size of my project as well, since it's around 20 different modules total, and around 7000 files. I tried just loading 3 of the modules to a project to just work with that. However, after some time of running, it still gives me the same type of errors: IndexOutOfBoundsExceptions.
I've tried Invalidating the Caches and restarting, but it gives me the same errors, and when I try to save a file, it says "Cannot Save Project: IndexOutOfBoundsExceptions"
Is no one else experiencing issues like this? I'm trying to figure out why it seems to be isolated to me.
Hi there,
have you tried renaming .IntelliJIdea90/system and starting Idea again ?
PLEASE NOTE: you'll loose (all) project(s) information, caches etc. but maybe it is worth trying
Some time ago, I also had a lot of issues on one of my machines, but, on other machine Idea was working like a charm, with almost identical setup,
so I deleted whole system folder and my problems were gone. Now, I cannot say it will be the same in your case, but it is worth trying ;-)
cheers,
-m
PS: are you maybe using symlinks for java/intellij/project directories?
Hi,
What problems will there be if symbolic links are used in java/intellij/project?
Regards.
Thanks for the suggestion M.J. Unfortunately, removing the .Idea90 directory entirely still does not stop the problem.
Just wanted to give some more information...I'm not sure this belongs in here but jetbrains.org directed me to here for the forums anyway.
I downloaded the source code for Idea a few days ago, to see what I could see. I can see where the exception is coming from createValue in PagedFileStorage.
I put in some code to output "off" and "key.owner.length" when off is greater than key.owner.length.
if (off > key.owner.length()) {
System.out.println("off: " + off);
System.out.println("key.owner.length:" + key.owner.length());
IndexOutOfBoundsException e = new IndexOutOfBoundsException();
e.printStackTrace();
throw e;
}
So, now, this is what I am getting in my Idea console:
off: 1258291200
key.owner.length:46431
java.lang.IndexOutOfBoundsException
at com.intellij.util.io.PagedFileStorage$StorageLock$1.createValue(PagedFileStorage.java:66)
at com.intellij.util.io.PagedFileStorage$StorageLock$1.createValue(PagedFileStorage.java:49)
at com.intellij.util.containers.SLRUCache.get(SLRUCache.java:40)
at com.intellij.util.io.PagedFileStorage.getBuffer(PagedFileStorage.java:271)
at com.intellij.util.io.PagedFileStorage.get(PagedFileStorage.java:181)
at com.intellij.util.io.PagedFileStorage.getInt(PagedFileStorage.java:132)
at com.intellij.util.io.ResizeableMappedFile.getInt(ResizeableMappedFile.java:139)
at com.intellij.util.io.PersistentEnumerator.enumerateImpl(PersistentEnumerator.java:276)
at com.intellij.util.io.PersistentEnumerator.enumerate(PersistentEnumerator.java:192)
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:123)
at com.intellij.util.io.PersistentHashMap.close(PersistentHashMap.java:289)
at com.intellij.util.indexing.MapIndexStorage.clear(MapIndexStorage.java:172)
at com.intellij.util.indexing.MemoryIndexStorage.clear(MemoryIndexStorage.java:82)
at com.intellij.util.indexing.MapReduceIndex.clear(MapReduceIndex.java:95)
at com.intellij.psi.stubs.StubIndexImpl.clearAllIndices(StubIndexImpl.java:352)
at com.intellij.psi.stubs.StubUpdatingIndex$MyIndex.clear(StubUpdatingIndex.java:323)
at com.intellij.util.indexing.FileBasedIndex.clearIndex(FileBasedIndex.java:957)
at com.intellij.util.indexing.FileBasedIndex.access$400(FileBasedIndex.java:85)
at com.intellij.util.indexing.FileBasedIndex$16.run(FileBasedIndex.java:903)
at com.intellij.util.indexing.FileBasedIndex.checkRebuild(FileBasedIndex.java:920)
at com.intellij.util.indexing.FileBasedIndex.performShutdown(FileBasedIndex.java:518)
at com.intellij.util.indexing.FileBasedIndex.access$900(FileBasedIndex.java:85)
at com.intellij.util.indexing.FileBasedIndex$6.run(FileBasedIndex.java:268)
at com.intellij.openapi.util.ShutDownTracker.run(ShutDownTracker.java:72)
at java.lang.Thread.run(Thread.java:619)
Any of the developers know why my offset may be so much larger than the "key.owner.length"? I tried following the stack-trace, but not being familiar with the system made it more difficult.
Any help possible?
Also, just wanted to say, I tried with a much smaller project, around 100 files, and I'm still getting the same IndexOutOfBoundsException...I thought it might have to do with the size of the project I was working, but that doesn't seem to be the case...
I'm having the same problem. Running Kubuntu 9.10 32bit and JDK 1.6.0_18.
Getting allot of these as well:
Caused by: java.io.IOException: Invalid argument
at java.io.RandomAccessFile.setLength(Native Method)
at com.intellij.util.io.PagedFileStorage.resizeFile(PagedFileStorage.java:230)
at com.intellij.util.io.PagedFileStorage.resize(PagedFileStorage.java:219)
at com.intellij.util.io.ResizeableMappedFile.resize(ResizeableMappedFile.java:57)
... 96 more
I am not having these issues with 64 bit karmic.
That's weird that I am having these issues and you are not. Could I ask if you are using java from the repos or manually downloaded? I'm using 1.6.0_18 from Sun's website just extracted into /usr/local. I should also say that I am making projects by opening their pom.xml...I wonder if the maven plugin has anything to do with it?
yeah java from the repos. not using maven...
Just recently starting with IU-94.585 and IU-94.633, I started getting more VM crashes on Ubuntu 9.10 64-bit and JDK 1.6.0_18. What was strange to me is I have been running this exact same configuration with the same idea.vmoptions for almost 6 months now and it had been very stable with very infrequent crashes. But starting with IU-94.585, I started to see more crashes.
I tried invalidating my IDEA cache and restarting, but it still crashed. I thought maybe I didn't have enough PermGen heap or maybe it was due to the UseCompressedOops I was using, but IDEA crashed even when I made adjustements for those options.
I have kept compressedoops off to try to keep my JVM config as simple as possible. But today, the JVM crashed several times per hour which is not acceptable. I filed a submitted a bug report ot sun. I may have to switch my development environment back to windows to see if that is more stable, because I'm doing alot of development now and need a stable IDE.
$ cat idea.vmoptions
-Xms256m
-Xmx1592m
-XX:MaxPermSize=190m
-XX:+UseCompressedOops
-ea
$ ./idea.sh
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (nmethod.cpp:1836), pid=27144, tid=140666378643728
# Error: guarantee(cont_offset != 0,"unhandled implicit exception in compiled code")
#
# JRE version: 6.0_18-b07
# Java VM: Java HotSpot(TM) 64-Bit Server VM (16.0-b13 mixed mode linux-amd64 compressed oops)
# An error report file with more information is saved as:
# /tmp/hs_err_pid27144.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
#
Aborted
$ cat idea.vmoptions
-Xms256m
-Xmx1592m
-XX:MaxPermSize=255m
-XX:+UseCompressedOops
-ea
$ ./idea.sh
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (nmethod.cpp:1836), pid=27414, tid=140675089459472
# Error: guarantee(cont_offset != 0,"unhandled implicit exception in compiled code")
#
# JRE version: 6.0_18-b07
# Java VM: Java HotSpot(TM) 64-Bit Server VM (16.0-b13 mixed mode linux-amd64 compressed oops)
# An error report file with more information is saved as:
# /tmp/hs_err_pid27414.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
#
Aborted
$ cat idea.vmoptions
-Xms256m
-Xmx1592m
-XX:MaxPermSize=255m
-ea
$ ./idea.sh
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007ffbffdd863c, pid=27618, tid=140718286174480
#
# JRE version: 6.0_18-b07
# Java VM: Java HotSpot(TM) 64-Bit Server VM (16.0-b13 mixed mode linux-amd64 )
# Problematic frame:
# V [libjvm.so+0x62263c]
#
# An error report file with more information is saved as:
# /tmp/hs_err_pid27618.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
#
Aborted
Ron,
I've been getting some exceptions which seem related to IDEA's caches/indexing but these exceptions aren't causing IDEA to have a fatal error.
Looking at my cache and index directory, my biggest system directories are jars 1275 MB, caches 670 MB, localhistory 377 MB, and index 241 MB. My attrib.dat.storageRecordIndex file is only 3 MB in size. If your attrib.dat.storageRecordIndex is 2 GB, that seems like a bug unless your project is HUGE!!
I just read you said you had 7000 files. My project has 30,000 source files (that includes some other files like properties, build.xml, artwork files, etc.)
$ du -sk *
670752 caches
4452 compiler
40 conversion
1060 facets
4 httpFileSystem
8 idea-server
16 ideTalk
241756 index
1275632 jars
4 jetConnect
3816 js_caches
228 jsp_related_caches
377948 LocalHistory
15800 log
8 plugins
2172 stat
8 vcsCache
6672 webservices
$ du -sk *
13920 attrib.dat.storageData
2984 attrib.dat.storageRecordIndex
631308 content.dat.storageData
2064 content.dat.storageRecordIndex
5836 names.dat
3588 names.dat.keystream
4 names.dat.keystream.len
4 names.dat.len
11036 records.dat
4 records.dat.len
[ 33729] ERROR - com.intellij.ide.IdeEventQueue - IntelliJ IDEA (Maia) IU-94.633 Build #IU-94.633
[ 33729] ERROR - com.intellij.ide.IdeEventQueue - JDK: 1.6.0_18
[ 33729] ERROR - com.intellij.ide.IdeEventQueue - VM: Java HotSpot(TM) 64-Bit Server VM
[ 33729] ERROR - com.intellij.ide.IdeEventQueue - Vendor: Sun Microsystems Inc.
[ 33729] ERROR - com.intellij.ide.IdeEventQueue - OS: Linux
[ 33729] ERROR - com.intellij.ide.IdeEventQueue - Last Action:
[ 33729] ERROR - com.intellij.ide.IdeEventQueue - Original exception:
java.lang.IllegalArgumentException
at java.nio.Buffer.position(Buffer.java:218)
at com.intellij.util.io.PagedFileStorage.get(PagedFileStorage.java:171)
at com.intellij.util.io.PagedFileStorage.getInt(PagedFileStorage.java:121)
at com.intellij.util.io.ResizeableMappedFile.getInt(ResizeableMappedFile.java:139)
at com.intellij.util.io.PersistentEnumerator.valueOf(PersistentEnumerator.java:455)
at com.intellij.util.io.StringRef.getString(StringRef.java:48)
at com.intellij.util.io.StringRef.length(StringRef.java:80)
at com.intellij.psi.impl.java.stubs.impl.PsiFieldStubImpl.<init>(PsiFieldStubImpl.java:54)
at com.intellij.psi.impl.java.stubs.JavaFieldStubElementType.deserialize(JavaFieldStubElementType.java:103)
at com.intellij.psi.impl.java.stubs.JavaFieldStubElementType.deserialize(JavaFieldStubElementType.java:44)
at com.intellij.psi.stubs.SerializationManagerImpl.deserialize(SerializationManagerImpl.java:200)
at com.intellij.psi.stubs.SerializationManagerImpl.deserialize(SerializationManagerImpl.java:203)
at com.intellij.psi.stubs.SerializationManagerImpl.deserialize(SerializationManagerImpl.java:203)
at com.intellij.psi.stubs.SerializationManagerImpl.deserialize(SerializationManagerImpl.java:185)
at com.intellij.psi.stubs.SerializedStubTree.getStub(SerializedStubTree.java:34)
at com.intellij.psi.stubs.StubTree.readFromVFile(StubTree.java:138)
at com.intellij.psi.stubs.StubTree.readOrBuild(StubTree.java:102)
at com.intellij.psi.impl.source.PsiFileImpl.getStubTree(PsiFileImpl.java:588)
at com.intellij.psi.impl.source.PsiFileImpl.getStub(PsiFileImpl.java:571)
at com.intellij.psi.impl.source.PsiJavaFileBaseImpl.getClasses(PsiJavaFileBaseImpl.java:79)
at com.intellij.ide.projectView.impl.ClassesTreeStructureProvider.modify(ClassesTreeStructureProvider.java:50)
at com.intellij.ide.util.treeView.AbstractTreeStructureBase.getChildElements(AbstractTreeStructureBase.java:49)
at com.intellij.ide.util.treeView.AbstractTreeUi.getChildrenFor(AbstractTreeUi.java:1316)
at com.intellij.ide.util.treeView.AbstractTreeUi.processUnbuilt(AbstractTreeUi.java:1256)
at com.intellij.ide.util.treeView.AbstractTreeUi.updateNodeChildren(AbstractTreeUi.java:1028)
at com.intellij.ide.util.treeView.AbstractTreeUi.updateSubtreeNow(AbstractTreeUi.java:929)
at com.intellij.ide.util.treeView.AbstractTreeUpdater$3.run(AbstractTreeUpdater.java:228)
at com.intellij.openapi.util.ExecutionCallback.callback(ExecutionCallback.java:72)
at com.intellij.openapi.util.ExecutionCallback.doWhenExecuted(ExecutionCallback.java:53)
at com.intellij.openapi.util.ActionCallback.doWhenDone(ActionCallback.java:85)
at com.intellij.ide.util.treeView.AbstractTreeUpdater.performUpdate(AbstractTreeUpdater.java:226)
at com.intellij.ide.util.treeView.AbstractTreeUi.doExpandNodeChildren(AbstractTreeUi.java:424)
at com.intellij.ide.util.treeView.AbstractTreeBuilder.expandNodeChildren(AbstractTreeBuilder.java:246)
at com.intellij.ide.projectView.BaseProjectTreeBuilder.expandNodeChildren(BaseProjectTreeBuilder.java:69)
at com.intellij.ide.util.treeView.AbstractTreeUi$MyExpansionListener.treeExpanded(AbstractTreeUi.java:3759)
at javax.swing.JTree.fireTreeExpanded(JTree.java:2666)
at javax.swing.JTree.setExpandedState(JTree.java:3427)
at javax.swing.JTree.expandPath(JTree.java:2163)
at com.intellij.ide.util.treeView.AbstractTreeUi$44.run(AbstractTreeUi.java:2479)
at com.intellij.ide.util.treeView.UpdaterTreeState.process(UpdaterTreeState.java:114)
at com.intellij.ide.util.treeView.AbstractTreeUi.processInnerChange(AbstractTreeUi.java:2500)
at com.intellij.ide.util.treeView.AbstractTreeUi.expandPath(AbstractTreeUi.java:2469)
at com.intellij.ide.util.treeView.AbstractTreeUi.expand(AbstractTreeUi.java:1232)
at com.intellij.ide.util.treeView.AbstractTreeUi.expand(AbstractTreeUi.java:1197)
at com.intellij.ide.util.treeView.AbstractTreeUi.processExpand(AbstractTreeUi.java:3426)
at com.intellij.ide.util.treeView.AbstractTreeUi._expand(AbstractTreeUi.java:3365)
at com.intellij.ide.util.treeView.AbstractTreeUi.access$6700(AbstractTreeUi.java:55)
at com.intellij.ide.util.treeView.AbstractTreeUi$57.run(AbstractTreeUi.java:3274)
at com.intellij.ide.util.treeView.AbstractTreeUi.expandNext(AbstractTreeUi.java:3286)
at com.intellij.ide.util.treeView.AbstractTreeUi.access$6600(AbstractTreeUi.java:55)
at com.intellij.ide.util.treeView.AbstractTreeUi$56.run(AbstractTreeUi.java:3250)
at com.intellij.ide.util.treeView.AbstractTreeUi.runDone(AbstractTreeUi.java:3311)
at com.intellij.ide.util.treeView.AbstractTreeUi._expand(AbstractTreeUi.java:3227)
at com.intellij.ide.util.treeView.AbstractTreeUi.expand(AbstractTreeUi.java:3218)
at com.intellij.ide.util.treeView.AbstractTreeUi.expand(AbstractTreeUi.java:3209)
at com.intellij.ide.util.treeView.AbstractTreeUi.expand(AbstractTreeUi.java:3205)
at com.intellij.ide.util.treeView.AbstractTreeBuilder.expand(AbstractTreeBuilder.java:100)
at com.intellij.ide.util.treeView.TreeState$BuilderFacade.expand(TreeState.java:419)
at com.intellij.ide.util.treeView.TreeState.applyTo(TreeState.java:327)
at com.intellij.ide.util.treeView.TreeState.access$400(TreeState.java:32)
at com.intellij.ide.util.treeView.TreeState$2.run(TreeState.java:335)
at com.intellij.openapi.util.ExecutionCallback.callback(ExecutionCallback.java:72)
at com.intellij.openapi.util.ExecutionCallback.doWhenExecuted(ExecutionCallback.java:53)
at com.intellij.openapi.util.ActionCallback.doWhenDone(ActionCallback.java:85)
at com.intellij.ide.util.treeView.TreeState.applyTo(TreeState.java:327)
at com.intellij.ide.util.treeView.TreeState.access$400(TreeState.java:32)
at com.intellij.ide.util.treeView.TreeState$2.run(TreeState.java:335)
at com.intellij.openapi.util.ExecutionCallback.callback(ExecutionCallback.java:72)
at com.intellij.openapi.util.ExecutionCallback.doWhenExecuted(ExecutionCallback.java:53)
at com.intellij.openapi.util.ActionCallback.doWhenDone(ActionCallback.java:85)
at com.intellij.ide.util.treeView.TreeState.applyTo(TreeState.java:327)
at com.intellij.ide.util.treeView.TreeState.access$400(TreeState.java:32)
at com.intellij.ide.util.treeView.TreeState$2.run(TreeState.java:335)
at com.intellij.openapi.util.ExecutionCallback.callback(ExecutionCallback.java:72)
at com.intellij.openapi.util.ExecutionCallback.doWhenExecuted(ExecutionCallback.java:53)
at com.intellij.openapi.util.ActionCallback.doWhenDone(ActionCallback.java:85)
at com.intellij.ide.util.treeView.TreeState.applyTo(TreeState.java:327)
at com.intellij.ide.util.treeView.TreeState.access$400(TreeState.java:32)
at com.intellij.ide.util.treeView.TreeState$2.run(TreeState.java:335)
at com.intellij.openapi.util.ExecutionCallback.callback(ExecutionCallback.java:72)
at com.intellij.openapi.util.ExecutionCallback.doWhenExecuted(ExecutionCallback.java:53)
at com.intellij.openapi.util.ActionCallback.doWhenDone(ActionCallback.java:85)
at com.intellij.ide.util.treeView.TreeState.applyTo(TreeState.java:327)
at com.intellij.ide.util.treeView.TreeState.access$400(TreeState.java:32)
at com.intellij.ide.util.treeView.TreeState$2.run(TreeState.java:335)
at com.intellij.openapi.util.ExecutionCallback.callback(ExecutionCallback.java:72)
at com.intellij.openapi.util.ExecutionCallback.doWhenExecuted(ExecutionCallback.java:53)
at com.intellij.openapi.util.ActionCallback.doWhenDone(ActionCallback.java:85)
at com.intellij.ide.util.treeView.TreeState.applyTo(TreeState.java:327)
at com.intellij.ide.util.treeView.TreeState.access$400(TreeState.java:32)
at com.intellij.ide.util.treeView.TreeState$2.run(TreeState.java:335)
at com.intellij.openapi.util.ExecutionCallback.callback(ExecutionCallback.java:72)
at com.intellij.openapi.util.ExecutionCallback.doWhenExecuted(ExecutionCallback.java:53)
at com.intellij.openapi.util.ActionCallback.doWhenDone(ActionCallback.java:85)
at com.intellij.ide.util.treeView.TreeState.applyTo(TreeState.java:327)
at com.intellij.ide.util.treeView.TreeState.access$400(TreeState.java:32)
at com.intellij.ide.util.treeView.TreeState$2.run(TreeState.java:335)
at com.intellij.openapi.util.ExecutionCallback.callback(ExecutionCallback.java:72)
at com.intellij.openapi.util.ExecutionCallback.doWhenExecuted(ExecutionCallback.java:53)
at com.intellij.openapi.util.ActionCallback.doWhenDone(ActionCallback.java:85)
at com.intellij.ide.util.treeView.TreeState.applyTo(TreeState.java:327)
at com.intellij.ide.util.treeView.TreeState.access$400(TreeState.java:32)
at com.intellij.ide.util.treeView.TreeState$2.run(TreeState.java:335)
at com.intellij.openapi.util.ExecutionCallback.callback(ExecutionCallback.java:72)
at com.intellij.openapi.util.ExecutionCallback.setExecuted(ExecutionCallback.java:37)
at com.intellij.openapi.util.ActionCallback.setDone(ActionCallback.java:63)
at com.intellij.ide.util.treeView.TreeState$BuilderFacade$1.run(TreeState.java:421)
at com.intellij.ide.util.treeView.AbstractTreeUi.runDone(AbstractTreeUi.java:3311)
at com.intellij.ide.util.treeView.AbstractTreeUi.access$4200(AbstractTreeUi.java:55)
at com.intellij.ide.util.treeView.AbstractTreeUi$56$2.run(AbstractTreeUi.java:3242)
at com.intellij.openapi.util.ExecutionCallback.callback(ExecutionCallback.java:72)
at com.intellij.openapi.util.ExecutionCallback.setExecuted(ExecutionCallback.java:37)
at com.intellij.openapi.util.ActionCallback.setDone(ActionCallback.java:63)
at com.intellij.ide.util.treeView.AbstractTreeUi$57$1.run(AbstractTreeUi.java:3276)
at com.intellij.ide.util.treeView.AbstractTreeUi.runDone(AbstractTreeUi.java:3311)
at com.intellij.ide.util.treeView.AbstractTreeUi.access$4200(AbstractTreeUi.java:55)
at com.intellij.ide.util.treeView.AbstractTreeUi$60.onReady(AbstractTreeUi.java:3402)
at com.intellij.ide.util.treeView.AbstractTreeUi.processActions(AbstractTreeUi.java:2101)
at com.intellij.ide.util.treeView.AbstractTreeUi.processNodeActionsIfReady(AbstractTreeUi.java:2073)
at com.intellij.ide.util.treeView.AbstractTreeUi.processExpand(AbstractTreeUi.java:3430)
at com.intellij.ide.util.treeView.AbstractTreeUi._expand(AbstractTreeUi.java:3365)
at com.intellij.ide.util.treeView.AbstractTreeUi.access$6700(AbstractTreeUi.java:55)
at com.intellij.ide.util.treeView.AbstractTreeUi$57.run(AbstractTreeUi.java:3274)
at com.intellij.ide.util.treeView.AbstractTreeUi.expandNext(AbstractTreeUi.java:3286)
at com.intellij.ide.util.treeView.AbstractTreeUi.access$6600(AbstractTreeUi.java:55)
at com.intellij.ide.util.treeView.AbstractTreeUi$56.run(AbstractTreeUi.java:3250)
at com.intellij.ide.util.treeView.AbstractTreeUi.flushPendingNodeActions(AbstractTreeUi.java:1585)
at com.intellij.ide.util.treeView.AbstractTreeUi.maybeYeildingFinished(AbstractTreeUi.java:1529)
at com.intellij.ide.util.treeView.AbstractTreeUi.executeYieldingRequest(AbstractTreeUi.java:1522)
at com.intellij.ide.util.treeView.AbstractTreeUi.access$4300(AbstractTreeUi.java:55)
at com.intellij.ide.util.treeView.AbstractTreeUi$28$1.run(AbstractTreeUi.java:1487)
at com.intellij.util.ui.UIUtil.invokeLaterIfNeeded(UIUtil.java:1003)
at com.intellij.ide.util.treeView.AbstractTreeBuilder.runOnYeildingDone(AbstractTreeBuilder.java:314)
at com.intellij.ide.util.treeView.AbstractTreeUi.runOnYieldingDone(AbstractTreeUi.java:1593)
at com.intellij.ide.util.treeView.AbstractTreeUi$28.run(AbstractTreeUi.java:1485)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at com.intellij.ide.IdeEventQueue.f(IdeEventQueue.java:610)
at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:500)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:368)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
[ 33926] ERROR - com.intellij.ide.IdeEventQueue - Error during dispatching of java.awt.event.InvocationEvent[INVOCATION_DEFAULT,runnable=com.intellij.ide.util.treeView.AbstractTreeUi$28@246f0ed9,notifier=null,catchExceptions=false,when=1269575112169] on sun.awt.X11.XToolkit@30404564
java.lang.RuntimeException: java.lang.IllegalArgumentException
at com.intellij.util.io.PersistentEnumerator.valueOf(PersistentEnumerator.java:468)
at com.intellij.util.io.StringRef.getString(StringRef.java:48)
at com.intellij.util.io.StringRef.length(StringRef.java:80)
at com.intellij.psi.impl.java.stubs.impl.PsiFieldStubImpl.<init>(PsiFieldStubImpl.java:54)
at com.intellij.psi.impl.java.stubs.JavaFieldStubElementType.deserialize(JavaFieldStubElementType.java:103)
at com.intellij.psi.impl.java.stubs.JavaFieldStubElementType.deserialize(JavaFieldStubElementType.java:44)
at com.intellij.psi.stubs.SerializationManagerImpl.deserialize(SerializationManagerImpl.java:200)
at com.intellij.psi.stubs.SerializationManagerImpl.deserialize(SerializationManagerImpl.java:203)
at com.intellij.psi.stubs.SerializationManagerImpl.deserialize(SerializationManagerImpl.java:203)
at com.intellij.psi.stubs.SerializationManagerImpl.deserialize(SerializationManagerImpl.java:185)
at com.intellij.psi.stubs.SerializedStubTree.getStub(SerializedStubTree.java:34)
at com.intellij.psi.stubs.StubTree.readFromVFile(StubTree.java:138)
at com.intellij.psi.stubs.StubTree.readOrBuild(StubTree.java:102)
at com.intellij.psi.impl.source.PsiFileImpl.getStubTree(PsiFileImpl.java:588)
at com.intellij.psi.impl.source.PsiFileImpl.getStub(PsiFileImpl.java:571)
at com.intellij.psi.impl.source.PsiJavaFileBaseImpl.getClasses(PsiJavaFileBaseImpl.java:79)
at com.intellij.ide.projectView.impl.ClassesTreeStructureProvider.modify(ClassesTreeStructureProvider.java:50)
at com.intellij.ide.util.treeView.AbstractTreeStructureBase.getChildElements(AbstractTreeStructureBase.java:49)
at com.intellij.ide.util.treeView.AbstractTreeUi.getChildrenFor(AbstractTreeUi.java:1316)
at com.intellij.ide.util.treeView.AbstractTreeUi.processUnbuilt(AbstractTreeUi.java:1256)
at com.intellij.ide.util.treeView.AbstractTreeUi.updateNodeChildren(AbstractTreeUi.java:1028)
at com.intellij.ide.util.treeView.AbstractTreeUi.access$1900(AbstractTreeUi.java:55)
at com.intellij.ide.util.treeView.AbstractTreeUi$40$3.run(AbstractTreeUi.java:2330)
at com.intellij.openapi.util.ExecutionCallback.callback(ExecutionCallback.java:72)
at com.intellij.openapi.util.ExecutionCallback.doWhenExecuted(ExecutionCallback.java:53)
at com.intellij.openapi.util.ActionCallback.doWhenDone(ActionCallback.java:85)
at com.intellij.ide.util.treeView.AbstractTreeUi$40.run(AbstractTreeUi.java:2290)
at com.intellij.ide.util.treeView.AbstractTreeUi$40.run(AbstractTreeUi.java:2241)
at com.intellij.openapi.util.AsyncResult$1.run(AsyncResult.java:31)
at com.intellij.openapi.util.ExecutionCallback.callback(ExecutionCallback.java:72)
at com.intellij.openapi.util.ExecutionCallback.doWhenExecuted(ExecutionCallback.java:53)
at com.intellij.openapi.util.ActionCallback.doWhenDone(ActionCallback.java:85)
at com.intellij.openapi.util.AsyncResult.doWhenDone(AsyncResult.java:29)
at com.intellij.ide.util.treeView.AbstractTreeUi.processExistingNode(AbstractTreeUi.java:2241)
at com.intellij.ide.util.treeView.AbstractTreeUi.access$4000(AbstractTreeUi.java:55)
at com.intellij.ide.util.treeView.AbstractTreeUi$26$1.run(AbstractTreeUi.java:1394)
at com.intellij.ide.util.treeView.AbstractTreeUi$27.run(AbstractTreeUi.java:1451)
at com.intellij.ide.util.treeView.AbstractTreeUi.executeYieldingRequest(AbstractTreeUi.java:1519)
at com.intellij.ide.util.treeView.AbstractTreeUi.access$4300(AbstractTreeUi.java:55)
at com.intellij.ide.util.treeView.AbstractTreeUi$28$1.run(AbstractTreeUi.java:1487)
at com.intellij.util.ui.UIUtil.invokeLaterIfNeeded(UIUtil.java:1003)
at com.intellij.ide.util.treeView.AbstractTreeBuilder.runOnYeildingDone(AbstractTreeBuilder.java:314)
at com.intellij.ide.util.treeView.AbstractTreeUi.runOnYieldingDone(AbstractTreeUi.java:1593)
at com.intellij.ide.util.treeView.AbstractTreeUi$28.run(AbstractTreeUi.java:1485)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at com.intellij.ide.IdeEventQueue.f(IdeEventQueue.java:610)
at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:500)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:368)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: java.lang.IllegalArgumentException
at java.nio.Buffer.position(Buffer.java:218)
at com.intellij.util.io.PagedFileStorage.get(PagedFileStorage.java:171)
at com.intellij.util.io.PagedFileStorage.getInt(PagedFileStorage.java:121)
at com.intellij.util.io.ResizeableMappedFile.getInt(ResizeableMappedFile.java:139)
at com.intellij.util.io.PersistentEnumerator.valueOf(PersistentEnumerator.java:455)
... 54 more
FYI Just an udpate on my issues with IU-94.633 on Ubuntu 9.10 64-bit. (My problem is different from Ron's problem)
Sun released java 6 update 19, so I tried that, but IDEA is still crashing the JVM within seconds to minutes of running it.
From the JVM fatal error, it looks like a hotspot JIT error, so I added -Djava.compiler=NONE in idea.vmoptions and restarted again.
That made the problem go away, but IDEA is too slow to use. It took about 30 minutes for it to rebuild my cache.
I don't think IDEA has any bug, but each new version has different code, and it looks like the latest IDEA code is exposing a bug in the linux hotspot JIT.
When 9.0.2 is released, I'll try again. Maybe the problem will go away on it's own. I did file a bug with Sun, but who knows when or if they will look into it.
For development work, I've been forced to go back to Windows 7 64-bit platform which is working fine so far.
-Alex
./idea.sh
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (nmethod.cpp:1836), pid=6719, tid=140162546764048
# Error: guarantee(cont_offset != 0,"unhandled implicit exception in compiled code")
#
# JRE version: 6.0_19-b04
# Java VM: Java HotSpot(TM) 64-Bit Server VM (16.2-b04 mixed mode linux-amd64 compressed oops)
# An error report file with more information is saved as:
# /tmp/hs_err_pid6719.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
#
Aborted
I am having the same issue, anyone has a solid solution?
Besides it, the IDEA on Ubuntu often does not respond to key type and I have to restart my IDEA, it just happened recently and I don't think I have made any changes, any suggestion?
Can someone take a look?
It makes IDEA on Ubuntu useless...
i gave up and went to windows FWIW. No indexing issues.
The deciding point for me was when i sat side by side with a colleague with a mac, and his intellij started in about 10 seconds, where as mine took more than a minute. with a 2.8ghz C2D.
Ivan,are you having Ron's problem with attrib.dat.storageRecordIndex being 2GB and getting exceptions related to caching, or is the JVM crashing like my case? What versoin of IDEA/JDK/OS are you using?
Re: IDEA not responding to typing, I have not personally seen that, but I remember someone else had a problem like that and the it turned out they had one or more programs running "allways on top" and that was somehow interfering with IDEA. After they turned off "always on top", the problem went away.
Thanks for getting back to me Alex.
The project I was using was quite large...so I thought that might be the reason why the index was so large. But I also tried a couple of different things to deal with this. One real simple one was to try a project that was a lot smaller. I still had the same issue. Also, I tried loading the individual modules of the project (it's a multi-module maven project), and with the same result.
I should say that I am able to work for a period of maybe 30 minutes to 2 hours...but then, say when trying to open up a new java file using Ctrl-N, it'll say it's re-indexing again. Then, in the console, it will go nuts with those stack traces I put above, like just scrolling and scrolling, finally usually just saying that I've run out of memory.
Ubuntu 9.10
JDK1.6 update 18
It is 2G
Haha, I just read that you said you had 30,000 files...are you running 32-bit or 64 bit? I'm thinking that that may also make a difference..
I believe that those files are sparse files, meaning they report taking up two GBs but take up much less than that. I don't remember exactly how it works, but that may also have something to do with it.
I was also just thinking...is it possible that having that exception a bunch of times is normal, and maybe just it printing out to the console like it is is causing the issues with having memory problems?
Thanks Alex.
There is a JDK bug for this, you are lucky you did not get it yet :--)
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6506617
Ron,
I am running 64-bit Ubuntu 9.10 x86_64 same as you, but I am running latest 9.0.2 EAP IU-94.633, although at one point I was using the version you were using some months ago, and I didnt' see your problem at that time. As I mentioned my attrib.dat.storageRecordIndex is only 3 MB with 30,000 files. Maybe you should try the latest EAP also to see if it behaves any different?
There definitely seems to be a bug, but it's not clear if it is in IDEA's code or in the linux JVM. Hopefully Jetbrains can help troubleshoot your problem.
-Alex
Hey Alex,
Thanks for trying to help. I have been trying with the latest EAP: idea-IC-95.4, but it has not seemed to help at all.
I should have mentioned that when I mentioned file sizes, it was the sizes reported by ls -l, like this:
$ ls -l
total 36
-rw-r--r-- 1 ronnie ronnie 8341984 2010-04-05 16:46 attrib.dat.storageData
-rw-r--r-- 1 ronnie ronnie 1990032 2010-04-05 16:46 attrib.dat.storageRecordIndex
-rw-r--r-- 1 ronnie ronnie 508215968 2010-04-05 16:50 content.dat.storageData
-rw-r--r-- 1 ronnie ronnie 1826448 2010-04-05 16:50 content.dat.storageRecordIndex
-rw-r--r-- 1 ronnie ronnie 2257648 2010-04-05 16:46 names.dat
-rw-r--r-- 1 ronnie ronnie 1389321 2010-04-05 16:46 names.dat.keystream
-rw-r--r-- 1 ronnie ronnie 8 2010-04-05 16:46 names.dat.keystream.len
-rw-r--r-- 1 ronnie ronnie 8 2010-04-05 16:46 names.dat.len
-rw-r--r-- 1 ronnie ronnie 2629675 2010-04-05 16:53 records.dat
-rw-r--r-- 1 ronnie ronnie 8 2010-04-05 16:53 records.dat.len
However, du -sk reports something completely different:
$ du -sk *
0 attrib.dat.storageData
0 attrib.dat.storageRecordIndex
0 content.dat.storageData
0 content.dat.storageRecordIndex
0 names.dat
0 names.dat.keystream
12 names.dat.keystream.len
12 names.dat.len
0 records.dat
12 records.dat.len
Which is fine. I understand that these files are suppose to be sparse.
I'm wondering if the problem may be related to what Kohsuke is posting about here:
http://weblogs.java.net/blog/kohsuke/archive/2009/09/17/when-long-not-long-enough
Perhaps something to look into?
Ron,
There is a new IU-95.24 build which has a performance fix related to indexing..
See http://confluence.jetbrains.net/display/IDEADEV/Maia+95.24+Release+Notes
See http://youtrack.jetbrains.net/issue/IDEA-53409
The behavior may be different with the new build.
Something doesn't look right with your "du -sk". The files are only 0 or 12 kb ?
See mine below. The attrib.dat.storageRecordIndex shows about the same size with "ls -l" or "du -sk".
I think there is a bug somewhere either in IDEA or JVM. The exceptions you are getting seem to indicate the cachefile got corrupted. I don't think it is because you reached a maximum file size if you only have 7000 files. I'm hoping jetbrains knows how to troubleshoot it to find the problem. Cache corruption problems are a PIA. Almost as bad as the JVM crashes which I've been dealing with lately.
-Alex
% ls -l
total 638476
4096 2010-04-03 20:56 ./
4096 2010-04-03 20:25 ../
13291520 2010-04-03 21:02 attrib.dat.storageData
2968768 2010-04-03 21:02 attrib.dat.storageRecordIndex
1013153792 2010-04-03 21:02 content.dat.storageData
2011136 2010-04-03 21:02 content.dat.storageRecordIndex
5961605 2010-04-03 20:59 names.dat
3668679 2010-04-03 20:59 names.dat.keystream
8 2010-04-03 20:52 names.dat.keystream.len
8 2010-04-03 20:52 names.dat.len
11283983 2010-04-03 21:02 records.dat
8 2010-04-03 20:52 records.dat.len
% du -sk *
12972 attrib.dat.storageData
2904 attrib.dat.storageRecordIndex
600152 content.dat.storageData
1968 content.dat.storageRecordIndex
5836 names.dat
3588 names.dat.keystream
4 names.dat.keystream.len
4 names.dat.len
11036 records.dat
4 records.dat.len
So, just a small update....
I did download the latest EAP, 95.24...I got the same error, but I was looking at it in the error viewer in Idea, and it said "Blame JetGroovy" at the top to submit the stack trace. We have some groovy code in our code base, but I didn't see anything in the stack traces that would indicate that the error was originating from JetGroovy.
Last night, I turned off the plugin and was able to work without error for a while before I shut down. I'm going to be working all day today, so I'll see if that remedies the probelm. Hopefully it does! I would miss the JetGroovy plugin but at least it might be able to narrow down the problem.
I'll let you know how it goes.
So I found out there is a bug with du when using encryptfs:
https://bugs.launchpad.net/ecryptfs/+bug/390833
Which was causing it to report the wrong information.
Here's how it actually looks:
$ ls -o
total 1408
-rw-r--r-- 1 ronnie 9214048 2010-04-07 08:39 attrib.dat.storageData
-rw-r--r-- 1 ronnie 2200880 2010-04-07 08:39 attrib.dat.storageRecordIndex
-rw-r--r-- 1 ronnie 546427232 2010-04-07 08:47 content.dat.storageData
-rw-r--r-- 1 ronnie 2002416 2010-04-07 08:47 content.dat.storageRecordIndex
-rw-r--r-- 1 ronnie 2257648 2010-04-07 08:39 names.dat
-rw-r--r-- 1 ronnie 1389321 2010-04-07 08:39 names.dat.keystream
-rw-r--r-- 1 ronnie 8 2010-04-07 08:39 names.dat.keystream.len
-rw-r--r-- 1 ronnie 8 2010-04-07 08:39 names.dat.len
-rw-r--r-- 1 ronnie 4273223 2010-04-07 08:47 records.dat
-rw-r--r-- 1 ronnie 8 2010-04-07 08:47 records.dat.len
$ du -sk --apparent-size *
8999 attrib.dat.storageData
2150 attrib.dat.storageRecordIndex
533621 content.dat.storageData
1956 content.dat.storageRecordIndex
2205 names.dat
1357 names.dat.keystream
1 names.dat.keystream.len
1 names.dat.len
4174 records.dat
1 records.dat.len
It's still disturbing to me that the storageData file is 533 MBs.