[jbosstools-issues] [JBoss JIRA] (JBIDE-19376) Eclipse freezes at or shortly after startup

Denis Golovin (JIRA) issues at jboss.org
Thu Feb 26 16:00:50 EST 2015


    [ https://issues.jboss.org/browse/JBIDE-19376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13044494#comment-13044494 ] 

Denis Golovin commented on JBIDE-19376:
---------------------------------------

UnifiedServerListenerManager initialization should not happen inside UnifiedServerListenerManager.getDefault(), probably we can move it in ServerCorePlugin.start right after UnifiedServerListenerManager.getDefault() call?

componentcore.internal.builder triggers common.core DependencyGraph builde which in turn activates IntegrationPlugin and load UnitedServerListenerManager.
UnifiedServerListenerManager tries to to add itself to all registered servers in constructor and that triggers lock 0x00000000e78ca690 on UnifiedServerListener.class instance. Then when it walks through the servers and try to call Server.removeServerListener on each instance and gets to 0x00000000e485d930 lock. 
Locks order is:

0x00000000e78ca690 -> 0x00000000e485d930

At the same time Servers View triggers servers initialization by iterating them in ServersView2.deferInitialization and that eventually gets to Server.getChildModules call which triggres the lock on object that is instance of Server.class 0x00000000e485d930, next it tiggers JBossServerCorePlugin loading. In turn it tries to get instance of UnifiedServerListener through synchronized getDefault() method and gets to 0x00000000e78ca690 lock. 
So the lock order is:

0x00000000e485d930 -> 0x00000000e78ca690

When lock are obtained in different order DL usually happens.




> Eclipse freezes at or shortly after startup
> -------------------------------------------
>
>                 Key: JBIDE-19376
>                 URL: https://issues.jboss.org/browse/JBIDE-19376
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: server
>    Affects Versions: 4.2.2.Final
>         Environment: Eclipse Luna EE.
>            Reporter: Anton Meller
>            Assignee: Rob Stryker
>            Priority: Critical
>             Fix For: 4.2.3.CR1, 4.3.0.Alpha2
>
>         Attachments: 20150224_threaddump-1424762289905.tdump, 20150225_threaddump-1424847077811.tdump, 20150225_threaddump-1424847803263.tdump, 20150226_threaddump-1424936318015.tdump
>
>
> Sometimes (probably once or twice a month) my eclipse freezes either right at startup or short after startup if I try to save some modified file. In Java VisualVM I can see than a deadlock in org.jboss.ide.eclipse.as.core.JBossServerCorePlugin.start() method.
> Today I have updated JBoss plugins to latest version (from the update site for JBoss Tools 4.2.2.Final) and was able to reproduce the problem at every second or third startup . It looks like it occurs on larger workspaces (my current workspace has about 70 open projects (most of them are java projects and depends on each other)) and if servers view is open/visible right at startup. In a smaller workspace with only 11 projects I had no luck reproducing the deadlock.



--
This message was sent by Atlassian JIRA
(v6.3.11#6341)


More information about the jbosstools-issues mailing list