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

Bug 343862

Summary: Infinite assertions when an error happens when setting breakpoints
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.0Flags: marc.khouzam: review? (pawel.1.piech)
Target Milestone: 8.0   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Fix
marc.khouzam: iplog-
Need to complete RequestMonitors marc.khouzam: iplog-

Description Marc Khouzam CLA 2011-04-26 10:51:54 EDT
There is a bug in the solution to set breakpoints in DSF-GDB which seems to cause an infinite loop of assertions.  I sometimes see the following, and when I do, it get thousands of them until eclipse runs out of memory.

java.lang.AssertionError
	at org.eclipse.cdt.dsf.mi.service.MIRunControl$MakeTargetAvailableStep.execute(MIRunControl.java:1228)
	at org.eclipse.cdt.dsf.concurrent.Sequence.executeStep(Sequence.java:452)
	at org.eclipse.cdt.dsf.concurrent.Sequence.access$2(Sequence.java:366)
	at org.eclipse.cdt.dsf.concurrent.Sequence$2.handleSuccess(Sequence.java:413)
	at org.eclipse.cdt.dsf.concurrent.RequestMonitor.handleCompleted(RequestMonitor.java:353)
	at org.eclipse.cdt.dsf.concurrent.RequestMonitor$2.run(RequestMonitor.java:298)
	at org.eclipse.cdt.dsf.concurrent.DefaultDsfExecutor$TracingWrapperRunnable.run(DefaultDsfExecutor.java:371)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:662)
Comment 1 Marc Khouzam CLA 2011-05-13 07:13:07 EDT
Created attachment 195580 [details]
Fix

This patch aborts the sequence if a failure is detected.  Previously, we would re-try the sequence indefinitely and get the same failure over and over again.

Committed to head.
Comment 2 Marc Khouzam CLA 2011-05-13 07:13:31 EDT
Fixed
Comment 4 Marc Khouzam CLA 2011-05-13 10:29:20 EDT
Created attachment 195594 [details]
Need to complete RequestMonitors

I forgot to complete the RequestMonitors of the operations that we are cancelling, in case of failure.

Committed to HEAD.
Comment 5 Marc Khouzam CLA 2011-05-13 10:29:34 EDT
Pawel, can you review?
Comment 6 CDT Genie CLA 2011-05-13 11:23:06 EDT
*** cdt cvs genie on behalf of mkhouzam ***
Bug 343862: Infinite assertions when an error happens when setting breakpoints.  Need to complete the requestMonitor of cancelled operations.

[*] MIRunControl.java 1.37 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIRunControl.java?root=Tools_Project&r1=1.36&r2=1.37

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