Skip to main content

Log Spam Generated While Attempting to Lock File

In build version 3100.6, the stdout-stderr logs may display errors of attempts to lock a file.

Description

In build version 3100.6, the stdout-stderr logs, may display errors of attempts to lock a file.

Steps to Replicate

  1. Review the stdout-stderr logs

Expected Behavior:
The following message is not repeatedly displayed in the logs:

INFO | jvm 1 | 2016/09/15 15:35:31 | Sep 15, 2016 3:35:31 PM java.util.prefs.FileSystemPreferences checkLockFile0ErrorCode
INFO | jvm 1 | 2016/09/15 15:35:31 | WARNING: Could not lock System prefs. Unix error code 0.
INFO | jvm 1 | 2016/09/15 15:35:31 | Sep 15, 2016 3:35:31 PM java.util.prefs.FileSystemPreferences syncWorld
INFO | jvm 1 | 2016/09/15 15:35:31 | WARNING: Couldn't flush system prefs: java.util.prefs.BackingStoreException: Couldn't get file lock.
INFO | jvm 1 | 2016/09/15 15:36:01 | Sep 15, 2016 3:36:01 PM java.util.prefs.FileSystemPreferences checkLockFile0ErrorCode
INFO | jvm 1 | 2016/09/15 15:36:01 | WARNING: Could not lock System prefs. Unix error code 0.​

​

Observed Behavior:
The following message is repeatedly displayed in the logs:

INFO | jvm 1 | 2016/09/15 15:35:31 | Sep 15, 2016 3:35:31 PM java.util.prefs.FileSystemPreferences checkLockFile0ErrorCode
INFO | jvm 1 | 2016/09/15 15:35:31 | WARNING: Could not lock System prefs. Unix error code 0.
INFO | jvm 1 | 2016/09/15 15:35:31 | Sep 15, 2016 3:35:31 PM java.util.prefs.FileSystemPreferences syncWorld
INFO | jvm 1 | 2016/09/15 15:35:31 | WARNING: Couldn't flush system prefs: java.util.prefs.BackingStoreException: Couldn't get file lock.
INFO | jvm 1 | 2016/09/15 15:36:01 | Sep 15, 2016 3:36:01 PM java.util.prefs.FileSystemPreferences checkLockFile0ErrorCode
INFO | jvm 1 | 2016/09/15 15:36:01 | WARNING: Could not lock System prefs. Unix error code 0.​

Resolution / Workaround

This is because Java 8 needs write access to a directory.
To fix it:

  • Preferred: add the directory to the bbuser home directory:

mkdir /home/bbuser/.java/.systemPrefs
chown bbuser /home/bbuser/.java/.systemPrefs

​

  • OR give bbuser ownership of the java system level version of it:

chown -R bbuser /etc/.java/.systemPrefs
​

Target Release

Will Not Fix

Did this answer your question?