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!

0
37 comments
Avatar
Permanently deleted user

Actually, finding out about that bug led me to try something else.  I was wondering if the encrypted fs would be causing the issue.  I only have my home directory encrypted, so I moved my Idea settings out to /usr/local, which it's not.

So far, I've worked all day and haven't had any issues with the cache getting corrupted at all.  Maybe if I have time this weekend I'll take a look into it a bit more.

Thanks!  If this is possibly the solution then you've helped lead me to it.

0
Avatar
Permanently deleted user

So, just to bring some closure to this...it appears that putting the settings on a non-encrypted fs seems to have solved the problem.  I've been using it for two days now and haven't had any problems at all, whereas before I would have an issue after running an hour or two, and then it would be difficult for Idea to come up again.

For anyone else looking around, I just modified the following properties in idea.properties:

# path to IDEA config folder
idea.config.path=/usr/local/idea/config


# path to IDEA system folder
idea.system.path=/usr/local/idea/system


# path to user installed plugins folder
idea.plugins.path=/usr/local/idea/config/plugins


Only my home directory has encryption...the / does not.

Not exactly sure why that was the problem, but hopefully that helps anyone else who stumbles upon this thread.  Probably over the weekend I will try to gather a lot of information for a bug report.  If there's anything else anybody thinks I should report in there, let me know.

0
Avatar
Permanently deleted user

Ron,

I had the same issue and using your solution fixed the issue completely! I had tried switching to an older version of intellij (9.0.1) and tried using the 32bit sun jvm.

Thanx again!
Rob.

0
Avatar
Permanently deleted user

Ron,

Have you made a bug report for intellij or Ubuntu? It is not specific to the JDK version by the way (I tried the 32 bit 1.6.0_20 and I am now again on the 64 bit 1.6.0_15). If you have no time to do it, let me know and I'll do it for you.

Kind regards,
Rob.

0
Avatar
Permanently deleted user

Great!  I'm glad I wasn't the only one it was affecting.

Unfortunately I hadn't gone back and created a bug report yet, because I wanted to make sure that that was actually the problem.  It seems like it is, as I have been running without trouble since I changed it.  If you do get to it let me know.

0

I have another data point that may be helpful.  I had been running successfully on JDK 1.6.0_18 and 9.0.2 since 9.0.2 came out.  I upgraded to JDK1.6.0_20 today and immediately got stream of exceptions referred to here.  I invalidated the cache as directed in one of the posts, restarted and things look good so far.  crossing my fingers!

-- Patrick

0
Avatar
Permanently deleted user

I had the exact same issue with idea-IU-103.255, ubuntu 10.10. Moving .Intellij outside of home fixed it.
So is it an IDEA issue or an Ubuntu issue? The ubuntu bug seems to be fixed and closed.

Anyway thanks a lot for reporting the issue and sharing the workaround!

$uname -a
Linux zemachine 2.6.35-28-generic #49-Ubuntu SMP Tue Mar 1 14:39:03 UTC 2011 x86_64 GNU/Linux

$java -version
java version "1.6.0_23"
Java(TM) SE Runtime Environment (build 1.6.0_23-b05)

0

Please sign in to leave a comment.