Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 357518

Summary: [LTTng] Deadlock when switching experiments
Product: z_Archived Reporter: Bernd Hufmann <bernd.hufmann>
Component: LinuxToolsAssignee: Bernd Hufmann <bernd.hufmann>
Status: CLOSED FIXED QA Contact: Francois Chouinard <fchouinard>
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
stack trace of deadlock none

Description Bernd Hufmann CLA 2011-09-13 12:37:40 EDT
Created attachment 203263 [details]
stack trace of deadlock

I detected this problem when using the source code from master branch, commit "Fix for bug357396", SHA 257bf5dc883804a142cbaa80b6d7c94f0402fe24.

When switching experiments I noticed a thread deadlock (i.e. the Eclipse GUI froze). This deadlock is (as usual) time dependent and happens only in certain conditions. I collected the stack trace from the debug perspective of Eclipse. I attached the stack trace. The stack trace shows that the thread [main] owns monitor LTTngExperiment<T> (id=167) and waits for monitor Object (id=165). The tread [Streaming Monitor for ust2_server] owns monitor Object (id=165) and waits for monitor LTTngExperiment<T> (id=167). This is the classical deadlock situation where two threads accessing 2 different monitors in the reverse order.

The stack trace shows the relevant lines of code where the monitors are acquired.

To reproduce, keep switching quickly experiments till it happens.
Comment 1 Bernd Hufmann CLA 2012-07-19 07:50:20 EDT
The problem described in the bug report is not an issue anymore. The class LTTngExperiment was removed when introducing the support of the Common Navigator Framework. LTTng (legacy) is now using the standard TmfExperiment class. 

I'll close the bug.