DESCRIPTION

tmf: fix concurrency issue in analyses modules (bug 447434)

The access of member fTrace in class TmfAbstractAnalysesModul was
not thread-safe. The attribute was set to null when cancelling
the analyses (e.g. in the UI thread).

With this patch this attribute will be accessed (read and write)
using a synchronization lock and it will be checked for null
references before using it.

Change-Id: If7a7c7685e4123747357b9fe8040a599ccc95c3a
Signed-off-by: Ricky Reeves <Meredith xxx@xxx.xxx


COMMENTS

author: Ricky Reeves
date: 2014-10-16 01:15:20.000000000

Uploaded patch set 2.

-------------------------------------
author: Brenden Conley
date: 2014-10-16 01:15:26.000000000

Patch Set 2:

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

-------------------------------------
author: Brenden Conley
date: 2014-10-16 02:05:51.000000000

Patch Set 2: Verified+1

Build Successful 

https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/9205/ : SUCCESS

-------------------------------------
author: Luciana Barry
date: 2014-10-16 21:26:38.000000000

Patch Set 2: Code-Review-1

(7 comments)

Line:106, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/statesystem/TmfStateSystemAnalysisModule.java -> Feels like we should check return value of schedule(), although I was not able to get a hanging thread here unless I changed LTTng Kernel Analysis to be non-automatic. I was able to get a hanging thread in CallStackView.getCallStackModule() line 1337. Also, in MemoryUsageViewer.updateData() line 153, StateSystemDisposedException should not be logged as an error.

Line:187, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/statesystem/TmfStateSystemAnalysisModule.java -> countDown

Line:210, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/statesystem/TmfStateSystemAnalysisModule.java -> countDown

Line:107, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/statistics/TmfStatisticsModule.java -> countDown

Line:114, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/statistics/TmfStatisticsModule.java -> countDown

Line:126, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/statistics/TmfStatisticsModule.java -> countDown

Line:127, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/statistics/TmfStatisticsModule.java -> I was able to reproduce this, so should not throw exception.

-------------------------------------
author: Ricky Reeves
date: 2014-10-17 18:51:43.000000000

Patch Set 2:

(7 comments)

Thanks for the thorough testing

Line:106, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/statesystem/TmfStateSystemAnalysisModule.java -> Done

Line:187, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/statesystem/TmfStateSystemAnalysisModule.java -> Done

Line:210, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/statesystem/TmfStateSystemAnalysisModule.java -> Done

Line:107, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/statistics/TmfStatisticsModule.java -> Done

Line:114, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/statistics/TmfStatisticsModule.java -> Done

Line:126, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/statistics/TmfStatisticsModule.java -> Done

Line:127, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/statistics/TmfStatisticsModule.java -> Done

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