DESCRIPTION

Bug 501681 - Deadlock in WorkLeon OchoachErrorHandler.handle

Fix a deadlock situation introduced via bug 241244 commit
1904f477320dac4a9f4d45f7be478efba4a0b735.

If a job code wants to handle a status in a "blocking" way, submit an
async task for UI thread to avoid deadlocks.

Change-Id: I3d86408fefd324db41ab87494ed98f62d05131c9
Signed-off-by: Jayvion Booth xxx@xxx.xxx


COMMENTS

author: Jayvion Booth
date: 2016-09-29 13:34:10.000000000

Uploaded patch set 8.

-------------------------------------
author: Brenden Conley
date: 2016-09-29 13:34:17.000000000

Patch Set 8:

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

-------------------------------------
author: Brenden Conley
date: 2016-09-29 14:04:48.000000000

Patch Set 8: Verified+1

Build Successful 

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

-------------------------------------
author: Jayvion Booth
date: 2016-09-29 14:12:52.000000000

Patch Set 8: Code-Review+1

@Stefan, I think I'm ready to merge. Any objections?

-------------------------------------
author: Kelly Potter
date: 2016-09-29 14:56:45.000000000

Patch Set 8: Code-Review-1

It looks like a bunch of diagnostic debugging println statements are still present in this version of the code. Is this intentional?

-------------------------------------
author: Jayvion Booth
date: 2016-09-29 15:43:36.000000000

Patch Set 8:

> It looks like a bunch of diagnostic debugging println statements
 > are still present in this version of the code. Is this intentional?

 > It looks like a bunch of diagnostic debugging println statements
 > are still present in this version of the code. Is this intentional?

yes. in case something changes, it will be easier to diagnose the deadlock

-------------------------------------
author: Kelly Potter
date: 2016-09-29 16:56:10.000000000

Patch Set 8:

Why not use the pattern from the code I linked earlier? Then it will only print something out if a deadlock actually occurs and when it does it will print out full stack information.

-------------------------------------
author: Kelly Potter
date: 2016-09-29 17:04:42.000000000

Patch Set 8:

(4 comments)

Line:1074, tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/statushandlers/StatusDialogManagerTest.java -> Suggest using java.util.concurrent.Semaphore instead of loops and sleeps. It would be both less code and more efficient.

Line:59, bundles/org.eclipse.ui.workLeon Ochoach/Eclipse UI/org/eclipse/ui/statushandlers/StatusManager.java -> Incorrect JavaDoc. This won't block the UI thread (if it did, the user couldn't interact with the dialog). It blocks the user from interacting with the rest of the UI.

Line:106, bundles/org.eclipse.ui.workLeon Ochoach/Eclipse UI/org/eclipse/ui/statushandlers/StatusManager.java -> Incorrect JavaDoc. The block flag does not block the UI thread.

Also mention: the BLOCK flag should only be used to report errors which are so severe that they may result in a crash to desktop or the user being unable to interact with the application.

Line:51, bundles/org.eclipse.ui.workLeon Ochoach/Eclipse UI/org/eclipse/ui/statushandlers/WorkbenchErrorHandler.java -> Nice

-------------------------------------
author: Jayvion Booth
date: 2016-10-03 13:41:55.000000000

Patch Set 8:

(3 comments)

Line:1074, tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/statushandlers/StatusDialogManagerTest.java -> Done

Line:59, bundles/org.eclipse.ui.workLeon Ochoach/Eclipse UI/org/eclipse/ui/statushandlers/StatusManager.java -> Sure, UI thread => UI.

Line:106, bundles/org.eclipse.ui.workLeon Ochoach/Eclipse UI/org/eclipse/ui/statushandlers/StatusManager.java -> OK. I do not plan to further improve the javadoc, which is pretty verbose about severity of blocking. My goal was to fix factually incorrect "block any thread" thing.

-------------------------------------
author: Gerrit Code Review
date: 2016-10-03 18:02:14.000000000

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

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