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 188314 - after debugging session IDE does not update files anymore
Summary: after debugging session IDE does not update files anymore
Status: RESOLVED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Java (show other bugs)
Version: 7.0
Hardware: PC Solaris
: P1 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-02 11:48 UTC by Vladimir Voskresensky
Modified: 2010-07-13 03:31 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
snapshot (switching to Custom Group takes 15 sec) (382.43 KB, application/octet-stream)
2010-07-08 06:40 UTC, Vladimir Voskresensky
Details
another snapshot of never ending activity (4.18 MB, application/octet-stream)
2010-07-08 12:45 UTC, Vladimir Voskresensky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Voskresensky 2010-07-02 11:48:02 UTC
I had debug session and after that no any changes made externally are tracked by IDE. Checking for external changes process is always in "Suspended" mode

"Refresh-After-WindowActivated" daemon prio=3 tid=0x0a582400 nid=0x6d1 in Object.wait() [0x737ff000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        at org.netbeans.modules.masterfs.filebasedfs.utils.FileChangedManager.waitIOLoadLowerThan(FileChangedManager.java:214)
        - locked <0x83b19408> (a java.lang.ThreadLocal)
        at org.netbeans.modules.masterfs.filebasedfs.utils.FileChangedManager.pingIO(FileChangedManager.java:243)
        at org.netbeans.modules.masterfs.filebasedfs.utils.FileChangedManager.checkRead(FileChangedManager.java:118)
        at org.netbeans.TopSecurityManager.notifyRead(TopSecurityManager.java:179)
        at org.netbeans.TopSecurityManager.checkRead(TopSecurityManager.java:302)
        at java.io.File.lastModified(File.java:824)
        at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FileObj.refreshImpl(FileObj.java:278)
        at org.netbeans.modules.masterfs.filebasedfs.fileobjects.BaseFileObj.refresh(BaseFileObj.java:709)
        at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FileObj.refresh(FileObj.java:302)
        at org.netbeans.modules.masterfs.filebasedfs.fileobjects.RefreshSlow$1.run(RefreshSlow.java:77)
        at org.netbeans.modules.masterfs.filebasedfs.utils.FileChangedManager.idleIO(FileChangedManager.java:186)
        at org.netbeans.modules.masterfs.filebasedfs.fileobjects.RefreshSlow$1.run(RefreshSlow.java:84)
        at org.openide.filesystems.FileUtil$2.run(FileUtil.java:579)
        at org.openide.filesystems.EventControl.runAtomicAction(EventControl.java:125)
        at org.openide.filesystems.FileSystem.runAtomicAction(FileSystem.java:542)
        at org.openide.filesystems.FileUtil.runAtomicAction(FileUtil.java:563)
        at org.openide.filesystems.FileUtil.runAtomicAction(FileUtil.java:583)
        at org.netbeans.modules.masterfs.filebasedfs.fileobjects.RefreshSlow.refreshFileObject(RefreshSlow.java:88)
        at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FileObjectFactory.refresh(FileObjectFactory.java:512)
        at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FileObjectFactory.refresh(FileObjectFactory.java:487)
        at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FileObjectFactory.refreshAll(FileObjectFactory.java:434)
        at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FileObjectFactory$1.run(FileObjectFactory.java:689)
        at org.netbeans.modules.masterfs.filebasedfs.FileBasedFileSystem.runAsInconsistent(FileBasedFileSystem.java:105)
        at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FileObjectFactory.refresh(FileObjectFactory.java:696)
        at org.netbeans.modules.masterfs.filebasedfs.fileobjects.RootObj.invokeRefreshFor(RootObj.java:194)
        at org.netbeans.modules.masterfs.filebasedfs.fileobjects.RefreshSlow.run(RefreshSlow.java:64)
        at org.netbeans.core.ui.warmup.MenuWarmUpTask$NbWindowsAdapter.run(MenuWarmUpTask.java:298)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
        at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1957)

