Bug 511069 - [AllDiagram][Interoperability][Rpy][PropertyView] Deadlock breaking the starting for components using the Property View framework without opening a Papyrus model.
Summary: [AllDiagram][Interoperability][Rpy][PropertyView] Deadlock breaking the start...
Status: NEW
Alias: None
Product: Papyrus
Classification: Modeling
Component: Interoperability (show other bugs)
Version: 3.0.0   Edit
Hardware: PC Windows 7
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 481830
Blocks:
  Show dependency tree
 
Reported: 2017-01-25 16:48 EST by Vincent Lorenzo CLA
Modified: 2017-06-19 06:53 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vincent Lorenzo CLA 2017-01-25 16:48:06 EST
Tools used to import Rhapsody Model, RSA model, or converting SysML 1.1 into SysML 1.4 plugin, could be used 
without opening a Papyrus Diagram. These tools uses a property view configuration displayed in a Dialog, but we can't access to the ConfigurationManager instance (deadlock). 
Pausing the runtime, we saw : 
  - the Rhapsody import is waiting for org.eclipse.papyrus.views.properties.runtime.ConfigurationManager.getInstance().  (main thread, upper in the stack, there is a readAndDispatch call)
  - ConfigurationManager.getInstance() is already locked by an other thread, which is loading sequence diagram (we are blocked waiting Display to execute a syncExec in org.eclipse.gmf.runtime.diagram.ui.preferences.AppearancePreferencePage.setDefaultFontPreference(IPreferenceStore). )
  
Removing the view property contribution of the sequence diagram fix the bug, but is probably not the good solution.
We don't have the problem when a Papyrus model is already opened. 
Here the full stacktrace:

