[jbosstools-issues] [JBoss JIRA] (JBIDE-21686) Eclipse freeze when trying to reconnect to an existing connection
Andre Dietisheim (JIRA)
issues at jboss.org
Wed Feb 17 10:25:00 EST 2016
[ https://issues.jboss.org/browse/JBIDE-21686?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13164409#comment-13164409 ]
Andre Dietisheim edited comment on JBIDE-21686 at 2/17/16 10:24 AM:
--------------------------------------------------------------------
I see 2 competing accesses to the UI thread that race with the lock for the OpenShiftProjectCache:
* *holds UI thread lock, waits for OpenShiftProjectCache lock*
{code}
CredentialsPrompter#promptAndAuthenticate > ConnectionWizardPage#saveConnection > ConnectionsRegistry#update > OpenShiftProjectCache#connectionChanged
{code}
Connection wizard is saving the connection that it successfully authenticated and triggers an update in the OpenShiftProjectCache. OpenShiftProjectCache#connectionChanged is waiting for the instance lock (synchronized method)
{code}
Thread [main] (Suspended)
owns: RunnableLock (id=519)
waiting for: OpenShiftProjectCache (id=376)
OpenShiftProjectCache.connectionChanged(IConnection, String, Object, Object) line: 80
ConnectionsRegistry.fireChange(IConnection, int, String, Object, Object) line: 165
ConnectionsRegistry.update(IConnection, IConnection) line: 295
ConnectionWizardPageModel.saveConnection() line: 456
ConnectionWizardPage.connect() line: 405
ConnectionWizard.performFinish() line: 46
WizardDialog.finishPressed() line: 799
WizardDialog.buttonPressed(int) line: 429
Dialog$2.widgetSelected(SelectionEvent) line: 619
TypedListener.handleEvent(Event) line: 248
EventTable.sendEvent(Event) line: 84
Display.sendEvent(EventTable, Event) line: 4481
Button(Widget).sendEvent(Event) line: 1329
Display.runDeferredEvents() line: 3819
Display.readAndDispatch() line: 3430
WizardDialog(Window).runEventLoop(Shell) line: 827
WizardDialog(Window).open() line: 803
WizardUtils.openWizardDialog(IWizard, Shell) line: 244
CredentialsPrompter$1.run() line: 44
UILockListener.doPendingWork() line: 162
UISynchronizer$3.run() line: 154
RunnableLock.run() line: 35
UISynchronizer(Synchronizer).runAsyncMessages(boolean) line: 135
Display.runAsyncMessages(boolean) line: 3794
Display.readAndDispatch() line: 3433
PartRenderingEngine$4.run() line: 1127
Realm.runWithDefault(Realm, Runnable) line: 337
PartRenderingEngine.run(MApplicationElement, IEclipseContext) line: 1018
E4Workbench.createAndRunUI(MApplicationElement) line: 156
Workbench$5.run() line: 694
Realm.runWithDefault(Realm, Runnable) line: 337
Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 606
PlatformUI.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 150
IDEApplication.start(IApplicationContext) line: 139
EclipseAppHandle.run(Object) line: 196
EclipseAppLauncher.runApplication(Object) line: 134
EclipseAppLauncher.start(Object) line: 104
EclipseStarter.run(Object) line: 380
EclipseStarter.run(String[], Runnable) line: 235
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: 483
Main.invokeFramework(String[], URL[]) line: 669
Main.basicRun(String[]) line: 608
Main.run(String[]) line: 1515
Main.main(String[]) line: 1488
{code}
* *holds OpenShiftProjectCache lock, waits for UI thread lock*
{code}
OpenShiftExplorerContentProvider#getChildrenFor > OpenShiftProjectCache#getProjectsFor > Connection#getResources > CredentialsPrompter#promptAndAuthenticate
{code}
OpenShiftExplorerContentProvider is getting the children for the (very same connection instance), reaches out to the OpenShiftProjectCache, acquires the lock to it (was 1st in getting out to the cache). The cache then misses the entries and thus asks the connection to request them. The connection is not authenticated yet, tries to prompt the user and therefore tries to acquire the UI thread.
{code}
Thread [Worker-9] (Suspended)
owns: OpenShiftProjectCache (id=376)
waiting for: Semaphore (id=1542)
Object.wait(long) line: not available [native method]
Semaphore.acquire(long) line: 43
UISynchronizer.syncExec(Runnable) line: 164
Display.syncExec(Runnable) line: 4633
CredentialsPrompter.promptAndAuthenticate(IConnection, Object) line: 33
LazyCredentialsPrompter.promptAndAuthenticate(IConnection, Object) line: 30
Connection.authorize() line: 233
Connection.connect() line: 206
Connection.retryList(String, OpenShiftException, String) line: 424
Connection.getResources(String, String) line: 368
Connection.getResources(String) line: 355
OpenShiftProjectCache.getProjectsFor(IOpenShiftConnection) line: 56
OpenShiftExplorerContentProvider.getChildrenFor(Object) line: 95
BaseExplorerContentProvider$1.run(IProgressMonitor) line: 167
Worker.run() line: 55
{code}
was (Author: adietish):
I see 2 competing accesses to the UI thread that race with the lock for the OpenShiftProjectCache:
* *holds UI thread lock, waits for OpenShiftProjectCache lock*
{code}
CredentialsPrompter#promptAndAuthenticate > ConnectionWizardPage#saveConnection > ConnectionsRegistry#update > OpenShiftProjectCache#connectionChanged
{code}
Current UI thread execution: Connection wizard is saving the connection that it successfully authenticated and triggers an update in the OpenShiftProjectCache. OpenShiftProjectCache#connectionChanged is waiting for the instance lock (synchronized method)
{code}
Thread [main] (Suspended)
owns: RunnableLock (id=519)
waiting for: OpenShiftProjectCache (id=376)
OpenShiftProjectCache.connectionChanged(IConnection, String, Object, Object) line: 80
ConnectionsRegistry.fireChange(IConnection, int, String, Object, Object) line: 165
ConnectionsRegistry.update(IConnection, IConnection) line: 295
ConnectionWizardPageModel.saveConnection() line: 456
ConnectionWizardPage.connect() line: 405
ConnectionWizard.performFinish() line: 46
WizardDialog.finishPressed() line: 799
WizardDialog.buttonPressed(int) line: 429
Dialog$2.widgetSelected(SelectionEvent) line: 619
TypedListener.handleEvent(Event) line: 248
EventTable.sendEvent(Event) line: 84
Display.sendEvent(EventTable, Event) line: 4481
Button(Widget).sendEvent(Event) line: 1329
Display.runDeferredEvents() line: 3819
Display.readAndDispatch() line: 3430
WizardDialog(Window).runEventLoop(Shell) line: 827
WizardDialog(Window).open() line: 803
WizardUtils.openWizardDialog(IWizard, Shell) line: 244
CredentialsPrompter$1.run() line: 44
UILockListener.doPendingWork() line: 162
UISynchronizer$3.run() line: 154
RunnableLock.run() line: 35
UISynchronizer(Synchronizer).runAsyncMessages(boolean) line: 135
Display.runAsyncMessages(boolean) line: 3794
Display.readAndDispatch() line: 3433
PartRenderingEngine$4.run() line: 1127
Realm.runWithDefault(Realm, Runnable) line: 337
PartRenderingEngine.run(MApplicationElement, IEclipseContext) line: 1018
E4Workbench.createAndRunUI(MApplicationElement) line: 156
Workbench$5.run() line: 694
Realm.runWithDefault(Realm, Runnable) line: 337
Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 606
PlatformUI.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 150
IDEApplication.start(IApplicationContext) line: 139
EclipseAppHandle.run(Object) line: 196
EclipseAppLauncher.runApplication(Object) line: 134
EclipseAppLauncher.start(Object) line: 104
EclipseStarter.run(Object) line: 380
EclipseStarter.run(String[], Runnable) line: 235
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: 483
Main.invokeFramework(String[], URL[]) line: 669
Main.basicRun(String[]) line: 608
Main.run(String[]) line: 1515
Main.main(String[]) line: 1488
{code}
* *holds OpenShiftProjectCache lock, waits for UI thread lock*
{code}
OpenShiftExplorerContentProvider#getChildrenFor > OpenShiftProjectCache#getProjectsFor > Connection#getResources > CredentialsPrompter#promptAndAuthenticate
{code}
Waiting for the UI thread: OpenShiftExplorerContentProvider is getting the children for the (very same connection instance), reaches out to the OpenShiftProjectCache, acquires the lock to it (was 1st in getting out to the cache). The cache then misses the entries and thus asks the connection to request them. The connection is not authenticated yet, tries to prompt the user and therefore tries to acquire the UI thread.
{code}
Thread [Worker-9] (Suspended)
owns: OpenShiftProjectCache (id=376)
waiting for: Semaphore (id=1542)
Object.wait(long) line: not available [native method]
Semaphore.acquire(long) line: 43
UISynchronizer.syncExec(Runnable) line: 164
Display.syncExec(Runnable) line: 4633
CredentialsPrompter.promptAndAuthenticate(IConnection, Object) line: 33
LazyCredentialsPrompter.promptAndAuthenticate(IConnection, Object) line: 30
Connection.authorize() line: 233
Connection.connect() line: 206
Connection.retryList(String, OpenShiftException, String) line: 424
Connection.getResources(String, String) line: 368
Connection.getResources(String) line: 355
OpenShiftProjectCache.getProjectsFor(IOpenShiftConnection) line: 56
OpenShiftExplorerContentProvider.getChildrenFor(Object) line: 95
BaseExplorerContentProvider$1.run(IProgressMonitor) line: 167
Worker.run() line: 55
{code}
> Eclipse freeze when trying to reconnect to an existing connection
> -----------------------------------------------------------------
>
> Key: JBIDE-21686
> URL: https://issues.jboss.org/browse/JBIDE-21686
> Project: Tools (JBoss Tools)
> Issue Type: Bug
> Components: openshift
> Affects Versions: 4.3.1.CR1
> Environment:
> Reporter: Marián Labuda
> Priority: Critical
> Labels: connection, openshift_v3
> Fix For: 4.3.1.CR1
>
>
> On nightly build of OpenShift tooling when I am trying to reconnect to an existing connection, whole IDE freeze. E.g. after restart of eclipse and token to server has not been stored in secure storage, I am prompted to enter token when trying to do anything with an existing OS3 connection and upon entering a token and hitting Finish button, IDE freeze and after a while its not responding.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
More information about the jbosstools-issues
mailing list