Bug 409512 - [visualizer] Threads not cleaned-up after process detached
Summary: [visualizer] Threads not cleaned-up after process detached
Status: VERIFIED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug-dsf-gdb (show other bugs)
Version: 8.2   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 8.2.1   Edit
Assignee: Marc Dumais CLA
QA Contact: Marc Khouzam CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-30 11:37 EDT by Marc Dumais CLA
Modified: 2013-09-03 13:10 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Dumais CLA 2013-05-30 11:37:05 EDT
This happens debugging multiple processes within one session.  If we detach from one process, the threads of that process are still displayed on the multicore visualizer.  

This seems to be because the visualizer does not react to the "thread-group-exited" event, which is sent by GDB in that case.
Comment 1 Marc Dumais CLA 2013-06-19 08:18:37 EDT
There are two things going-on:

- GDB today does not send individual "thread exited" events for the threads of a detached process, in local debug sessions.   However it does in remote sessions.  There might be a fix coming in the near future to make GDB send individual events for each thread in the local case.  Even with the fix in newer GDBs, older ones would still cause the problem described in this bug.

- The visualizer can react to the "thread group exited" event and figure-out which threads should be marked as exited.  I am working on a patch that does that.
Comment 2 Marc Dumais CLA 2013-06-19 09:00:11 EDT
Proposed patch:

https://git.eclipse.org/r/13904


w/r to the patch submitted in this bug, I declare the following:

1) that I am authorized to submit this code change
2) that the code is 100% my own work

Marc Dumais
Comment 3 Marc Khouzam CLA 2013-06-20 15:51:47 EDT
Committed to master.
Let's wait until after the Kepler release to add it to cdt_8_2
Comment 5 CDT Genie CLA 2013-06-28 12:22:08 EDT
*** cdt git genie on behalf of Marc Dumais ***

    Bug 409512 - [visualizer] Threads not cleaned-up after process detached
    Change-Id: I5fe41468eb7f1a857ca52e48d8891f77f1800aa8
    Reviewed-on: <a  href="https://git.eclipse.org/r/13904">https://git.eclipse.org/r/13904</a>
    Reviewed-by: Marc Khouzam &lt;marc.khouzam@xxxxxxxxxxxx&gt;
    IP-Clean: Marc Khouzam &lt;marc.khouzam@xxxxxxxxxxxx&gt;
    Tested-by: Marc Khouzam &lt;marc.khouzam@xxxxxxxxxxxx&gt;

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=f7869bb4beac0a9d06f4cfc4ce7d60508c80a4a4
Comment 6 Marc-André Laperle CLA 2013-09-03 01:30:30 EDT
Verified in 8.2.1 RC1 (EPP 20130821-2252).
Comment 7 Marc-André Laperle CLA 2013-09-03 01:35:17 EDT
BTW, does multi-core require non-stop? It only seemed to attach to one process with an all-stop debug config.
Comment 8 Marc Khouzam CLA 2013-09-03 13:10:32 EDT
(In reply to Marc-Andre Laperle from comment #7)
> BTW, does multi-core require non-stop? It only seemed to attach to one
> process with an all-stop debug config.

Yes, we don't support multi-process in all-stop mode.