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

Bug 345019

Summary: Race condition between stopping tracking breakpoints and GDB shutdown
Product: [Tools] CDT Reporter: Marc Khouzam <marc.khouzam>
Component: cdt-debug-dsf-gdbAssignee: Marc Khouzam <marc.khouzam>
Status: RESOLVED FIXED QA Contact: Marc Khouzam <marc.khouzam>
Severity: normal    
Priority: P3 CC: cdtdoug, pawel.1.piech
Version: 8.0   
Target Milestone: 8.0   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Fix marc.khouzam: iplog-

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