"Asynchronous view model" daemon prio=3 tid=0x0a187400 nid=0x676 runnable [0x707fe000]
   java.lang.Thread.State: RUNNABLE
        at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDProcessor.setFeature(XMLDTDProcessor.java:436)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.setFeature(XML11Configuration.java:870)
        at com.sun.org.apache.xerces.internal.parsers.XIncludeAwareParserConfiguration.setFeature(XIncludeAwareParserConfiguration.java:289)
        at com.sun.org.apache.xerces.internal.parsers.AbstractDOMParser.<init>(AbstractDOMParser.java:291)
        at com.sun.org.apache.xerces.internal.parsers.DOMParser.<init>(DOMParser.java:125)
        at com.sun.org.apache.xerces.internal.parsers.DOMParser.<init>(DOMParser.java:109)
        at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.<init>(DocumentBuilderImpl.java:115)
        at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl.newDocumentBuilder(DocumentBuilderFactoryImpl.java:72)
        at org.openide.xml.XMLUtil.parse(XMLUtil.java:344)
        at org.netbeans.modules.apisupport.project.universe.ModuleList.parseData(ModuleList.java:1007)
        at org.netbeans.modules.apisupport.project.universe.ModuleList$2.run(ModuleList.java:202)
        at org.netbeans.modules.apisupport.project.universe.ModuleList$2.run(ModuleList.java:196)
        at org.netbeans.modules.apisupport.project.universe.ModuleList$1.run(ModuleList.java:176)
        - locked <0x83de3638> (a java.util.HashMap)
        at org.netbeans.modules.apisupport.project.universe.ModuleList$1.run(ModuleList.java:172)
        at org.openide.util.Mutex.readAccess(Mutex.java:330)
        at org.netbeans.modules.apisupport.project.universe.ModuleList.runProtected(ModuleList.java:172)
        at org.netbeans.modules.apisupport.project.universe.ModuleList.getModuleList(ModuleList.java:196)
        at org.netbeans.modules.apisupport.project.NbModuleProject.getModuleList(NbModuleProject.java:573)
        at org.netbeans.modules.apisupport.project.queries.SubprojectProviderImpl.getSubprojects(SubprojectProviderImpl.java:90)
        at org.netbeans.modules.debugger.ui.models.BreakpointGroup.isSubProjectOf(BreakpointGroup.java:402)
        at org.netbeans.modules.debugger.ui.models.BreakpointGroup.isSubProjectOf(BreakpointGroup.java:403)
        at org.netbeans.modules.debugger.ui.models.BreakpointGroup.isSubProjectOf(BreakpointGroup.java:403)
        at org.netbeans.modules.debugger.ui.models.BreakpointGroup.isSubProjectOf(BreakpointGroup.java:403)
        at org.netbeans.modules.debugger.ui.models.BreakpointGroup.isSubProjectOf(BreakpointGroup.java:403)
        at org.netbeans.modules.debugger.ui.models.BreakpointGroup.isSubProjectOf(BreakpointGroup.java:403)
        at org.netbeans.modules.debugger.ui.models.BreakpointGroup.isSubProjectOf(BreakpointGroup.java:403)
        at org.netbeans.modules.debugger.ui.models.BreakpointGroup.isSubProjectOf(BreakpointGroup.java:403)
        at org.netbeans.modules.debugger.ui.models.BreakpointGroup.isSubProjectOf(BreakpointGroup.java:403)
        at org.netbeans.modules.debugger.ui.models.BreakpointGroup.isSubProjectOf(BreakpointGroup.java:403)
        at org.netbeans.modules.debugger.ui.models.BreakpointGroup.isSubProjectOf(BreakpointGroup.java:403)
        at org.netbeans.modules.debugger.ui.models.BreakpointGroup.isSubProjectOf(BreakpointGroup.java:403)
        at org.netbeans.modules.debugger.ui.models.BreakpointGroup.isSubProjectOf(BreakpointGroup.java:403)
        at org.netbeans.modules.debugger.ui.models.BreakpointGroup.isSubProjectOf(BreakpointGroup.java:403)
        at org.netbeans.modules.debugger.ui.models.BreakpointGroup.isSubProjectOf(BreakpointGroup.java:403)
        at org.netbeans.modules.debugger.ui.models.BreakpointGroup.isSubProjectOf(BreakpointGroup.java:403)
        at org.netbeans.modules.debugger.ui.models.BreakpointGroup.isSubProjectOf(BreakpointGroup.java:403)
        at org.netbeans.modules.debugger.ui.models.BreakpointGroup.isDependentOnAnOpened(BreakpointGroup.java:390)
        at org.netbeans.modules.debugger.ui.models.BreakpointGroup.isOpened(BreakpointGroup.java:378)
        at org.netbeans.modules.debugger.ui.models.BreakpointGroup.createGroups(BreakpointGroup.java:182)
        at org.netbeans.modules.debugger.ui.models.BreakpointsTreeModel.getChildren(BreakpointsTreeModel.java:113)
        at org.netbeans.spi.viewmodel.Models$DelegatingTreeModel.getChildren(Models.java:1510)
        at org.netbeans.modules.debugger.jpda.ui.models.BreakpointsTreeModelFilter.getChildren(BreakpointsTreeModelFilter.java:113)
        at org.netbeans.spi.viewmodel.Models$CompoundTreeModel.getChildren(Models.java:774)
        at org.netbeans.spi.viewmodel.Models$CompoundModel.getChildren(Models.java:3798)
        at org.netbeans.modules.viewmodel.TreeModelNode$TreeModelChildren.getModelChildren(TreeModelNode.java:1285)
        at org.netbeans.modules.viewmodel.TreeModelNode$TreeModelChildren.run(TreeModelNode.java:1245)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
        at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1957)
