Code Review Request: 7186555: (prefs) continual printing of BackingStoreException on console on Linux

Mike Duigou mike.duigou at
Tue May 21 17:19:46 UTC 2013

On May 21 2013, at 09:53 , Kurchi Subhra Hazra wrote:

> On 5/21/13 9:40 AM, Mike Duigou wrote:
>> Any chance that it would be possible to stop the periodic attempts to sync preferences?
> - I did think of that too - but the syncing may fail(temporarily) if the prefs object could not retrieve the lock to the
> associated prefs file. We could stop syncing attempts if the sync fails say n number of times - but I do not think
> that is a good solution.

My experience with this problem is that the prefs code tries again forever at once per second for the entire life of the VM. This never seemed appropriate. This issue has been around a very long time as:
java.util.prefs system prefs directory setup should be added to install script

and the oldest one I could find:

Usually this is caused by installing Java on a system from the tarballs rather than using the installer.

BTW, whoever decided to name the prefs files in /etc ".java/" and ".systemPrefs/" was evil and/or foolish.


> We may however be able to stop the syncing attempts if we are guaranteed by some error code that any future
> writing attempts will fail. I'll check on that.
> - Kurchi
>> The log spamming is a symptom, not the cause.
>> Could the prefs code be enhanced to better determine if writing is possible before attempting and failing?
>> Mike
>> On May 21 2013, at 01:21 , Mandy Chung wrote:
>>> On 5/21/2013 1:42 AM, Kurchi Hazra wrote:
>>>> Hi,
>>>>   Please review this change to fix 718655. The bug complaints about continuous BackingStoreExceptions
>>>> printed on the console, the user is just seeing logged warnings from BackingStoreExceptions raised in periodic attempts to sync preferences. Preferences use which is enabled by default, and has a default level of INFO. Changing the logging in this file to FINE prevents the user from seeing information that he/she is not interested in.
>>>>   Bug:
>>>> Webrev:
>>> Looks good and L116 emits a INFO log message that should be changed to FINE too.
>>> Mandy

More information about the core-libs-dev mailing list