-
Bug
-
Resolution: Fixed
-
P3
-
7
FULL PRODUCT VERSION :
java version "1.7.0-ea"
Java(TM) SE Runtime Environment (build 1.7.0-ea-b27)
Java HotSpot(TM) Client VM (build 13.0-b01, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Verze 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
A DESCRIPTION OF THE PROBLEM :
Tried to run Eclipse 3.1.2-based app with JRE 7. That failed when it tried to lock a file. I tracked the problem down and reproduced it with attached test code. If I use RandomAccessFile instead of FileOutputStream (inspired by the change done in Eclipse 3.3.2) it works.
Disk volume where the lock file is created is normal filesystem, not networked one.
Works with JRE 1.5 and 6.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run provided example.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
No error.
ACTUAL -
Exception.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
Exception in thread "main" java.io.IOException: Pstup byl odepen
at sun.nio.ch.FileChannelImpl.lock0(Native Method)
at sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:903)
at java.nio.channels.FileChannel.tryLock(FileChannel.java:978)
at test.Test.main(Test.java:10)
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
package test;
import java.io.File;
import java.io.FileOutputStream;
public class Test {
public static void main(String[] args) throws Exception {
File lockFile = new File("C:\\temp\\lock");
FileOutputStream fileStream = new FileOutputStream(lockFile, true);
fileStream.getChannel().tryLock();
fileStream.close();
}
}
---------- END SOURCE ----------
Release Regression From : 6
The above release value was the last known release where this
bug was not reproducible. Since then there has been a regression.
java version "1.7.0-ea"
Java(TM) SE Runtime Environment (build 1.7.0-ea-b27)
Java HotSpot(TM) Client VM (build 13.0-b01, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Verze 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
A DESCRIPTION OF THE PROBLEM :
Tried to run Eclipse 3.1.2-based app with JRE 7. That failed when it tried to lock a file. I tracked the problem down and reproduced it with attached test code. If I use RandomAccessFile instead of FileOutputStream (inspired by the change done in Eclipse 3.3.2) it works.
Disk volume where the lock file is created is normal filesystem, not networked one.
Works with JRE 1.5 and 6.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run provided example.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
No error.
ACTUAL -
Exception.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
Exception in thread "main" java.io.IOException: Pstup byl odepen
at sun.nio.ch.FileChannelImpl.lock0(Native Method)
at sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:903)
at java.nio.channels.FileChannel.tryLock(FileChannel.java:978)
at test.Test.main(Test.java:10)
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
package test;
import java.io.File;
import java.io.FileOutputStream;
public class Test {
public static void main(String[] args) throws Exception {
File lockFile = new File("C:\\temp\\lock");
FileOutputStream fileStream = new FileOutputStream(lockFile, true);
fileStream.getChannel().tryLock();
fileStream.close();
}
}
---------- END SOURCE ----------
Release Regression From : 6
The above release value was the last known release where this
bug was not reproducible. Since then there has been a regression.
- relates to
-
JDK-6631352 File{OutputStream,Writer} should implement atomic append mode using FILE_APPEND_DATA (win)
- Resolved