DESCRIPTION

Bug 501404 - Workspace save outside of locks

IDEWorkLeon OchoachAdvisor.disconnectFromWorkspace() deadlocks if called within
a workspace lock. Deadlock is caused by an attempt of background
ModalContext thread to acquire workspace lock, which is never released
by UI thread waiting for ModalContext to complete. This happened, for
example, when editor was in process of saving a resource.

To prevent deadlock, workspace-bound background operation is postponed
for later under such circumstances.

Change-Id: I27c56c7153f52c2d861af1f3eb6ff1e418c3769e
Signed-off-by: Erin Fritz xxx@xxx.xxx


COMMENTS

author: Brenden Conley
date: 2016-10-28 17:51:00.000000000

Patch Set 8:

Build Started https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/11054/

-------------------------------------
author: Brenden Conley
date: 2016-10-28 17:51:40.000000000

Patch Set 8: Verified-1

Build Failed 

https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/11054/ : FAILURE

-------------------------------------
author: Brenden Conley
date: 2016-10-28 18:47:34.000000000

Patch Set 8: -Verified

Build Started https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/11055/

-------------------------------------
author: Brenden Conley
date: 2016-10-28 18:48:04.000000000

Patch Set 8: Verified-1

Build Failed 

https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/11055/ : FAILURE

-------------------------------------
author: Brenden Conley
date: 2016-10-28 20:15:13.000000000

Patch Set 8: -Verified

Build Started https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/11059/

-------------------------------------
author: Brenden Conley
date: 2016-10-28 20:15:13.000000000

Patch Set 8: Verified-1

Build Failed 

https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/11059/ : FAILURE

-------------------------------------
author: Brenden Conley
date: 2016-10-28 20:19:27.000000000

Patch Set 8: -Verified

Build Started https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/11060/

-------------------------------------
author: Brenden Conley
date: 2016-10-28 20:19:27.000000000

Patch Set 8: Verified-1

Build Failed 

https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/11060/ : FAILURE

-------------------------------------
author: Brenden Conley
date: 2016-10-28 20:22:06.000000000

Patch Set 8: -Verified

Build Started https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/11061/

-------------------------------------
author: Brenden Conley
date: 2016-10-28 20:44:52.000000000

Patch Set 8: Verified+1

Build Successful 

https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/11061/ : SUCCESS

-------------------------------------
author: Jayvion Booth
date: 2016-10-29 08:52:31.000000000

Patch Set 8: Code-Review-1

(1 comment)

Line:334, bundles/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/IDEWorkLeon OchoachAdvisor.java -> I miss the else branch. The change will never disconnect if workspace is not locked.

-------------------------------------
author: Erin Fritz
date: 2016-11-01 03:20:15.000000000

Patch Set 8:

(1 comment)

Thank you for noticing. I've fixed that.
I've also added a test for this situation.
I had to fix second instantiation of IDEWorkLeon OchoachAdvisor after previous instance is closed. To my understanding this should not affect anything.

Line:334, bundles/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/IDEWorkLeon OchoachAdvisor.java -> Done

-------------------------------------
author: Gerrit Code Review
date: 2016-12-02 15:39:30.000000000

Change has been successfully merged into the git repository by Jayvion Booth

-------------------------------------
