DESCRIPTION

tmf: Fix deadlock in analysis module

Deadlock occurred when renaming a trace while its analyses are ongoing.

The refresh of supplementary folders is now done outside of the analysis
synchronization lock.

It is done by the analysis only when the job is successfully complete,
or when the job is specifically cancelled (e.g. from Progress view) in
the canceling() method.

When the analysis job is cancelled by the framework (e.g. closing a
trace while analysis is ongoing) then the refresh of supplementary
folder is done in the trace's dispose() method. This ensures the folder
is only refreshed once per trace (instead of once for every analysis).

Change-Id: Id65fe9d57fadab1d17096d7e20bb15f43d30f1c7
Signed-off-by: Luciana Barry xxx@xxx.xxx


COMMENTS

author: Luciana Barry
date: 2014-04-22 17:41:20.000000000

Uploaded patch set 4.

-------------------------------------
author: Kaeden Tapia
date: 2014-04-22 18:18:49.000000000

Patch Set 4: Code-Review-1

(2 comments)

Line:234, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/analysis/TmfAbstractAnalysisModule.java -> I think if this cancel() returns true, the refresh needs to happen as well, see comment bellow.

Line:301, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/analysis/TmfAbstractAnalysisModule.java -> I don't think refreshing here is sufficient. The way I understand it, if the job is sleeping, cancel() will not call cancelling() and the refresh won't happen.

-------------------------------------
author: Luciana Barry
date: 2014-04-22 18:41:43.000000000

Patch Set 4:

(2 comments)

Line:234, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/analysis/TmfAbstractAnalysisModule.java -> This cancel() is called when the trace is closed. In that case we don't want every analysis to refresh the supplementary folder. We let the trace itself do it once from its dispose() method (this is added in this patch).

Line:301, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/analysis/TmfAbstractAnalysisModule.java -> This canceling() is called when you press the stop button on the job in the Progress view.

-------------------------------------
author: Brenden Conley
date: 2014-04-22 20:31:04.000000000

Patch Set 4:

Build Started https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/6554/

-------------------------------------
author: Brenden Conley
date: 2014-04-22 20:31:48.000000000

Patch Set 4: Verified-1

Build Failed 

https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/6554/ : ABORTED

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