Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 343862 - Infinite assertions when an error happens when setting breakpoints
Summary: Infinite assertions when an error happens when setting breakpoints
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-04-26 10:51 EDT by Marc Khouzam CLA
Modified: 2011-05-13 11:23 EDT (History)
2 users (show)

See Also:
marc.khouzam: review? (pawel.1.piech)


Attachments
Fix (2.82 KB, patch)
2011-05-13 07:13 EDT, Marc Khouzam CLA
marc.khouzam: iplog-
Details | Diff
Need to complete RequestMonitors (2.00 KB, patch)
2011-05-13 10:29 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-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