org.eclipse.equinox.launcher.Main at localhost:53778 (Suspended)	
	Daemon System Thread [Attach Listener] (Suspended)	
	Daemon System Thread [Signal Dispatcher] (Suspended)	
	Daemon System Thread [Finalizer] (Suspended)	
		waiting for: ReferenceQueue$Lock  (id=117)	
		Object.wait(long) line: not available [native method]	
		ReferenceQueue<T>.remove(long) line: 143	
		ReferenceQueue<T>.remove() line: 164	
		Finalizer$FinalizerThread.run() line: 209	
	Daemon System Thread [Reference Handler] (Suspended)	
		waiting for: Reference$Lock  (id=118)	
		Object.wait(long) line: not available [native method]	
		Reference$Lock(Object).wait() line: 502	
		Reference<T>.tryHandlePending(boolean) line: 191	
		Reference$ReferenceHandler.run() line: 153	
	Thread [main] (Suspended)	
		waiting for: ConfigurationManager  (id=114)	
			owned by: Thread [Worker-10] (Suspended)	
		ConfigurationManager.getInstance() line: 139	
		ConfigurationManagerProvider.getConfigurationManager() line: 30	
		ConfigurationManagerRegistry.createConfigurationManager(IConfigurationElement) line: 76	
		ConfigurationManagerRegistry.getConfigurationManager() line: 55	
		PropertiesRuntime.<clinit>() line: 24	
		AbstractMigrationHandler$1(PropertyEditorFactory).edit(Control, Object) line: 161	
		ImportRhapsodyHandler(AbstractMigrationHandler).getTransformationParameters(ExecutionEvent) line: 188	
		ImportRhapsodyHandler(AbstractMigrationHandler).importFiles(Set<IFile>, ExecutionEvent) line: 120	
		ImportRhapsodyHandler(AbstractMigrationHandler).execute(ExecutionEvent) line: 112	
		HandlerProxy.execute(ExecutionEvent) line: 295	
		E4HandlerProxy.execute(IEclipseContext, Map, Event, IEvaluationContext) line: 90	
		NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]	
		NativeMethodAccessorImpl.invoke(Object, Object[]) line: 62	
		DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43	
		Method.invoke(Object, Object...) line: 498	
		MethodRequestor.execute() line: 55	
		InjectorImpl.invokeUsingClass(Object, Class<?>, Class<Annotation>, Object, PrimaryObjectSupplier, PrimaryObjectSupplier, boolean) line: 282	
		InjectorImpl.invoke(Object, Class<Annotation>, Object, PrimaryObjectSupplier, PrimaryObjectSupplier) line: 264	
		ContextInjectionFactory.invoke(Object, Class<Annotation>, IEclipseContext, IEclipseContext, Object) line: 132	
		WorkbenchHandlerServiceHandler(HandlerServiceHandler).execute(ExecutionEvent) line: 152	
		Command.executeWithChecks(ExecutionEvent) line: 494	
		ParameterizedCommand.executeWithChecks(Object, Object) line: 488	
		HandlerServiceImpl.executeHandler(ParameterizedCommand, IEclipseContext) line: 210	
		HandledContributionItem.executeItem(Event) line: 433	
		HandledContributionItem(AbstractContributionItem).handleWidgetSelection(Event) line: 454	
		AbstractContributionItem$3.handleEvent(Event) line: 482	
		EventTable.sendEvent(Event) line: 86	
		Display.sendEvent(EventTable, Event) line: 4431	
		MenuItem(Widget).sendEvent(Event) line: 1079	
		Display.runDeferredEvents() line: 4241	
		Display.readAndDispatch() line: 3820	
		PartRenderingEngine$4.run() line: 1133	
		Realm.runWithDefault(Realm, Runnable) line: 336	
		PartRenderingEngine.run(MApplicationElement, IEclipseContext) line: 1022	
		E4Workbench.createAndRunUI(MApplicationElement) line: 153	
		Workbench$5.run() line: 698	
		Realm.runWithDefault(Realm, Runnable) line: 336	
		Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 610	
		PlatformUI.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 148	
		IDEApplication.start(IApplicationContext) line: 138	
		EclipseAppHandle.run(Object) line: 196	
		EclipseAppLauncher.runApplication(Object) line: 134	
		EclipseAppLauncher.start(Object) line: 104	
		EclipseStarter.run(Object) line: 388	
		EclipseStarter.run(String[], Runnable) line: 243	
		NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]	
		NativeMethodAccessorImpl.invoke(Object, Object[]) line: 62	
		DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43	
		Method.invoke(Object, Object...) line: 498	
		Main.invokeFramework(String[], URL[]) line: 653	
		Main.basicRun(String[]) line: 590	
		Main.run(String[]) line: 1499	
		Main.main(String[]) line: 1472	
	Thread [Active Thread: Equinox Container: 6b569278-da9f-4b34-b0f6-17cfce1dd701] (Suspended)	
		Unsafe.park(boolean, long) line: not available [native method]	
		LockSupport.parkNanos(Object, long) line: 215	
		AbstractQueuedSynchronizer$ConditionObject.awaitNanos(long) line: 2078	
		ScheduledThreadPoolExecutor$DelayedWorkQueue.take() line: 1093	
		ScheduledThreadPoolExecutor$DelayedWorkQueue.take() line: 809	
		ScheduledThreadPoolExecutor(ThreadPoolExecutor).getTask() line: 1067	
		ScheduledThreadPoolExecutor(ThreadPoolExecutor).runWorker(ThreadPoolExecutor$Worker) line: 1127	
		ThreadPoolExecutor$Worker.run() line: 617	
		Thread.run() line: 745	
	Daemon Thread [Framework Event Dispatcher: org.eclipse.osgi.internal.framework.EquinoxEventPublisher@26994c6a] (Suspended)	
		waiting for: EventManager$EventThread<K,V,E>  (id=20)	
		Object.wait(long) line: not available [native method]	
		EventManager$EventThread<K,V,E>(Object).wait() line: 502	
		EventManager$EventThread<K,V,E>.getNextEvent() line: 400	
		EventManager$EventThread<K,V,E>.run() line: 336	
	Daemon Thread [Start Level: Equinox Container: 6b569278-da9f-4b34-b0f6-17cfce1dd701] (Suspended)	
		waiting for: EventManager$EventThread<K,V,E>  (id=22)	
		Object.wait(long) line: not available [native method]	
		EventManager$EventThread<K,V,E>(Object).wait() line: 502	
		EventManager$EventThread<K,V,E>.getNextEvent() line: 400	
		EventManager$EventThread<K,V,E>.run() line: 336	
	Daemon Thread [[Timer] - Main Queue Handler] (Suspended)	
		waiting for: Object  (id=112)	
		Object.wait(long) line: not available [native method]	
		TimerImpl.run() line: 141	
		Thread.run() line: 745	
	Daemon Thread [Bundle File Closer] (Suspended)	
		waiting for: EventManager$EventThread<K,V,E>  (id=27)	
		Object.wait(long) line: not available [native method]	
		EventManager$EventThread<K,V,E>(Object).wait() line: 502	
		EventManager$EventThread<K,V,E>.getNextEvent() line: 400	
		EventManager$EventThread<K,V,E>.run() line: 336	
	Thread [Worker-JM] (Suspended)	
		waiting for: ArrayList<E>  (id=111)	
		Object.wait(long) line: not available [native method]	
		InternalWorker.run() line: 59	
	Daemon Thread [EMF Reference Cleaner] (Suspended)	
		waiting for: ReferenceQueue$Lock  (id=109)	
		Object.wait(long) line: not available [native method]	
		ReferenceQueue<T>.remove(long) line: 143	
		ReferenceQueue<T>.remove() line: 164	
		CommonUtil$1ReferenceClearingQueuePollingThread.run() line: 70	
	Daemon Thread [Java indexing] (Suspended)	
		waiting for: IndexManager  (id=115)	
		Object.wait(long) line: not available [native method]	
		IndexManager(Object).wait() line: 502	
		IndexManager(JobManager).run() line: 373	
		Thread.run() line: 745	
	Daemon Thread [EventAdmin Async Event Dispatcher Thread] (Suspended)	
		waiting for: RunnableLock  (id=18145)	
		Object.wait(long) line: not available [native method]	
		RunnableLock(Object).wait() line: 502	
		UISynchronizer(Synchronizer).syncExec(Runnable) line: 250	
		UISynchronizer.syncExec(Runnable) line: 144	
		Display.syncExec(Runnable) line: 4892	
		E4Application$1.syncExec(Runnable) line: 212	
		UIEventObjectSupplier$UIEventHandler.handleEvent(Event) line: 58	
		EventHandlerWrapper.handleEvent(Event, Permission) line: 201	
		EventHandlerTracker.dispatchEvent(EventHandlerWrapper, Permission, int, Event) line: 197	
		EventHandlerTracker.dispatchEvent(Object, Object, int, Object) line: 1	
		EventManager.dispatchEvent(Set<Entry<K,V>>, EventDispatcher<K,V,E>, int, E) line: 230	
		EventManager$EventThread<K,V,E>.run() line: 340	
	Thread [Worker-10] (Suspended)	
		owns: ViewConstraintEngineImpl  (id=113)	
		owns: ConfigurationManager  (id=114)	
		Unsafe.park(boolean, long) line: not available [native method]	
		LockSupport.parkNanos(Object, long) line: 215	
		Semaphore$NonfairSync(AbstractQueuedSynchronizer).doAcquireSharedNanos(int, long) line: 1037	
		Semaphore$NonfairSync(AbstractQueuedSynchronizer).tryAcquireSharedNanos(int, long) line: 1328	
		Semaphore.tryAcquire(long, TimeUnit) line: 409	
		PendingSyncExec.acquire(long) line: 35	
		PendingSyncExec.waitUntilExecuted(UILockListener) line: 78	
		UISynchronizer.syncExec(Runnable) line: 158	
		Display.syncExec(Runnable) line: 4892	
		AppearancePreferencePage.setDefaultFontPreference(IPreferenceStore) line: 286	
		AppearancePreferencePage.initDefaults(IPreferenceStore) line: 222	
		CustomDiagramPreferenceInitializer(DiagramPreferenceInitializer).initializeDefaultPreferences() line: 34	
		CustomDiagramPreferenceInitializer.initializeDefaultPreferences() line: 31	
		UMLDiagramEditorPlugin.start(BundleContext) line: 109	
		BundleContextImpl$3.run() line: 774	
		BundleContextImpl$3.run() line: 1	
		AccessController.doPrivileged(PrivilegedExceptionAction<T>) line: not available [native method]	
		BundleContextImpl.startActivator(BundleActivator) line: 767	
		BundleContextImpl.start() line: 724	
		EquinoxBundle.startWorker0() line: 933	
		EquinoxBundle$EquinoxModule.startWorker() line: 309	
		EquinoxBundle$EquinoxModule(Module).doStart(Module$StartOptions...) line: 581	
		EquinoxBundle$EquinoxModule(Module).start(Module$StartOptions...) line: 449	
		SecureAction.start(Module, Module$StartOptions...) line: 468	
		EclipseLazyStarter.postFindLocalClass(String, Class<?>, ClasspathManager) line: 103	
		ClasspathManager.findLocalClass(String) line: 529	
		EquinoxClassLoader(ModuleClassLoader).findLocalClass(String) line: 328	
		BundleLoader.findLocalClass(String) line: 359	
		BundleLoader.findClassInternal(String, boolean) line: 437	
		BundleLoader.findClass(String, boolean) line: 386	
		BundleLoader.findClass(String) line: 378	
		DependentPolicy.loadClass(String) line: 55	
		PolicyHandler.doBuddyClassLoading(String) line: 141	
		BundleLoader.findClassInternal(String, boolean) line: 462	
		BundleLoader.findClass(String, boolean) line: 386	
		BundleLoader.findClass(String) line: 378	
		DependentPolicy.loadClass(String) line: 55	
		PolicyHandler.doBuddyClassLoading(String) line: 141	
		BundleLoader.findClassInternal(String, boolean) line: 462	
		BundleLoader.findClass(String, boolean) line: 386	
		BundleLoader.findClass(String) line: 378	
		EquinoxClassLoader(ModuleClassLoader).loadClass(String, boolean) line: 150	
		EquinoxClassLoader(ClassLoader).loadClass(String) line: 357	
		EquinoxBundle.loadClass(String) line: 564	
		ClassLoaderHelper.loadClass(String) line: 53	
		ClassLoaderHelper.loadClass(String, Class<T>) line: 79	
		ClassLoaderHelper.newInstance(String, Class<T>) line: 107	
		ConstraintFactory.loadConstraint(SimpleConstraint) line: 78	
		ConstraintFactory.createFromModel(ConstraintDescriptor) line: 68	
		ViewConstraintEngineImpl(DefaultConstraintEngine<E>).addConstraint(ConstraintDescriptor) line: 75	
		ViewConstraintEngineImpl.addContext(Context) line: 55	
		ConfigurationManager.enableContext(Context, boolean, boolean) line: 723	
		ConfigurationManager.enableContext(Context, boolean) line: 704	
		ConfigurationManager.addContext(Context, boolean, boolean) line: 630	
		ConfigurationManager.addContext(URI, boolean, boolean) line: 527	
		624954136.accept(URI, boolean, boolean) line: not available	
		ContextExtensionPoint.processContext(IConfigurationElement, ContextExtensionPoint$ModelConsumer) line: 91	
		ContextExtensionPoint.<init>(ContextExtensionPoint$ModelConsumer) line: 60	
		ConfigurationManager.start() line: 166	
		ConfigurationManager.getInstance() line: 140	
		Activator$1.run(IProgressMonitor) line: 73	
		Worker.run() line: 56	
	Daemon Thread [Provisioning Event Dispatcher] (Suspended)	
	Daemon Thread [[ThreadPool Manager] - Idle Thread] (Suspended)	
	Daemon Thread [com.google.inject.internal.util.$Finalizer] (Suspended)	
	Thread [Worker-18] (Suspended)	
	Thread [Worker-24] (Suspended)	
	Thread [Worker-32] (Suspended)	
	Thread [Worker-33] (Suspended)
Comment 1 Eclipse Genie CLA 2017-01-25 16:51:34 EST
New Gerrit change created: https://git.eclipse.org/r/89555
Comment 2 Vincent Lorenzo CLA 2017-01-26 05:25:02 EST
Generating a property view for a profile seems impacted too
Comment 3 Vincent Lorenzo CLA 2017-02-06 10:04:52 EST
I renamed the bug, because it is not linked to the SequenceDiagram, it is a more general problem.
The problem has already been identified in bug 481830, maybe the same kind of fix could help us.