JDK-8079418 : (prefs) BackingStoreException when calling flush on root node[macosx]
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util
  • Affected Version: 9
  • Priority: P4
  • Status: Resolved
  • Resolution: Cannot Reproduce
  • OS: os_x
  • CPU: generic,unknown
  • Submitted: 2015-05-05
  • Updated: 2021-07-05
  • Resolved: 2015-08-28
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.
Other
tbd_minorResolved
Related Reports
Cloners :  
Description
This seems regression of fix for 7160252 and now for JDK-7184287 in jdk 9.

These 4 tests, 
java/util/prefs/AddNodeChangeListener.java
java/util/prefs/CheckUserPrefsStorage.sh
java/util/prefs/RemoveReadOnlyNode.java
java/util/prefs/RemoveUnregedListener.java

Are failing with this stack trace 
java.util.prefs.BackingStoreException: Synchronization failed for node '/'
	at java.util.prefs.MacOSXPreferences.flush(MacOSXPreferences.java:226)
	at AddNodeChangeListener.addNode(AddNodeChangeListener.java:60)
	at AddNodeChangeListener.main(AddNodeChangeListener.java:46)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:502)
	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:92)
	at java.lang.Thread.run(Thread.java:745)

when run on mac as a non-root user.
It can be reproduced with the test case listed by AmyLu in JDK-7184287.
As non-root, compile and run and it fails with the above BackingStoreException. 
sudo to root, run, and it passes.
Comments
Hello we notice these errors as well quite regularly in our nightly tests on a macOS 10.15.3 machine . java.util.prefs.BackingStoreException: Synchronization failed for node '/' at java.util.prefs.MacOSXPreferences.flush(MacOSXPreferences.java:241) at AddNodeChangeListener.addNode(AddNodeChangeListener.java:60) at AddNodeChangeListener.main(AddNodeChangeListener.java:46) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127) at java.lang.Thread.run(Thread.java:836) Is that related to some properties of the user running those tests ? Best regards, Matthias
05-07-2021

The problem does not occur when running the tests as a standard user therefore resolving as unreproducible.
28-08-2015

Forgot that my user account on my MacBook Pro is an Administrator account. Created a Standard user account and re-ran the java/util/prefs test from that account. Still the failure was not observed.
28-08-2015

I cannot reproduce this as a non-root user with the current JDK 9-dev clone on my MacBook Pro.
20-08-2015

sorry, this was cloned from a verified bug but I don't know how to get rid of the Verification field value. :/
05-05-2015