This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 208227 - Quite frequent BackingStoreException from NbPreferences
Summary: Quite frequent BackingStoreException from NbPreferences
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Options&Settings (show other bugs)
Version: 7.2
Hardware: Other Linux
: P1 normal (vote)
Assignee: Theofanis Oikonomou
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-10 08:09 UTC by Jaroslav Tulach
Modified: 2013-01-17 02:49 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Tulach 2012-02-10 08:09:38 UTC
java.util.prefs.BackingStoreException: java.io.SyncFailedException: File XML Ed 
 iting.properties already exists in filesystem C:\ADE\rmagnuso_u1\oracle\jdevelo 
 per\system12.1.2.0.40.62.37\system_cache\config (C:\ADE\rmagnuso_u1\oracle\jdev 
 eloper\system12.1.2.0.40.62.37\system_cache\config\Preferences\com\oracle\jdeve 
 loper\nbwindowsystem\Default\editorLayouts\XML Editing.properties). 
   org.netbeans.core.startup.preferences.NbPreferences.flushSpi(NbPreferences.ja 
 va:210) 
   org.netbeans.core.startup.preferences.NbPreferences$1$1.run(NbPreferences.jav 
 a:77) 
   org.netbeans.core.startup.preferences.PropertiesStorage$3.run(PropertiesStora 
 ge.java:329) 
   org.openide.filesystems.EventControl.runAtomicAction(EventControl.java:127) 
   org.openide.filesystems.FileSystem.runAtomicAction(FileSystem.java:566) 
   org.netbeans.core.startup.preferences.PropertiesStorage.runAtomic(PropertiesS 
 torage.java:327) 
   org.netbeans.core.startup.preferences.NbPreferences$1.run(NbPreferences.java: 
 72) 
   org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1404) 
   org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1984) 
 Caused by: 
 java.io.SyncFailedException: File XML Editing.properties already exists in file 
 system C:\ADE\rmagnuso_u1\oracle\jdeveloper\system12.1.2.0.40.62.37\system_cach 
 e\config (C:\ADE\rmagnuso_u1\oracle\jdeveloper\system12.1.2.0.40.62.37\system_c 
 ache\config\Preferences\com\oracle\jdeveloper\nbwindowsystem\Default\editorLayo 
 uts\XML Editing.properties). 
   org.openide.filesystems.LocalFileSystem.createData(LocalFileSystem.java:279) 
   org.openide.filesystems.LocalFileSystem$Impl.createData(LocalFileSystem.java: 
 587) 
   org.openide.filesystems.AbstractFileObject.createData(AbstractFileObject.java 
 :474) 
   org.openide.filesystems.FileUtil.createData(FileUtil.java:948) 
   org.openide.filesystems.MultiFileObject.createData(MultiFileObject.java:1175) 
   org.openide.filesystems.FileUtil.createData(FileUtil.java:948) 
   org.openide.filesystems.MultiFileObject.createData(MultiFileObject.java:1175) 
   org.openide.filesystems.FileUtil.createData(FileUtil.java:948) 
   org.netbeans.core.startup.preferences.PropertiesStorage.toPropertiesFile(Prop 
 ertiesStorage.java:319) 
   org.netbeans.core.startup.preferences.PropertiesStorage.outputStream(Properti 
 esStorage.java:259) 
   org.netbeans.core.startup.preferences.PropertiesStorage.save(PropertiesStorag 
 e.java:236) 
   org.netbeans.core.startup.preferences.NbPreferences.flushSpi(NbPreferences.ja 
 va:207) 
   org.netbeans.core.startup.preferences.NbPreferences$1$1.run(NbPreferences.jav 
 a:77) 
   org.netbeans.core.startup.preferences.PropertiesStorage$3.run(PropertiesStora 
 ge.java:329) 
   org.openide.filesystems.EventControl.runAtomicAction(EventControl.java:127) 
   org.openide.filesystems.FileSystem.runAtomicAction(FileSystem.java:566) 
   org.netbeans.core.startup.preferences.PropertiesStorage.runAtomic(PropertiesS 
 torage.java:327) 
   org.netbeans.core.startup.preferences.NbPreferences$1.run(NbPreferences.java: 
 72) 
   org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1404) 
   org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1984) 
 Caused by:
Comment 1 Jaroslav Tulach 2012-02-10 08:12:00 UTC
Peer product has a feeling this is a problem of highest priority.


As far as I can tell from the log, this problem could happen if two threads tried to set a preference on NbPreferences node at the same time. One would succeeded creating the file on disk, the second one would get the SyncIOException.
Comment 2 rov63rus 2012-02-24 05:39:42 UTC
I always have exception on 7.1 then starting app:

INFO [org.netbeans.core.windows.persistence]