Comment 1 Martin Entlicher 2010-07-02 12:24:54 UTC
This has nothing to do with debugger.
Please provide the build number as this might be already resolved.
Comment 2 Vladimir Voskresensky 2010-07-06 06:40:29 UTC
martin, it has to do with java debugger, because this happens when I switch to breakpoints view => there is never ending "Please wait..." node, if I then switch to "No Groups" => breakpoints are displayed but then selecting "Custom Groups", then "Projects" again displays "Please wait..." node but now in all debugger views (i.e. Variables) and switching back to "No Groups" displays breakpoints only after 5 minutes. All this time debugger view is spending in  org.netbeans.modules.debugger.ui.models.BreakpointGroup.isSubProjectOf
=> grouping is not working at all I would say and while it is in "Please wait..." check for external changes is blocked (don't know why)
Comment 3 Martin Entlicher 2010-07-07 08:01:02 UTC
The root cause seems to be org.netbeans.modules.masterfs.filebasedfs.utils.FileChangedManager.waitIOLoadLowerThan(FileChangedManager.java:214)
Please provide build number.
Comment 4 Vladimir Voskresensky 2010-07-07 09:00:44 UTC
Product Version: NetBeans IDE Dev (Build 100705-b7e7ad7e10bc)
Java: 1.6.0_14; Java HotSpot(TM) Client VM 14.0-b16
System: SunOS version 5.10 running on x86; UTF-8; ru_RU (nb)
Comment 5 Martin Entlicher 2010-07-07 10:19:28 UTC
Thanks. So it's a new dev build.
Perhaps it'd be better to have a profiler snapshot, these two threads are not blocked anywhere. But it looks like the I/O activity it very high and it probably slows down everything.
I do not think I can do anything with that in debugger, breakpoint groups are just waiting for SubprojectProviderImpl.getSubprojects(), which is waiting for a parser. Filesystems are doing only some refreshing, but they wait for a lower I/O activity...

Please provide profiler snapshot.
Comment 6 Vladimir Voskresensky 2010-07-08 06:40:33 UTC
Created attachment 100678 [details]
snapshot (switching to Custom Group takes 15 sec)
Comment 7 Martin Entlicher 2010-07-08 09:21:19 UTC
Thanks for the snapshot. It's really a surprise for me how slow SubprojectProviderImpl.getSubprojects() is. My expectation would be that any project could very easily provide it's subprojects.

IMHO we could improve performance only by caching of projects that we've processed so that we do not ask for the same sub-projects multiple times. There is unfortunately no caching in SubprojectProviderImpl and from the snapshot it's apparent that we ask many times for the list of subprojects.
Comment 8 Vladimir Voskresensky 2010-07-08 12:45:39 UTC
Created attachment 100693 [details]
another snapshot of never ending activity

after dozen of debug sessions (I didn't activate breakpoints view) I see that checking changes task is still in suspended mode and thread dump shows the same activity as in the first post
Comment 9 Vladimir Voskresensky 2010-07-08 12:46:30 UTC
I have to kill IDE it doesn't track any external changes :-(
Comment 10 Vladimir Voskresensky 2010-07-08 12:47:31 UTC
now I'm in build:
Product Version: NetBeans IDE Dev (Build 100708-a516ca9891a9)
Java: 1.6.0_14; Java HotSpot(TM) Client VM 14.0-b16
System: SunOS version 5.10 running on x86; UTF-8; ru_RU (nb)
Comment 11 Martin Entlicher 2010-07-09 08:33:36 UTC
Fixed in changeset:   174022:5abf2df34218
http://hg.netbeans.org/main/rev/5abf2df34218

I've implemented temporary caching of subprojects. It improves the performance, but there should not be any direct effect on updating files. Perhaps only when I/O load was high because of subprojects retrieval, files did not update due to waitIOLoadLowerThan() in filesystems.
Comment 12 Quality Engineering 2010-07-13 03:31:54 UTC
Integrated into 'main-golden', will be available in build *201007130001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/5abf2df34218
User: mentlicher@netbeans.org
Log: #188314 Caching of sub-projects and inspected projects implemented to speed up breakpoint groups creation.