Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 331448 - debug deadlock with a multithread application
Summary: debug deadlock with a multithread application
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug (show other bugs)
Version: 8.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: cdt-debug-inbox@eclipse.org CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-30 11:29 EST by galeazzi CLA
Modified: 2020-09-04 15:19 EDT (History)
4 users (show)

See Also:


Attachments
the source code to reproduce the bug (3.66 KB, application/octet-stream)
2010-11-30 11:31 EST, galeazzi CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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).