Community
Participate
Working Groups
Created attachment 168408 [details] Debug View Snapshot I'm running into a deadlock when terminating a DSF-GDB debug session. The problem is intermittent. I'm not sure if it's related to my workspace, but I can attach it if need be. I attached a remote debugger to the hanged workbench. Please see attached snapshot for the stack trace. Here's what seems to be happening: UI Thread is waiting for Daemon Thread [Process Monitor] Daemon Thread[Process Monitor] is executing something synchronously on session executor. However, session executor is no where to be found. I believe it's already been disposed. The latest changes in MIInferiorProcess class point to bug#304146. This might be a regression due to the fix for this bug.
Created attachment 168409 [details] Full stack trace
The deadlock part is a duplicate of 311813 (note the similar bug numbers... conicidence or AI? ;-)) But the more interesting bit is what happened to the exitValue() query. The exitValue query has several guards against the executor shutting down: 1) If the exitCodeQuery is submitted to a shut down executor, it'll throw a RejectedExecutionException. 2) Calling ICommandControlService.queueCommand() after service has shut down should complete with an error immediately. 3) If command control shuts down while command is in queue, the command control will complete the RM with an error. 4) If the executor shuts down just before command control completes the command RM, the RM will propagate the rejected execution exception error to the queue RM. The only possible failing point I can see is the isSessionActive() test handling at the beginning of the query.
Created attachment 168553 [details] Possible fix. Navid, any chance you could try this fix.
Created attachment 168559 [details] More localized fix. This is a more localized fix in the Query object. It would address the same issue. I will go ahead and commit this fix as well as cleanup of the Query.cancel() use elsewhere in DSF and DSF/GDB.
I committed the changes, Marc if you get a chance, please review.
The new Query code is a bit of a mystery to me (as was the old one :-)), so I can't be much help right now. Hopefully I can get to the review I have pending for the new Query code, and things will make more sense.
(In reply to comment #3) > Created an attachment (id=168553) [details] > Possible fix. > > Navid, any chance you could try this fix. Pawel, it looks good to me.
*** Bug 312267 has been marked as a duplicate of this bug. ***
*** cdt cvs genie on behalf of ppiech *** Bug 312813 - [Launch] MIInferiorProcess.exitValue() never returns [*] MIInferiorProcess.java 1.8 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/MIInferiorProcess.java?root=Tools_Project&r1=1.7&r2=1.8 [*] Query.java 1.5 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/concurrent/Query.java?root=Tools_Project&r1=1.4&r2=1.5 [*] DsfCastToTypeSupport.java 1.4 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/DsfCastToTypeSupport.java?root=Tools_Project&r1=1.3&r2=1.4 [*] ModuleDetailPane.java 1.5 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/modules/detail/ModuleDetailPane.java?root=Tools_Project&r1=1.4&r2=1.5 [*] SyncRegisterDataAccess.java 1.2 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/register/SyncRegisterDataAccess.java?root=Tools_Project&r1=1.1&r2=1.2 [*] SyncVariableDataAccess.java 1.6 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/variable/SyncVariableDataAccess.java?root=Tools_Project&r1=1.5&r2=1.6 [*] TriggerCellModifier.java 1.2 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/TriggerCellModifier.java?root=Tools_Project&r1=1.1&r2=1.2 [*] DsfQueryTests.java 1.3 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/concurrent/DsfQueryTests.java?root=Tools_Project&r1=1.2&r2=1.3