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.
Summary: | Memory/CPU leak after imported key bindings from 6.5 | ||
---|---|---|---|
Product: | editor | Reporter: | theshadow27 <theshadow27> |
Component: | Settings | Assignee: | Vitezslav Stejskal <vstejskal> |
Status: | VERIFIED FIXED | ||
Severity: | blocker | CC: | issues, jglick, jtulach |
Priority: | P2 | Keywords: | PERFORMANCE |
Version: | 6.x | ||
Hardware: | Macintosh | ||
OS: | Mac OS X | ||
Issue Type: | DEFECT | Exception Reporter: | |
Bug Depends on: | |||
Bug Blocks: | 168536 | ||
Attachments: |
system log see middle around lines 500
Netbeans profile thread dump log_161201_2.txt terminal output threaddump during activity threaddump from 200904030200 |
Description
theshadow27
2009-03-25 23:15:02 UTC
Created attachment 78867 [details]
system log see middle around lines 500
Could you please reproduce it with an empty userdir (ie. --userdir C:\Temp) and when the CPU is at 99% generate several threaddumps (http://wiki.netbeans.org/GenerateThreadDump) and attach them here. Thanks Created attachment 78928 [details]
Netbeans profile
for some reason control \ doesn't work in terminal for a thread dump, unless I'm doing something wrong. Hard to get a good profile with an empty userdir because it's much shorter (1-10 logs, vs 400+) Okay, was able to reproduce the problem on an empty userdir AND get a thread dump. Steps to reproduce: 1) Configured NB6.5 instance with .netbeans directory in the default location (~/.netbeans), and modified key mappings 2) Removed old ~/.netbeans/dev directory 2) Clean install of 200903250219 into default location (/Applications/NetBeans/NetBeans Dev 200903250219.app) 3) Launch, and say yes to "Import settings from netbeans 6.5 4) Same output in the log. Created attachment 78932 [details]
thread dump
Thanks for the threaddump. Got it again in M3(200904011705). Not after importing settings, on a fresh user directory and new install. Found after installing two plugins, at the same time: 1) Spellcheck 2) TODO highlighting Memory usage 60mb -> 180mb, CPU usage at 100% (Got thread dump during this this time) Same message: WARNING [org.netbeans.modules.editor.settings.storage.keybindings.KeyMapsStorage]: Duplicate shortcut 'D-SPACE' definition; rebound from 'all- completion-show' to 'completion-show' in (Editors/Keybindings/NetBeans/Defaults/org-netbeans-modules-editor-keybindings.xml). Uploading: log_161201_2.txt -> from the terminal window, including the activation of the plugin(s) threaddump-1238727663760.tdump -> Thread dump during the above log output from VisualVM Created attachment 79332 [details]
log_161201_2.txt terminal output
Created attachment 79334 [details]
threaddump during activity
*** Issue 161336 has been marked as a duplicate of this issue. *** See also the profiler snapshot in issue #161336. Installing spellcheck and TODO seems to be the easiest way to replicate. Found again on 200904030200. JSD Created attachment 79522 [details]
threaddump from 200904030200
http://hg.netbeans.org/jet-main/rev/72793f0d45d8 The problem was too many events fired from filesystems. I'm not sure if something actually isn't broken in the filesystems, but when a module is installed there is hundreds of fileAttributeChanged events fired and they all triggered: org.netbeans.modules.editor.settings.storage.StorageImpl.refresh org.netbeans.modules.editor.mimelookup.impl.CompoundFolderChildren.rebuild StorageImpl was not handling filesystem events efficiently a must have been slow in other situations too, but CompoundFolderChildren listens only on its closest parent folder and still receives heaps of events. I fixed the problem by ignoring subsequent events based on their timestamp and FileObject path. But maybe somebody should investigate what happens in filesystems when a module with a layer is installed. Here are the steps that reliably reproduced the problem on my laptop: 1. clean build and comments out the ergonomics cluster in netbeans.clusters 2. [maybe not neccessary] prepare a userdir from 6.5 with a simple java project open and some keybindings modified (eg Fast Import and Fix Imports) 3. download spellchecker plugin from http://plugins.netbeans.org/; unzip it somewhere, it should contain several nbms 4. turn on logging in CompoundCompoundFolderChildren (eg. -Dtryme.args="-J-Dorg.netbeans.modules.editor.mimelookup.impl.CompoundFolderChildren.level=FINE") 5. start IDE with empty userdir and import the 6.5 userdir from step 2; wait for the IDE to fully start 6. Tools -> Plugins and install downloaded spellchecker nmbs, all at once 7. look in the log file; there should be a lot of 'Filtering out ...' messages Is this resolved or just covered up? There are a few other big issues that seem to be file-system-listener related. It may be worth tracking to the root cause. 200904091401 (reproduced via same steps : WARNING [org.netbeans.modules.editor.settings.storage.keybindings.KeyMapsStorage]: Duplicate shortcut 'D-SPACE' definition; rebound from 'all- completion-show' to 'completion-show' in (Editors/Keybindings/NetBeans/Defaults/org-netbeans-modules-editor-keybindings.xml). WARNING [org.netbeans.modules.editor.settings.storage.keybindings.KeyMapsStorage]: Duplicate shortcut 'D-SPACE' definition; rebound from 'all- completion-show' to 'completion-show' in (Editors/Keybindings/NetBeans/Defaults/org-netbeans-modules-editor-keybindings.xml). WARNING [org.netbeans.modules.editor.settings.storage.keybindings.KeyMapsStorage]: Duplicate shortcut 'D-SPACE' definition; rebound from 'all- completion-show' to 'completion-show' in (Editors/Keybindings/NetBeans/Defaults/org-netbeans-modules-editor-keybindings.xml). I guess 72793f0d45d8 has not been pushed yet. Integrated into 'main-golden', will be available in build *200904100201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/72793f0d45d8 User: Vita Stejskal <vstejskal@netbeans.org> Log: #161201: filter out insignificant filesystem events Verified as of 200904210201 I rewrote the original fix with using the brand new FileEvent.runWhenDeliveryOver(), which provides the best way for coalescing multiple events fired from a single FileSystem.AtomicAction. This new technique should be even more effective than the original fix. I'm not going to reopen this issue, but it might not be a bad idea if somebody re-verified the fix in a 6.8 dev build with #a1cdcdd82037. I tested the fix with the steps from desc16 and it seemed to work ok. Thanks http://hg.netbeans.org/jet-main/rev/a1cdcdd82037 Integrated into 'main-golden', will be available in build *200909041634* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/a1cdcdd82037 User: Vita Stejskal <vstejskal@netbeans.org> Log: #161201: rewriting the original fix and using the new FileEvent.runWhenDeliveryOver() method |