Community
Participate
Working Groups
Only appears on linux (works with Windows XP). A file larger than 2147483647 bytes will not appear in the workbench as an IResource. Problem appears to be in LocalFileNatives.fetchFileInfo(). The file length always returns as zero. If I trick the LocalFileNatives to not load the plugin library (i.e. hasNatives == false by corrupting the System.loadLibrary() call...ugly but it works) then I can load files larger than 2147483647 bytes into the workspace. Create a file that is 2147483647 bytes or larger. Link or copy it into your workspace. Do a refresh (F5). The file will not appear. No errors/warnings/traces messages are logged. We consider a 2GB file to of a modest size. Is there a work around? This problem is hinted at in bug 149812. java.version=1.5.0_01 BootLoader constants: OS=linux, ARCH=x86, WS=gtk Red Hat Linux release 9 (Shrike) Kernel 2.4.20-8smp on an i686
Work around is to exclude the org.eclipse.core.filesystem.linux.x86* plugin. This forces the use of the Java IO package which can correctly report a filesize greater than 2GB. Any ideas as to the performance lost by not using the native org.eclipse.core.filesystem.* plugin?
I don't have numbers, but the fragment is used for: - performance - since multiple calls are made to the filesystem to get information about the files and folders, we bundle them all into one call and then pull interesting info out of the resulting data structure (flags, timestamps, gender, etc) - timestamp granularity - some VMs have really bad granularity when calling File#lastModified (we came across one that rounded to the closest 2 second) - setReadOnly - there used to be problems with this call on java.io.File (but it may be fixed now) (might be more reasons now but those were the original ones)
Thanks for the info. Any idea when this limitation will be fixed?
A year has passed. Are we past the 2GB file size limit?
Szymon, what are your thoughts on this? Are we just calling the wrong native in our library or is the change deeper than that? This bug is interesting in terms of plan item bug 200102.
The 'ls' command on Linux returns size 0 for >2GB file as well. AFAIK this is a limitation of Linux kernel. I can attach some links to it, but it is easy to find some articles. Since this is a common problem with Linux, we should handle it above e.g. trying to show the resource anyway. The other way is to use java.io since the problem seems to be solve there.
I want to address the bug, however if the bug day comes first, maybe it will be a challenge for someone.
For those who are interested here is a quick way to create a 5GB file to test your linux installation. $ dd if=/dev/zero of=bigfile.dat bs=1024 count=5242880 $ ls -lh bigfile.dat Are you sure you are not mixing up a linux kernel issue with other file size constraints caused by the file system type or libc version? We`ve found the work around of deleting the org.eclipse.core.filesystem.linux.x86* plugin to be a very awkward fix. When the org.eclipse.platform feature is updated by the update manager the org.eclipse.core.filesystem.linux.x86* reappears. :(
(In reply to comment #7) > I want to address the bug, however if the bug day comes first, maybe it will be > a challenge for someone. Ok, I'll take a shot at it.
Created attachment 83892 [details] patch for Large File Support (LFS) I'm not sure how the Mac handles LFS so I left it unchanged.
David, I verified the patch on Linux and it works. Have you verified that it works on other Unix platforms?
I dispel your doubts David... For Mac this is not an issue.
(In reply to comment #11) I tested Centos and Solaris 8 and 9. I don't have access to the other flavours of unix. From what I've read it should work.
I have released the Makefile patches. Szymon, can you attach a compiled library for x86 linux so I can commit it?
Created attachment 84756 [details] Library for linux x86
Created attachment 84757 [details] Build info for the native lib
Created attachment 84758 [details] Build info for the native lib
The tests on Linux has passed.
I dropped the "Library for linux x86" directly into our application and it works. Our +300 gigabyte sized files appear! :) Thanks Szymon.
Patch released for Linux fragment. Thanks to you David for doing the work on this - we just compiled and released it.
Right. Thanks David. As a reward, you can choose the next one to fix ;-)
Verified in I20071210-1800.