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

Bug 331448

Summary: debug deadlock with a multithread application
Product: [Tools] CDT Reporter: galeazzi
Component: cdt-debugAssignee: cdt-debug-inbox <cdt-debug-inbox>
Status: NEW --- QA Contact: Jonah Graham <jonah>
Severity: normal    
Priority: P3 CC: cdtdoug, galeazzi, jamesblackburn+eclipse, pawel.1.piech
Version: 8.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
the source code to reproduce the bug none

Description galeazzi CLA 2010-11-30 11:29:51 EST
Build Identifier: 20100917-0705

I currently use mingw with GDB 7.2 (but the same thing happens with 7.1) and gcc 4.5.0
The attached sources make up a simple multithread application which emulates a more complex one, but they both have the same behaviour.
If I run the application without a breakpoint everything works well, but as I try to add a brekpoint in a line exectuted by a thread, the debugger locks in the following state:
[Switching to Thread ....]
So I can do nothing but terminate the application. I also tried to comunicate with gdb in the console but it doesn't respond to any command.
I debugged the same code with Netbeans/MinGW and everything works fine.
Let me know if you need any other information

Reproducible: Always

Steps to Reproduce:
1. Compile the attached code
2. Add a breakpoint to PICalculator::calculate() (but you can also choose other lines)
3. Debug the application
Comment 1 galeazzi CLA 2010-11-30 11:31:39 EST
Created attachment 184144 [details]
the source code to reproduce the bug
Comment 2 galeazzi CLA 2010-12-14 04:18:02 EST
Did anyone try to run this code in order to reproduce the bug?
Comment 3 James Blackburn CLA 2010-12-14 04:23:23 EST
1) Please attach a Java backtrace when Eclipse is deadlocked:
  http://wiki.eclipse.org/How_to_report_a_deadlock
2) Please provide the version of CDT used in your Eclipse (look in Help > About > Installation Details).