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.
It is currently possible to upgrade from readlock to writelock, but it is very deadlock-prone, as the writer has to have exclusive access, so the upgrading reader has to wait until it is the only reader. If there are two such upgraders, it will mean deadlock. As it is not so unusual and there were deadlocks because of this upgrade, I'll add warning in every such case to track it during the fixing period (enabled by default). We can remove the warning before the final build and/or disable the Mutex upgrade at all afterwards.
Warning added, with reference to this bug. It can be disabled by -Dnetbeans.debug.nomutex=true, but we need to have this on by default, until release.
I just got this error with the build from 3/29: WARNING: Going from readAccess to writeAccess java.lang.Exception: Stack trace at java.lang.Thread.dumpStack(Thread.java:993) at org.openide.util.Mutex.enter(Mutex.java:407) at org.openide.util.Mutex.writeEnter(Mutex.java:357) at org.openide.util.Mutex.writeAccess(Mutex.java:312) at org.openide.nodes.Children$Array.add(Children.java:1070) at org.openide.nodes.Children$Keys.add(Children.java:1544) at org.openide.nodes.FilterNode$Children.add(FilterNode.java:859) at org.netbeans.modules.beans.PatternsExplorerFactory.createClassNode(PatternsExplorerFactory.java:47) at org.openide.src.nodes.FilterFactory.createClassNode(FilterFactory.java:75) at org.netbeans.modules.corba.poasupport.POAExplorerFactory.createClassNode(POAExplorerFactory.java:39) at org.openide.src.nodes.FilterFactory.createClassNode(FilterFactory.java:75) at org.netbeans.modules.javadoc.comments.JavaDocPropertySupportFactory.createClassNode(JavaDocPropertySupportFactory.java:57) at org.openide.src.nodes.SourceChildren.createNodes(SourceChildren.java:169) at org.openide.nodes.Children$Keys$KE.nodes(Children.java:1744) at org.openide.nodes.ChildrenArray.nodesFor(ChildrenArray.java:125) at org.openide.nodes.Children$Info.nodes(Children.java:879) at org.openide.nodes.Children.justComputeNodes(Children.java:397) at org.openide.nodes.ChildrenArray.nodes(ChildrenArray.java:69) at org.openide.nodes.Children.computeNodes(Children.java:315) at org.openide.nodes.Children$2.run(Children.java:253) at org.openide.util.Mutex.readAccess(Mutex.java:160) at org.openide.nodes.Children.getNodes(Children.java:251) at org.openide.nodes.Children.findChild(Children.java:207) at org.openide.src.nodes.SourceChildren.findChild(SourceChildren.java:187) at org.openide.nodes.FilterNode$Children.findChild(FilterNode.java:834) at org.openide.nodes.NodeOp.findChild(NodeOp.java:199) at org.openide.nodes.NodeOp.findPath(NodeOp.java:217) at org.openide.nodes.NodeOp.findPath(NodeOp.java:245) at org.openide.explorer.ExplorerManager.findPath(ExplorerManager.java:601) at org.openide.explorer.ExplorerManager$MyValidation.run(ExplorerManager.java:742) at org.openide.explorer.ExplorerManager$MyValidation.validateObject(ExplorerManager.java:730) at java.io.ObjectInputStream.doValidations(ObjectInputStream.java:618) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:490) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236) at org.openide.util.io.NbMarshalledObject.get(NbMarshalledObject.java:88) at org.openide.explorer.ExplorerPanel.readExternal(ExplorerPanel.java:226) at org.netbeans.core.NbMainExplorer$ExplorerTab.readExternal(NbMainExplorer.java:484) at org.openide.windows.TopComponent$Replacer.readObject(TopComponent.java:705) at java.lang.reflect.Method.invoke(Native Method) at java.io.ObjectInputStream.invokeObjectReader(ObjectInputStream.java:2213) at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1410) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:386) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236) at org.openide.util.io.NbMarshalledObject.get(NbMarshalledObject.java:88) at org.netbeans.core.windows.WindowManagerImpl$TopComponentManager.validateData(WindowManagerImpl.java:1343) at org.netbeans.core.windows.frames.DefaultContainerImpl.validateData(DefaultContainerImpl.java:864) at org.netbeans.core.windows.frames.DefaultContainerImpl.validateData(DefaultContainerImpl.java:837) at org.netbeans.core.windows.frames.SplittedContainerImpl.validateData(SplittedContainerImpl.java:463) at org.netbeans.core.windows.ModeImpl.validateData(ModeImpl.java:1223) at org.netbeans.core.windows.WorkspaceVisibilityManager.processModesValidation(WorkspaceVisibilityManager.java:323) at org.netbeans.core.windows.WorkspaceVisibilityManager.validateModes(WorkspaceVisibilityManager.java:233) at org.netbeans.core.windows.WorkspaceImpl.validateData(WorkspaceImpl.java:630) at org.netbeans.core.windows.WindowManagerImpl$SerializationReplacer.readResolve(WindowManagerImpl.java:868) at java.lang.reflect.Method.invoke(Native Method) at java.io.ObjectStreamClass.invokeMethod(ObjectStreamClass.java:1615) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:393) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236) at org.openide.util.io.NbMarshalledObject.get(NbMarshalledObject.java:88) at org.netbeans.modules.projects.PSupport.updateWindowManager(PSupport.java:832) at org.netbeans.modules.projects.PSupport.projectOpen(PSupport.java:252) at org.netbeans.core.NbProjectOperation.setProject(NbProjectOperation.java:129) at org.netbeans.core.NbProjectOperation.openOrCreateProject(NbProjectOperation.java:176) at org.netbeans.core.NonGui.run(NonGui.java:476) at org.netbeans.core.Main.run(Main.java:168) at org.openide.TopManager.initializeTopManager(TopManager.java:120) at org.openide.TopManager.getDefault(TopManager.java:81) at org.netbeans.core.Main.main(Main.java:255) at org.netbeans.core.TopThreadGroup.run(TopThreadGroup.java:90) at java.lang.Thread.run(Thread.java:484)
Created attachment 943 [details] Adding a log sent to nbusers with two warnings
I have just changed the code in Children.Array to use MUTEX.postWriteRequest instead of MUTEX.writeAccess and I hope both troubles mentioned here should disappear. If not reopen the bug.
Created attachment 954 [details] I got "WARNING: Going from readAccess to writeAccess, see #10778..."
Change the code in DataObject to fix the problem reported by David.
Oh, the debugging patch get lost on branch and never popped up on trunk. Reopening.
So what? Fix of close as want fix?
Fix!
Lost warning added, with no optional-off-flag and using ErrorManager. openide/src/org/openide/util/Mutex.java,v1.60
Verified it prints a warning message in case of upgrade.
Created attachment 15148 [details] This series of exceptions raised, as I tried to use the new button in an index property in the properties dialog of a BeanNode
I have posted an attachment with a series of exceptions with contained a link to this issue. I am new to the netbeans platform, so I don't know if they are caused by an error of me or this (fixed) bug is still existing. But getting an error because of a write lock seems to be strange for me. My entry gets added with the new button and I can see it. When I click on it, this series of exceptions raises. But I have no guess, why there should be a write lock open. Regards Torsten
You spotted a bug in Index. This bug is alreadyfixed in current NetBeans codebase.
Just got this message on NB 3.6 FCS build. See attachment for trace.
Created attachment 17006 [details] Stack trace for this exception
The code in java module that caused it was deleted for 4.0, so your issue is fixed already.
This issue had *1 votes* before move to platform component
Integrated into 'main-golden', will be available in build *201209180001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/70f6d82214c0 User: Denis Anisimov <ads@netbeans.org> Log: Fix for BZ#218431 - IllegalStateException: WARNING: Going from readAccess to writeAccess, see #10778: http://www.netbeans.org/issues/show_bug.cgi?id=10778
Just got this warning in v7.3. I'm kinda of a newbe to this so I din't know how to get a stack trace. But this started happening after I did a 'ant clean' from the command line while in the project dir. Not sure what to do here. any advice would be greatly appreciated.
Here is the stack trace: java.lang.IllegalStateException: WARNING: Going from readAccess to writeAccess through queue, see #10778: http://www.netbeans.org/issues/show_bug.cgi?id=10778 [catch] at org.openide.util.Mutex.enterImpl(Mutex.java:704) at org.openide.util.Mutex.enter(Mutex.java:636) at org.openide.util.Mutex.writeEnter(Mutex.java:614) at org.openide.util.Mutex.writeAccess(Mutex.java:435) at org.netbeans.modules.python.api.PythonPlatformManager.storePlatform(PythonPlatformManager.java:212) at org.netbeans.modules.python.api.PythonPlatformManager.getBundledPlatform(PythonPlatformManager.java:98) at org.netbeans.modules.python.api.PythonPlatformManager.load(PythonPlatformManager.java:176) at org.netbeans.modules.python.api.PythonPlatformManager.<init>(PythonPlatformManager.java:61) at org.netbeans.modules.python.api.PythonPlatformManager.getInstance(PythonPlatformManager.java:112) at org.netbeans.modules.python.project.ui.actions.RunSingleCommand.<init>(RunSingleCommand.java:34) at org.netbeans.modules.python.project.PythonActionProvider.<init>(PythonActionProvider.java:45) at org.netbeans.modules.python.project.PythonProject.createLookup(PythonProject.java:95) at org.netbeans.modules.python.project.PythonProject.<init>(PythonProject.java:72) at org.netbeans.modules.python.project.PythonProjectType.createProject(PythonProjectType.java:31) at org.netbeans.modules.project.ant.AntBasedProjectFactorySingleton.loadProject(AntBasedProjectFactorySingleton.java:264) at org.netbeans.api.project.ProjectManager.createProject(ProjectManager.java:371) at org.netbeans.api.project.ProjectManager.access$300(ProjectManager.java:86) at org.netbeans.api.project.ProjectManager$2.run(ProjectManager.java:292) at org.netbeans.api.project.ProjectManager$2.run(ProjectManager.java:235) at org.openide.util.Mutex.readAccess(Mutex.java:332) at org.netbeans.api.project.ProjectManager.findProject(ProjectManager.java:235) at org.netbeans.modules.project.ui.OpenProjectList.URLs2Projects(OpenProjectList.java:1180) at org.netbeans.modules.project.ui.OpenProjectList.access$1400(OpenProjectList.java:137) at org.netbeans.modules.project.ui.OpenProjectList$LoadOpenProjects.loadOnBackground(OpenProjectList.java:461) at org.netbeans.modules.project.ui.OpenProjectList$LoadOpenProjects.run(OpenProjectList.java:381) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1432) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2044) java.lang.ArrayIndexOutOfBoundsException at java.lang.System.arraycopy(Native Method) at java.io.PushbackInputStream.unread(PushbackInputStream.java:235) at org.netbeans.modules.uihandler.Installer.copyWithEncoding(Installer.java:1458) at org.netbeans.modules.uihandler.Installer$Submit.doShow(Installer.java:1634) at org.netbeans.modules.uihandler.Installer.displaySummary(Installer.java:1001) at org.netbeans.modules.uihandler.Installer.displaySummary(Installer.java:1010) at org.netbeans.modules.uihandler.UIHandler.run(UIHandler.java:219) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1432) [catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2044) I have a python project module installed I found somewhere. It was getting stuck on a python project. I deleted the project from the disk and reopend NB7.3 and it resolved the issue
Integrated into 'main-silver', will be available in build *201311220002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/1da0b654addd User: Tomas Mysik <tmysik@netbeans.org> Log: #238621 - IllegalStateException: WARNING: Going from readAccess to writeAccess, see #10778:
java.lang.IllegalStateException: WARNING: Going from readAccess to writeAccess through queue, see #10778: http://www.netbeans.org/issues/show_bug.cgi?id=10778 [catch] at org.openide.util.Mutex.enterImpl(Mutex.java:709) at org.openide.util.Mutex.enter(Mutex.java:641) at org.openide.util.Mutex.writeEnter(Mutex.java:619) at org.openide.util.Mutex.writeAccess(Mutex.java:440) at org.netbeans.modules.python.api.PythonPlatformManager.storePlatform(PythonPlatformManager.java:212) at org.netbeans.modules.python.api.PythonPlatformManager.getBundledPlatform(PythonPlatformManager.java:98) at org.netbeans.modules.python.api.PythonPlatformManager.load(PythonPlatformManager.java:176) at org.netbeans.modules.python.api.PythonPlatformManager.<init>(PythonPlatformManager.java:61) at org.netbeans.modules.python.api.PythonPlatformManager.getInstance(PythonPlatformManager.java:112) at org.netbeans.modules.python.project.ui.actions.RunSingleCommand.<init>(RunSingleCommand.java:34) at org.netbeans.modules.python.project.PythonActionProvider.<init>(PythonActionProvider.java:45) at org.netbeans.modules.python.project.PythonProject.createLookup(PythonProject.java:95) at org.netbeans.modules.python.project.PythonProject.<init>(PythonProject.java:72) at org.netbeans.modules.python.project.PythonProjectType.createProject(PythonProjectType.java:31) at org.netbeans.modules.project.ant.AntBasedProjectFactorySingleton.loadProject(AntBasedProjectFactorySingleton.java:264) at org.netbeans.api.project.ProjectManager.createProject(ProjectManager.java:371) at org.netbeans.api.project.ProjectManager.access$300(ProjectManager.java:86) at org.netbeans.api.project.ProjectManager$2.run(ProjectManager.java:292) at org.netbeans.api.project.ProjectManager$2.run(ProjectManager.java:235) at org.openide.util.Mutex.readAccess(Mutex.java:337) at org.netbeans.api.project.ProjectManager.findProject(ProjectManager.java:235) at org.netbeans.modules.projectapi.SimpleFileOwnerQueryImplementation.getOwner(SimpleFileOwnerQueryImplementation.java:129) at org.netbeans.api.project.FileOwnerQuery.getOwner(FileOwnerQuery.java:102) at org.netbeans.modules.java.project.ProjectClassPathProvider.findClassPath(ProjectClassPathProvider.java:68) at org.netbeans.api.java.classpath.ClassPath.getClassPath(ClassPath.java:628) at org.netbeans.modules.parsing.impl.indexing.errors.Utilities.getSourceClassPathFor(Utilities.java:73) at org.netbeans.modules.parsing.impl.indexing.errors.TaskCache.computePersistentFile(TaskCache.java:438) at org.netbeans.modules.parsing.impl.indexing.errors.TaskCache.getErrors(TaskCache.java:140) at org.netbeans.modules.parsing.impl.indexing.errors.TaskCache.isInError(TaskCache.java:363) at org.netbeans.modules.parsing.impl.indexing.errors.ErrorAnnotator$1.run(ErrorAnnotator.java:313) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1432) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2042)
(In reply to nexoma from comment #23) > java.lang.IllegalStateException: WARNING: Going from readAccess to > writeAccess through queue, see #10778: > http://www.netbeans.org/issues/show_bug.cgi?id=10778 > [catch] at org.openide.util.Mutex.enterImpl(Mutex.java:709) > at org.openide.util.Mutex.enter(Mutex.java:641) > at org.openide.util.Mutex.writeEnter(Mutex.java:619) > at org.openide.util.Mutex.writeAccess(Mutex.java:440) > at BTW: Adding comments at a fixed issue won't help. I filed a new issue https://netbeans.org/bugzilla/show_bug.cgi?id=239131 against the python module.