| Summary: | JDT reports incorrect thread states if breakpoint suspends VM, and listeners votes to resume | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Samantha Chan <chanskw> | ||||
| Component: | Debug | Assignee: | JDT-Debug-Inbox <jdt-debug-inbox> | ||||
| Status: | CLOSED WONTFIX | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | darin.eclipse, heiko.boettger | ||||
| Version: | 3.5 | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | stalebug | ||||||
| Attachments: |
|
||||||
|
Description
Samantha Chan
1. set conditional breakpoint @ function call to foo
2. brekapoint has condition: foo(); return false;
3. brekapoint suspends VM
4. Breakpoint listener votes to resume when the breakpoint is hit.
The testcase does resume after the listener executes. However, the debug view reports that all of the threads are suspended.
Testcase:
public class TracepointTest {
/**
* @param args
*/
public static void main(String[] args) {
for (;;){
foo(); // conditional breakpoint here: foo(); return false;
System.out.println("out of foo");
}
}
private static void foo()
{
System.out.println("hello"); // breakpoint here
}
}
Correction... condition should be: foo(); return true; so that the VM will suspend. This appears to be a timing issue. The UI is updating the new launch (with a slight delay), as the target is evaluating its condition and listener evaluation. The threads report they are suspended when rendered, although they are actually "quietly" suspended doing evaluations/voting, etc. When the vote is done, there is no refresh to the UI since the suspend was "quiet". If you double click the target, the UI refreshes showing the correct state. Will investigate in RC1. There appear to be several issues around conditional breakpoints with a SUSPEND_VM policy. The same problem happens in 3.4.2 (with conditional bps, as bp listeners did not exist in the same way int 3.4.2). The problems have to do with the fact that the internal transient suspend state is shown when rendering threads & target and updating the actions. Additionaly, attempting to suspend a single thread does not work, as it gets quietly resumed by the breakpoint handling... as the condition evals to "false", and the vote resumes the thread, all threads are resumed. This interation has apparently never worked. Created attachment 134994 [details]
patch
This patch makes the threads/target/actions render as one would expect, but using the actions can get the model into a bad state.
Since these are not new problems and the changes are far reaching I'd prefer to defer this to a later release. I agree. Thanks for looking at it. This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. |