msg
msg
Caused: java.io.SyncFailedException: File welltrjEditorTopComponent.settings already exists in filesystem D:\WORKS109\PROJECTS\java\SimTools2\build\testuserdir\config (D:\WORKS109\PROJECTS\java\SimTools2\build\testuserdir\config\Windows2Local\Components\welltrjEditorTopComponent.settings).
	at org.openide.filesystems.LocalFileSystem.createData(LocalFileSystem.java:279)
	at org.openide.filesystems.LocalFileSystem$Impl.createData(LocalFileSystem.java:587)
	at org.openide.filesystems.AbstractFileObject.createData(AbstractFileObject.java:474)
	at org.openide.filesystems.FileUtil.createData(FileUtil.java:941)
	at org.openide.filesystems.MultiFileObject.createData(MultiFileObject.java:1175)
	at org.openide.filesystems.FileUtil.createData(FileUtil.java:941)
	at org.openide.filesystems.MultiFileObject.createData(MultiFileObject.java:1175)
	at org.openide.filesystems.FileUtil.copyFileImpl(FileUtil.java:723)
	at org.openide.filesystems.FileObject.copy(FileObject.java:129)
	at org.openide.filesystems.MultiFileObject.copy(MultiFileObject.java:1372)
	at org.openide.filesystems.MultiFileObject.copy(MultiFileObject.java:1372)
[catch] at org.netbeans.core.windows.persistence.PersistenceManager.copySettingsFile(PersistenceManager.java:1295)
	at org.netbeans.core.windows.persistence.PersistenceManager.copySettingsFiles(PersistenceManager.java:1279)
	at org.netbeans.core.windows.persistence.PersistenceManager.loadWindowSystem(PersistenceManager.java:1153)
	at org.netbeans.core.windows.PersistenceHandler.load(PersistenceHandler.java:128)
	at org.netbeans.core.windows.WindowSystemImpl.load(WindowSystemImpl.java:81)
	at org.netbeans.core.GuiRunLevel$InitWinSys.run(GuiRunLevel.java:234)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:705)
	at java.awt.EventQueue.access$000(EventQueue.java:101)
	at java.awt.EventQueue$3.run(EventQueue.java:666)
	at java.awt.EventQueue$3.run(EventQueue.java:664)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:675)
	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:162)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
ALL [null]: File welltrjEditorTopComponent.settings already exists in filesystem D:\WORKS109\PROJECTS\java\SimTools2\build\testuserdir\config (D:\WORKS109\PROJECTS\java\SimTools2\build\testuserdir\config\Windows2Local\Components\welltrjEditorTopComponent.settings).
ALL [null]: Cannot copy component settings file to folder MultiFileObject@1f09592[Windows2Local/Components].
Comment 3 Jesse Glick 2012-03-22 16:31:45 UTC
(In reply to comment #2)
> I always have exception on 7.1 then starting app:

Unrelated, do not comment on that in this issue.
Comment 4 Theofanis Oikonomou 2012-03-27 12:42:59 UTC
I was not able to reproduce because there is no reliable scenario but it seems that after changes in NbPreferences made in bug 197594, 209418 and 209387 this should be fixed.
Comment 5 Jesse Glick 2012-03-27 19:45:29 UTC
Then it is not really FIXED, which requires a particular changeset believed to have fixed the issue.
Comment 6 Theofanis Oikonomou 2012-11-08 15:25:56 UTC
This was not fixed as can be seen by the new bugdb bugs

(In reply to comment #1)
> As far as I can tell from the log, this problem could happen if two threads
> tried to set a preference on NbPreferences node at the same time. One would
> succeeded creating the file on disk, the second one would get the
> SyncIOException.

I think that http://hg.netbeans.org/core-main/rev/396fa01e5135 will eliminate the SyncIOException.
Comment 7 Quality Engineering 2012-11-09 02:53:02 UTC
Integrated into 'main-golden', will be available in build *201211090001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/396fa01e5135
User: Theofanis Oikonomou <theofanis@netbeans.org>
Log: Issue #208227 - Quite frequent BackingStoreException from NbPreferences
Comment 8 Theofanis Oikonomou 2013-01-16 12:56:37 UTC
(In reply to comment #6)
> I think that http://hg.netbeans.org/core-main/rev/396fa01e5135 will eliminate
> the SyncIOException.

not the case as can be seen by new bug. There seems to be no sync problem in NbPreferences, so I will add some logging to find out more about the created file.
Comment 9 Theofanis Oikonomou 2013-01-16 13:55:00 UTC
http://hg.netbeans.org/core-main/rev/1faddf4e3f0c
Comment 10 Quality Engineering 2013-01-17 00:01:19 UTC
Integrated into 'releases', will be available in build *201301162100* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/4f0d65290753
User: Theofanis Oikonomou <theofanis@netbeans.org>
Log: Issue #208227 - Quite frequent BackingStoreException from NbPreferences - more logging
(transplanted from 1faddf4e3f0c86ea0886ae9a083022bf9d303be7)
Comment 11 Quality Engineering 2013-01-17 02:49:53 UTC
Integrated into 'main-golden', will be available in build *201301170001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/1faddf4e3f0c
User: Theofanis Oikonomou <theofanis@netbeans.org>
Log: Issue #208227 - Quite frequent BackingStoreException from NbPreferences - more logging