cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMX -- Unwanted STDERR Output

Rob.Riggs
Senior

STM32CubeMX 6.12.0 running on Fedora 39 from a terminal window generates a stream of the following errors to the console:

 

Jul 16, 2024 3:58:40 PM java.util.prefs.FileSystemPreferences checkLockFile0ErrorCode
WARNING: Could not lock System prefs. Unix error code 2.
Jul 16, 2024 3:58:40 PM java.util.prefs.FileSystemPreferences syncWorld
WARNING: Couldn't flush system prefs: java.util.prefs.BackingStoreException: Couldn't get file lock.
Jul 16, 2024 3:59:10 PM java.util.prefs.FileSystemPreferences checkLockFile0ErrorCode
WARNING: Could not lock System prefs. Unix error code 2.
Jul 16, 2024 3:59:10 PM java.util.prefs.FileSystemPreferences syncWorld
WARNING: Couldn't flush system prefs: java.util.prefs.BackingStoreException: Couldn't get file lock.

This happens every 30 seconds.

Looking at the strace output of the Java process, it is attempting to open a file in /etc which does not exist:

readlink("/etc", 0x7f01c7bf1060, 1023) = -1 EINVAL (Invalid argument)
readlink("/etc/.java", 0x7f01c7bf1060, 1023) = -1 EINVAL (Invalid argument)
readlink("/etc/.java/.systemPrefs", 0x7f01c7bf1060, 1023) = -1 EINVAL (Invalid argument)
readlink("/etc/.java/.systemPrefs/.system.lock", 0x7f01c7bf1060, 1023) = -1 ENOENT (No such file or directory)
readlink("/etc", 0x7f01c7bf1060, 1023) = -1 EINVAL (Invalid argument)
readlink("/etc/.java", 0x7f01c7bf1060, 1023) = -1 EINVAL (Invalid argument)
readlink("/etc/.java/.systemPrefs", 0x7f01c7bf1060, 1023) = -1 EINVAL (Invalid argument)
openat(AT_FDCWD, "/etc/.java/.systemPrefs/.system.lock", O_RDONLY) = -1 ENOENT (No such file or directory)
futex(0x7f0238aecf78, FUTEX_WAIT_BITSET_PRIVATE, 0, {tv_sec=631026, tv_nsec=958662292}, FUTEX_BITSET_MATCH_ANY) = -1 ETIMEDOUT (Connection timed out)
futex(0x7f0238aecf28, FUTEX_WAKE_PRIVATE, 1) = 0
write(2, "Jul 16, 2024 4:07:10 PM java.uti"..., 143

Jul 16, 2024 4:07:10 PM java.util.prefs.FileSystemPreferences checkLockFile0ErrorCode
WARNING: Could not lock System prefs. Unix error code 2.
) = 143
write(2, "Jul 16, 2024 4:07:10 PM java.uti"..., 173

Jul 16, 2024 4:07:10 PM java.util.prefs.FileSystemPreferences syncWorld
WARNING: Couldn't flush system prefs: java.util.prefs.BackingStoreException: Couldn't get file lock.
) = 173

Either STM32CubeMX should be modified so no attempt is made to access to this file, or the warning should be silenced when access is not possible.

0 REPLIES 0