Getting IDEA to run under 2.6 kernel

It seems impossible to get any version of IDEA to run under the 2.6
Linux kernel, it has something to do with non blocking IO file copying.
Is it possible to run IDEA with another JDK such as Blackdown to see if
this is a JDK bug?

regards /Marcus Ahnve

12 comments
Comment actions Permalink

Are you getting an error dialog on copying resources.jar? I just ran into that on my gentoo box with 2.6.1-rc1-mm2.

0
Comment actions Permalink

Marcus Ahnve wrote:

It seems impossible to get any version of IDEA to run under the 2.6
Linux kernel, it has something to do with non blocking IO file copying.
Is it possible to run IDEA with another JDK such as Blackdown to see if
this is a JDK bug?


Blackdown-1.4.1 has the same problem - it is either a bug in the kernel
exposed by the JDK, or vice versa 8-)
Having said that - I suspect that the problem is in the JDK: NIO is
bug-riddled as it is...

Regards,
Edwin

0
Comment actions Permalink

Adding this VM flag, -Didea.jars.nocopy=true, to the command line flags in idea.lax fixes the problem. This seems to be some issue with copying jars, or resources within them, (creating temp files?). Anyway this fixed this issue for me.

Regards, Burkni

0
Comment actions Permalink

Burkni Palsson wrote:

Adding this VM flag, -Didea.jars.nocopy=true, to the command line flags in idea.lax fixes the problem. This seems to be some issue with copying jars, or resources within them, (creating temp files?). Anyway this fixed this issue for me.

Regards, Burkni

0
Comment actions Permalink

Well. That last message was a big success. Hmm. Anyway:

Burkni Palsson wrote:

Adding this VM flag, -Didea.jars.nocopy=true, to the command line
flags in idea.lax fixes the problem. This seems to be some issue with
copying jars, or resources within them, (creating temp files?).
Anyway this fixed this issue for me.


I also get this problem when IDEA tries to copy non-java resources to
the target (classes) dir (property files for example).
Does that work for you?

CU,
Edwin

0
Comment actions Permalink

You mean like, when deploying projects to a jar file? I can't say regarding Idea, but when using ant I have not had this issue. I think this only pops up when using java.nio, i.e. native streams, like Idea uses for better performance.
This must be some low level vm issue, and it has to/will be sorted out soon, when usage of the new kernel and glibc with native posix threads becomes the standard. Whether glibc is build using native posix threads or not, might have some contribution to this issue. Issues arising because of that can be taken care of with the env. var. LD_ASSUME_KERNEL=2.4.0 or something, and having glibc compat. libraries up2date.
B.t.w. I'am running gentoo linux with kernel 2.6.1 and gcc 3.3 r5

Regards, Burkni.

0
Comment actions Permalink

Burkni Palsson wrote:

You mean like, when deploying projects to a jar file?


No, I mean like when there's a property-file in your source tree. After
building IDEA copies that to the classes directory, or rather, tries to,
and fails. Similar message to the jar-file-copying problem. Running a
little test-program shows that NIO-copying simply doesn't work at all -
so it isn't IDEA's fault.

taken care of with the env. var. LD_ASSUME_KERNEL=2.4.0 or something,
and having glibc compat. libraries up2date. B.t.w. I'am running
gentoo linux with kernel 2.6.1 and gcc 3.3 r5


So am I - do you have a NPTL-glibc? Or the 'normal' one?

CU,
Edwin

0
Comment actions Permalink

Thanks for all answers. The suggested command line args removes the
initial problem when copying resources.jar, but my dependent jar files
get copied as well which fails. I guess this is what happens to Edwin as
well.

Also the ASSUME... flag does not really work.

This basically sucks, as I'm now forced to use that other IDE, hey
intellij people, hear that? ;)

Cheers /Marcus Ahnve

0
Comment actions Permalink

I think the problem with installing plugins taht I posted yesterday is
related to this. I added the JVM flag aswell and that fixes the
annoying copy failures on startup but doesn't fix the problems
installing plugins. This could be a really serious issue for IntelliJ.
Not sure whether it's their fault or Sun's JDK fault though...

Nick.

Marcus Ahnve wrote:

It seems impossible to get any version of IDEA to run under the 2.6
Linux kernel, it has something to do with non blocking IO file copying.
Is it possible to run IDEA with another JDK such as Blackdown to see if
this is a JDK bug?

regards /Marcus Ahnve

0
Comment actions Permalink

Burkni Palsson wrote:

You mean like, when deploying projects to a jar file? I can't say regarding Idea, but when using ant I have not had this issue. I think this only pops up when using java.nio, i.e. native streams, like Idea uses for better performance.
This must be some low level vm issue, and it has to/will be sorted out soon, when usage of the new kernel and glibc with native posix threads becomes the standard. Whether glibc is build using native posix threads or not, might have some contribution to this issue. Issues arising because of that can be taken care of with the env. var. LD_ASSUME_KERNEL=2.4.0 or something, and having glibc compat. libraries up2date.
B.t.w. I'am running gentoo linux with kernel 2.6.1 and gcc 3.3 r5


This has been discussed in several bugreports:

Error copying jars to system dir under Linux-kernel 2.6.0
http://www.intellij.net/tracker/idea/viewSCR?publicId=24830

Error copying jar file
http://www.intellij.net/tracker/idea/viewSCR?publicId=15198

Error when IDEA tries to copy files
http://www.intellij.net/tracker/idea/viewSCR?publicId=15394

Error while copying file uiDesigner.jar
http://www.intellij.net/tracker/idea/viewSCR?publicId=16627

Error copying jars to system dir under Linux-kernel 2.6.0
http://www.intellij.net/tracker/idea/viewSCR?publicId=24830

It comes down to a change in behaviour of linux sendfile() as discussed
in the first link. IDEA could probably workaround by catching the
InvalidArgument exception, and retrying with a different/slower
implementation of filecopy(). Alternatively, you could patch the kernel
to remove the change that broke things.

Cheers, Simon

0
Comment actions Permalink

It's not a bugfix, but ant still works, and works fine. I just created ant target for building project, copying all needed files there - and it passed without errors.

So, if you need to compile projects under 2.6, as I do, you can use ant.

0
Comment actions Permalink

What about Blackdowns 1.4.2_rc1? It seems to have a lot of bugfixes. But as far as I know there's no way to get this JDK to work with IDEA?


0

Please sign in to leave a comment.