Steps to reproduce:
- Install latest Eclipse (Neon 4.6.2) (also tested with Spring ToolSuite 3.8.3 with same result)
- Install JBoss AS, Wildfly & EAP Server Tools from JBoss Tools 4.4.2 Final
- Add Wildfly 10.x runtime to Eclipse (tested 10.0 and 10.1 with same results)
- Add Wildfly 10.x server to Eclipse
- Create a default Maven Web App project
- Add the web app project to the Wildfly server
- Exit Eclipse and restart
Eclipse hangs on startup with a thread deadlock. Eclipse "Progress" window shows "Registering Listeners" which never completes and blocks other Eclipse startup tasks. At this point Eclipse cannot exit and must be force-quit.
Thread dump output from jvisualvm shows a thread deadlock:
Found one Java-level deadlock:
=============================
"Thread-8":
waiting to lock monitor 0x000000011fe4e758 (object 0x0000000782b7aa00, a org.eclipse.wst.server.core.internal.Server),
which is held by "Worker-0"
"Worker-0":
waiting to lock monitor 0x0000000101a566e8 (object 0x0000000782b7aa70, a org.jboss.ide.eclipse.as.core.server.UnitedServerListenerManager),
which is held by "Thread-8"
Java stack information for the threads listed above:
===================================================
"Thread-8":
at org.eclipse.wst.server.core.internal.Server.getServerNotificationManager(Server.java:1034)
- waiting to lock <0x0000000782b7aa00> (a org.eclipse.wst.server.core.internal.Server)
at org.eclipse.wst.server.core.internal.Server.removeServerListener(Server.java:697)
at org.jboss.ide.eclipse.as.core.server.UnitedServerListenerManager.protectAddManagerAsListeners(UnitedServerListenerManager.java:152) - locked <0x0000000782b7aa70> (a org.jboss.ide.eclipse.as.core.server.UnitedServerListenerManager)
at org.jboss.ide.eclipse.as.core.server.UnitedServerListenerManager.initializeManager(UnitedServerListenerManager.java:81)
at org.jboss.ide.eclipse.as.core.server.UnitedServerListenerManager.access$1(UnitedServerListenerManager.java:73)
at org.jboss.ide.eclipse.as.core.server.UnitedServerListenerManager$1.run(UnitedServerListenerManager.java:68)
"Worker-0":
at org.jboss.ide.eclipse.as.core.server.UnitedServerListenerManager.addListener(UnitedServerListenerManager.java:109) - waiting to lock <0x0000000782b7aa70> (a org.jboss.ide.eclipse.as.core.server.UnitedServerListenerManager)
at org.jboss.ide.eclipse.as.core.JBossServerCorePlugin.start(JBossServerCorePlugin.java:74)
at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:774)
at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:767)
at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:724)
at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:932)
at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:309)
at org.eclipse.osgi.container.Module.doStart(Module.java:581)
at org.eclipse.osgi.container.Module.start(Module.java:449)
at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:470)
at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107)
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:529)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:325)
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:345)
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:423)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:372)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:364)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:161)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:564)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174)
at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905)
at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)
at org.eclipse.wst.server.core.internal.ServerType.createServerDelegate(ServerType.java:91)
at org.eclipse.wst.server.core.internal.Server.getDelegate(Server.java:506) - locked <0x0000000782b7aa00> (a org.eclipse.wst.server.core.internal.Server)
at org.eclipse.wst.server.core.internal.Server.getChildModules(Server.java:2634)
at org.eclipse.wst.server.core.internal.Server.visitModule(Server.java:3058)
at org.eclipse.wst.server.core.internal.Server.visit(Server.java:3039)
at org.eclipse.wst.server.core.internal.Server.getAllModules(Server.java:1542)
at org.eclipse.wst.server.ui.internal.cnf.ServersView2$3.run(ServersView2.java:189)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Found 1 deadlock.