JDK-7197662 : (prefs) test/java/util/prefs/AddNodeChangeListener.java fails by timeout or by "couldn't get file lock"
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util
  • Affected Version: 7
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2012-09-11
  • Updated: 2013-06-26
  • Resolved: 2012-11-30
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7 JDK 8
7u40Fixed 8 b68Fixed
Related Reports
Relates :  
Description
Test 
java/util/prefs/AddNodeChangeListener.java	
fails sometimes by timeout, sometimes with stacktrace
java.util.prefs.BackingStoreException: Couldn't get file lock.
	at java.util.prefs.FileSystemPreferences.sync(FileSystemPreferences.java:730)
	at java.util.prefs.FileSystemPreferences.flush(FileSystemPreferences.java:824)
	at AddNodeChangeListener.addNode(AddNodeChangeListener.java:61)
	at AddNodeChangeListener.main(AddNodeChangeListener.java:47)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:474)
	at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:94)
	at java.lang.Thread.run(Thread.java:722)

Sometimes test fails with stacktrace
Exception in thread "main" java.lang.RuntimeException: Failed
	at AddNodeChangeListener.main(AddNodeChangeListener.java:54)

Failures in Aurora: http://vmsqe-app.russia.sun.com/surl/LW

Comments
The tests in java/util/prefs created new nodes under the user's home directory. This caused the tests to start out with pre-existing preferences and sometimes lead to interference between the tests. This fix was to change the userRoot property for each of these tests so these tests create nodes only under the current directory.
28-02-2013

EVALUATION I've marked this bug as incomplete, please tell us which platform this is, ideally the link to the jtreg .jtr file.
11-09-2012