weird freeze loading a osgi maven big project
Hi, my intellij idea is working perfectly on all the projects I worked on but one.
Here we have a team of 10 people and we manage several big projects on a corporate enviroment.
Most of my collegues use Eclipse, but I managed without any problem to use intellij on all of them... apart from one.
When I tried to create the intellij project (.ipr) everything seems to work well. I've used the "import project structure from Maven" because it would be quite complicated to do it manually as there are about 50 osgi bundles treated as separate modules.
Anyway the import goes well (I tried several times) and I can start working, but when I reopen idea on the same project the second time it hangs on apparently forever (tried till 1 hour) with cpu very high.
It freeze before showing any view (Project, editors, etc...).
There is nothing in the console.
My configuration is:
Idea 9.0.3
IU-95.429
Ubuntu 9.10 (I tried also on 10.4 same result and the same also from a Mac of a collegue).
Maybe it's a stupid question but is it possible to enable some kind of debug level to see exactly where is the problem?
cheers
Uberto
请先登录再写评论。
Hi Uberto,
Please provide thread dump and CPU snapshot for the problem situation.
Regards, Denis
Hi
thanks for the fast reply.
These are the log and the threadDump. I cannot take cpu snapshot because the ide is freezed.
cheers
Uberto
Attachment(s):
threadDump-20100928-164634.txt.zip
idea.log.zip
This information is not enough to fix the problem, please try starting CPU profiling before IDEA freezes.
I can start profiling before, but how I can click the "stop profiling button"?
Click it after it unfreezes. It does, right?
No, no unfreeze. I have to kill it with kill -9.
It happens all the times (only with that project) and I tried to leave it alone 2 hourse, but it's still blocked (and cpu 100%).
Do you have yourkit profiler?
Tomorrow I'll try with it too.
tha nks for the support!!!
Just a guess:
I ran IntelliJ 9.0.3 with JDK 6 on apple. When loading a large project the IDE seems to freeze without any error shown. After increasing the MaxPermSize, everything worked fine. I tried once again afterwards with smaller PermSize which again caused the IDE freezing. I checked everything but couldn't find an OutOfMemory due to exhausted PermGen memory.
Just give it a try ;-)
Tried but up to 512 MaxPermSize doesn't change it. :(
I installed Yourkit profiler but I'm having some problems to run idea with the -
argumento to have remotely profiled...(of course I can only work on this between pauses on work).
Ok I managed to start intellij with YourKit profiler.
Now idea is freezed but on YK console I cannot see anything strange.
I've got a snapshot but it's too big to be posted here (23MB)
Hi Uberto,
You can post it to our ftp server then - ftp://ftp.intellij.net/.uploads/
Regards, Denis
there is a thread with 100% cpu time on
(...)
org.osmorc.OsmorcModuleComponent$3.run()
org.osmorc.impl.BundleManagerImpl.addOrUpdateBundle(Object)
org.eclipse.osgi.internal.resolver.StateImpl.resolve()
going to upload to the ftp server anyway
uploaded there as:
Main-2010-09-29-1.snapshot
Cool, thanks!
We'll take a look
Please try disabling Osmorc plugin. Does it help?
Disabling Osmorc will most probably cure the freeze but you'll also lose
OSGi support. I had a look at the trace you provided. Osmorc internally
uses some bundle resolving code from Equinox to find out about the
dependencies of the bundles. Since you seem to have lots and lots of
bundles in your project (and it's dependencies) that resolution takes
quite some time (after all it's a SAT problem). Since the resolution
code runs in the event dispatch thread your IDE freezes. So for
starters, try disabling the Osmorc plugin so you can at least work on
your project. I'll try to rewrite some things internally so that the
bundle resolution works on a separate thread and doesn't block the IDE.
Once I got a solution I'll post a fixed plugin here for you to try out.
Yes disabling Osmorc does the trick.
I lose osgi support anyway, but better then other ides. :)
There could be a problem in osgi bundles of this project but it works flawless in production and the design was directly by a Apache Felix committer, so I think the fondations are solid. :)
thanks for support anyway!
I have attached a new version of the Osmorc plugin, in which the maximum time allowed for OSGi resolution has been drastically reduced. Since I cannot reproduce your problem, I somewhat have to guess from what I see in the trace you uploaded. Could you please install this new version and see if this fixes your problem? Unzip it and put the Osmorc folder into c:\documents and settings\<your username>\IntelliJIdea90\plugins (replace the existing one). When you have installed it you need to re-enable Osmorc. The new plugin should show version 1.2.2. Thank you very much for your help.
Attachment(s):
Osmorc.zip
Thanks I'll do asap!
mmmh same problem.
I don't have time right now to investigate.
I think there are differences in how equinox and felix manage osgi dependencies, our project is only tested on felix.
Hmm too bad. So it seems to be an endless loop inside the Equinox bundle resolver component. I am not sure how to actually fix this, I'll get in touch with the Equinox guys then. Having a project to reproduce this would be cool though.
Hi,
I know this is an old thread but I have a similar issue. I'm trying to load a "big" osgi project but intelliJ freezes.
For example, intelliJ freezes for ~5min when opening the "Project Structure".
A profiling showed me that a thread consumed all the CPU time. This is this thread captured by a thread dump. Osmorc seems to be involved.
Osmorc trace:
(...)
at org.osmorc.facet.ui.OsmorcFacetGeneralEditorTab.updateGui(OsmorcFacetGeneralEditorTab.java:167)
at org.osmorc.facet.ui.OsmorcFacetGeneralEditorTab.access$600(OsmorcFacetGeneralEditorTab.java:60)
at org.osmorc.facet.ui.OsmorcFacetGeneralEditorTab$5.stateChanged(OsmorcFacetGeneralEditorTab.java:116)
(...)
Full trace:
"AWT-EventQueue-0 IDEA 15.0.4#IU-143.2287.1 IDEA, eap:false, os:Linux 3.16.0-38-generic, java-version:Oracle Corporation 1.8.0_72-b15" #26 prio=6 os_prio=0 tid=0x00007f782830b800 nid=0x1bc1 runnable [0x00007f781f297000]
java.lang.Thread.State: RUNNABLE
at com.intellij.util.io.DataInputOutputUtil.readINT(DataInputOutputUtil.java:50)
at com.intellij.openapi.vfs.newvfs.persistent.FSRecords.findRootRecord(FSRecords.java:810)
at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl.findRoot(PersistentFSImpl.java:875)
at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl.findRoot(PersistentFSImpl.java:56)
at com.intellij.openapi.vfs.newvfs.VfsImplUtil.a(VfsImplUtil.java:158)
at com.intellij.openapi.vfs.newvfs.VfsImplUtil.findFileByPath(VfsImplUtil.java:58)
at com.intellij.openapi.vfs.impl.jar.JarFileSystemImpl.findFileByPath(JarFileSystemImpl.java:123)
at com.intellij.openapi.vfs.StandardFileSystems.getJarRootForLocalFile(StandardFileSystems.java:58)
at com.intellij.openapi.roots.impl.libraries.LibraryImpl$1.visitFile(LibraryImpl.java:210)
at com.intellij.openapi.vfs.VirtualFileVisitor.visitFileEx(VirtualFileVisitor.java:132)
at com.intellij.openapi.vfs.VfsUtilCore.visitChildrenRecursively(VfsUtilCore.java:267)
at com.intellij.openapi.vfs.VfsUtilCore.visitChildrenRecursively(VfsUtilCore.java:299)
at com.intellij.openapi.vfs.VfsUtilCore.visitChildrenRecursively(VfsUtilCore.java:299)
at com.intellij.openapi.vfs.VfsUtilCore.visitChildrenRecursively(VfsUtilCore.java:299)
at com.intellij.openapi.vfs.VfsUtilCore.visitChildrenRecursively(VfsUtilCore.java:299)
at com.intellij.openapi.vfs.VfsUtilCore.visitChildrenRecursively(VfsUtilCore.java:299)
at com.intellij.openapi.roots.impl.libraries.LibraryImpl.collectJarFiles(LibraryImpl.java:207)
at com.intellij.openapi.roots.impl.libraries.LibraryImpl.getFiles(LibraryImpl.java:197)
at com.intellij.openapi.roots.ui.configuration.projectRoot.LibrariesContainerFactory$StructureConfigurableLibrariesContainer.getLibraryFiles(LibrariesContainerFactory.java:366)
at com.intellij.openapi.roots.ui.configuration.libraries.impl.LibraryPresentationManagerImpl.isLibraryOfKind(LibraryPresentationManagerImpl.java:137)
at com.intellij.facet.impl.ui.libraries.FrameworkLibraryValidatorImpl$1.process(FrameworkLibraryValidatorImpl.java:62)
at com.intellij.facet.impl.ui.libraries.FrameworkLibraryValidatorImpl$1.process(FrameworkLibraryValidatorImpl.java:59)
at com.intellij.openapi.roots.impl.OrderEnumeratorBase$1.process(OrderEnumeratorBase.java:287)
at com.intellij.openapi.roots.impl.OrderEnumeratorBase$1.process(OrderEnumeratorBase.java:281)
at com.intellij.openapi.roots.impl.OrderEnumeratorBase.processEntries(OrderEnumeratorBase.java:255)
at com.intellij.openapi.roots.impl.OrderEnumeratorBase.processEntries(OrderEnumeratorBase.java:249)
at com.intellij.openapi.roots.impl.OrderEnumeratorBase.processEntries(OrderEnumeratorBase.java:249)
at com.intellij.openapi.roots.impl.OrderEnumeratorBase.processEntries(OrderEnumeratorBase.java:249)
at com.intellij.openapi.roots.impl.ModuleOrderEnumerator.forEach(ModuleOrderEnumerator.java:43)
at com.intellij.openapi.roots.impl.OrderEnumeratorBase.forEachLibrary(OrderEnumeratorBase.java:281)
at com.intellij.openapi.roots.impl.ModuleOrderEnumerator.forEachLibrary(ModuleOrderEnumerator.java:28)
at com.intellij.facet.impl.ui.libraries.FrameworkLibraryValidatorImpl.check(FrameworkLibraryValidatorImpl.java:59)
at com.intellij.facet.impl.ui.FacetErrorPanel$FacetValidatorsManagerImpl.validate(FacetErrorPanel.java:126)
at org.osmorc.facet.ui.OsmorcFacetGeneralEditorTab.updateGui(OsmorcFacetGeneralEditorTab.java:167)
at org.osmorc.facet.ui.OsmorcFacetGeneralEditorTab.access$600(OsmorcFacetGeneralEditorTab.java:60)
at org.osmorc.facet.ui.OsmorcFacetGeneralEditorTab$5.stateChanged(OsmorcFacetGeneralEditorTab.java:116)
at sun.reflect.GeneratedMethodAccessor141.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.util.EventDispatcher.dispatch(EventDispatcher.java:88)
at com.intellij.util.EventDispatcher.access$100(EventDispatcher.java:34)
at com.intellij.util.EventDispatcher$1.invoke(EventDispatcher.java:68)
at com.sun.proxy.$Proxy116.stateChanged(Unknown Source)
at com.intellij.ui.UserActivityWatcher.fireUIChanged(UserActivityWatcher.java:100)
at com.intellij.ui.UserActivityWatcher$7.itemStateChanged(UserActivityWatcher.java:105)
at javax.swing.AbstractButton.fireItemStateChanged(AbstractButton.java:2050)
at javax.swing.AbstractButton$Handler.itemStateChanged(AbstractButton.java:2355)
at javax.swing.DefaultButtonModel.fireItemStateChanged(DefaultButtonModel.java:455)
at javax.swing.JToggleButton$ToggleButtonModel.setSelected(JToggleButton.java:272)
at javax.swing.ButtonGroup.setSelected(ButtonGroup.java:165)
at javax.swing.JToggleButton$ToggleButtonModel.setSelected(JToggleButton.java:254)
at javax.swing.AbstractButton.setSelected(AbstractButton.java:348)
at org.osmorc.facet.ui.OsmorcFacetGeneralEditorTab.reset(OsmorcFacetGeneralEditorTab.java:253)
at com.intellij.openapi.options.UnnamedConfigurableGroup.reset(UnnamedConfigurableGroup.java:51)
at com.intellij.facet.impl.ui.FacetEditorImpl.reset(FacetEditorImpl.java:65)
at com.intellij.facet.impl.ProjectFacetsConfigurator.getOrCreateEditor(ProjectFacetsConfigurator.java:191)
at com.intellij.facet.impl.ui.facetType.FacetTypeEditor.a(FacetTypeEditor.java:86)
at com.intellij.facet.impl.ui.facetType.FacetTypeEditor.createComponent(FacetTypeEditor.java:100)
at com.intellij.openapi.roots.ui.configuration.projectRoot.FacetTypeConfigurable.createOptionsPanel(FacetTypeConfigurable.java:54)
at com.intellij.openapi.ui.NamedConfigurable.createComponent(NamedConfigurable.java:85)
at com.intellij.openapi.ui.MasterDetailsComponent.updateSelection(MasterDetailsComponent.java:700)
at com.intellij.openapi.roots.ui.configuration.projectRoot.FacetStructureConfigurable.updateSelection(FacetStructureConfigurable.java:329)
at com.intellij.openapi.ui.MasterDetailsComponent.setSelectedNode(MasterDetailsComponent.java:691)
at com.intellij.openapi.ui.MasterDetailsComponent.updateSelectionFromTree(MasterDetailsComponent.java:261)
at com.intellij.openapi.ui.MasterDetailsComponent.reset(MasterDetailsComponent.java:406)
at com.intellij.openapi.roots.ui.configuration.projectRoot.BaseStructureConfigurable.reset(BaseStructureConfigurable.java:273)
at com.intellij.openapi.roots.ui.configuration.projectRoot.FacetStructureConfigurable.reset(FacetStructureConfigurable.java:227)
at com.intellij.openapi.roots.ui.configuration.ProjectStructureConfigurable.reset(ProjectStructureConfigurable.java:383)
at com.intellij.openapi.options.ex.SingleConfigurableEditor.<init>(SingleConfigurableEditor.java:69)
at com.intellij.openapi.options.ex.SingleConfigurableEditor.<init>(SingleConfigurableEditor.java:91)
at com.intellij.openapi.options.ex.SingleConfigurableEditor.<init>(SingleConfigurableEditor.java:106)
at com.intellij.ide.actions.ShowStructureSettingsAction$1.<init>(ShowStructureSettingsAction.java:43)
at com.intellij.ide.actions.ShowStructureSettingsAction.showDialog(ShowStructureSettingsAction.java:43)
at com.intellij.ide.actions.ShowStructureSettingsAction.actionPerformed(ShowStructureSettingsAction.java:38)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:182)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter$1.run(ActionMenuItem.java:311)
at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:958)
at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.java:124)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:281)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:109)
at com.intellij.ui.plaf.beg.BegMenuItemUI.a(BegMenuItemUI.java:513)
at com.intellij.ui.plaf.beg.BegMenuItemUI.access$300(BegMenuItemUI.java:45)
at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:533)
at java.awt.Component.processMouseEvent(Component.java:6535)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6300)
at java.awt.Container.processEvent(Container.java:2236)
at java.awt.Component.dispatchEventImpl(Component.java:4891)
at java.awt.Container.dispatchEventImpl(Container.java:2294)
at java.awt.Component.dispatchEvent(Component.java:4713)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
at java.awt.Container.dispatchEventImpl(Container.java:2280)
at java.awt.Window.dispatchEventImpl(Window.java:2750)
at java.awt.Component.dispatchEvent(Component.java:4713)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.awt.EventQueue$4.run(EventQueue.java:729)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:866)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:650)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:381)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Locked ownable synchronizers:
- <0x0000000718e26b40> (a java.util.concurrent.locks.ReentrantReadWriteLock$NonfairSync)
Do you have any idea of what happens ?
Regards,
Guillaume