-
Bug
-
Resolution: Won't Fix
-
P4
-
None
-
7
-
x86
-
linux
A DESCRIPTION OF THE REQUEST :
This issue was previously reported in BUG ID 6727824. The core issue is still the same: when attempting to run java with the -jar argument and the specified jar file lives on an OrangeFS (previously known as PVFS) file system it fails with the error:
mmap failed for CEN and END part of zip file
Exception in thread "main" java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:127)
at java.util.jar.JarFile.<init>(JarFile.java:135)
at java.util.jar.JarFile.<init>(JarFile.java:72)
This is due to the OrangeFS file system not supporting shared mmap. Based on the previous bug report it sounds like this may be an issue for other file systems with specific flags/configurations.
The feature request is:
1) If the mmap() doesn't need the MAP_SHARED flag to provide the required functionality then remove it and use MAP_PRIVATE.
2) If the functionality for MAP_SHARED is required in the current implementation, add an alternate implementation that does not require that functionality. The second implementation could either require a configuration value or could serve as a fall-back mechanism.
JUSTIFICATION :
Not all file systems support MAP_SHARED mmap(). OrangeFS is one example. It appears that UFS with the forcedirectio flag may also have issues.
Removing the requirement that a file system holding a jar file provide MAP_SHARED mmap() would allow running java applications in more environments.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
When running 'java -jar foo.jar' the application would execute whether the underlying file system provides support for the MAP_SHARED mmap() flag or not.
ACTUAL -
java -jar hello.jar
mmap failed for CEN and END part of zip file
Exception in thread "main" java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:127)
at java.util.jar.JarFile.<init>(JarFile.java:135)
at java.util.jar.JarFile.<init>(JarFile.java:72)
The mmap() call fails due to use of the MAP_SHARED flag.
---------- BEGIN SOURCE ----------
public class hello {
public static void main(String[] args) {
System.out.println("Hi there!");
}
}
Test Case, current working directory is on an OrangeFS file system
javac hello.java
jar cvf hello.jar hello.class
java -jar hello.jar
---------- END SOURCE ----------
This issue was previously reported in BUG ID 6727824. The core issue is still the same: when attempting to run java with the -jar argument and the specified jar file lives on an OrangeFS (previously known as PVFS) file system it fails with the error:
mmap failed for CEN and END part of zip file
Exception in thread "main" java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:127)
at java.util.jar.JarFile.<init>(JarFile.java:135)
at java.util.jar.JarFile.<init>(JarFile.java:72)
This is due to the OrangeFS file system not supporting shared mmap. Based on the previous bug report it sounds like this may be an issue for other file systems with specific flags/configurations.
The feature request is:
1) If the mmap() doesn't need the MAP_SHARED flag to provide the required functionality then remove it and use MAP_PRIVATE.
2) If the functionality for MAP_SHARED is required in the current implementation, add an alternate implementation that does not require that functionality. The second implementation could either require a configuration value or could serve as a fall-back mechanism.
JUSTIFICATION :
Not all file systems support MAP_SHARED mmap(). OrangeFS is one example. It appears that UFS with the forcedirectio flag may also have issues.
Removing the requirement that a file system holding a jar file provide MAP_SHARED mmap() would allow running java applications in more environments.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
When running 'java -jar foo.jar' the application would execute whether the underlying file system provides support for the MAP_SHARED mmap() flag or not.
ACTUAL -
java -jar hello.jar
mmap failed for CEN and END part of zip file
Exception in thread "main" java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:127)
at java.util.jar.JarFile.<init>(JarFile.java:135)
at java.util.jar.JarFile.<init>(JarFile.java:72)
The mmap() call fails due to use of the MAP_SHARED flag.
---------- BEGIN SOURCE ----------
public class hello {
public static void main(String[] args) {
System.out.println("Hi there!");
}
}
Test Case, current working directory is on an OrangeFS file system
javac hello.java
jar cvf hello.jar hello.class
java -jar hello.jar
---------- END SOURCE ----------
- relates to
-
JDK-6727824 jar files will not run from a PVFS2 file system
-
- Open
-