Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 345019 - Race condition between stopping tracking breakpoints and GDB shutdown
Summary: Race condition between stopping tracking breakpoints and GDB shutdown
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug-dsf-gdb (show other bugs)
Version: 8.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 8.0   Edit
Assignee: Marc Khouzam CLA
QA Contact: Marc Khouzam CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-06 15:34 EDT by Marc Khouzam CLA
Modified: 2011-05-06 16:23 EDT (History)
2 users (show)

See Also:


Attachments
Fix (1.36 KB, patch)
2011-05-06 15:34 EDT, Marc Khouzam CLA
marc.khouzam: iplog-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Khouzam CLA 2011-05-06 15:34:12 EDT
Created attachment 194981 [details]
Fix

When the preference to kill GDB as soon as the last inferior exits is enabled we have a minor race.

Then the process exits, with GDB >= 7.2, we stopTrackingBreakpoints.  And when GDB is killed, the MIBreakpointsManager clears all breakpoint targets.  If the call to stopTrackingBreakpoints arrives after the bp targets are cleared, we get the following (harmless) printout:

!ENTRY org.eclipse.cdt.dsf 4 10005 2011-05-06 15:29:08.721
!MESSAGE Request for monitor: 'RequestMonitor (org.eclipse.cdt.dsf.gdb.service.GDBProcesses_7_2$5@129b922): Status ERROR: org.eclipse.cdt.dsf.gdb code=10005 Invalid context null' resulted in an error.
!SUBENTRY 1 org.eclipse.cdt.dsf.gdb 4 10005 2011-05-06 15:29:08.722
!MESSAGE Invalid context

If we are shutting down, it is ok for the stopTrackingBreakpoints call to fail, and we shouldn't print this error.

This patch simply suppresses the error printout.
Comment 1 Marc Khouzam CLA 2011-05-06 15:35:16 EDT
Committed to HEAD.
Comment 2 CDT Genie CLA 2011-05-06 16:23:06 EDT
*** cdt cvs genie on behalf of mkhouzam ***
Bug 345019: Harmless race condition between stopping tracking breakpoints and GDB shutdown causes unnecessary error printout

[*] GDBProcesses_7_2.java 1.17 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses_7_2.java?root=Tools_Project&r1=1.16&r2=1.17