Jump to content
  • Advertisement
Sign in to follow this  
sweet hero

looking for multithread debugging tools

This topic is 3657 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi everyone, last week, I solved a bug about multithread loading resource, it's a thread safety problem,it takes me much time, you know... I want to know is there some tools can help multithread debugging? when you run your program,the tool do some record about cpu slice allocation for your progress, when bugs replicate,the tool will use this record to force cpu do the same slice allocation to your progress,then you can replicate your bug, is there somes tools like this? or is there some tools could help replicate multithread bugs? thanks a lot

Share this post


Link to post
Share on other sites
Advertisement
No, I don't think such tools exist. But they're not really necessary anyway. The best way to fix concurrent programming problems is to use correct synchronisation between threads - lock shared resources, use copies of data to reduce sharing, etc. If you code it properly, such bugs are impossible.

Share this post


Link to post
Share on other sites
Quote:
Original post by Kylotan
If you code it properly, such bugs are impossible.

If we all coded properly we wouldn't need debuggers at all, multithreaded or not.

To the OP:
I'm not aware of such a tool, the idea is cool though. But for the time being such a tool is pure fantasy. You can go ahead and code it yourself, the is definitely a market for such a thing :)

Share this post


Link to post
Share on other sites
You might want to check out Intel Thread Checker 3.1 for Windows. There is another version for Linux available as well. I haven't used it myself, but its claims are impressive. It works from inside Visual Studio (2003 up)

Quote:
Intel Thread Checker 3.1 for Windows.
# Detects hidden potential errors such as deadlocks and data races, mapping them to the source-code line, call stack, and memory reference
# Displays useful warnings for effective threaded application diagnosis, highlighting the most potentially severe errors
# When using supported Intel® compilers and source instrumentation mode, tracks the error down to the specific variable in your source code
# Comprehensive error detection mitigates the risk of adding threads and enables hands-on learning about the fundamental principles of threading


There is an evaluation download at the link above. The full product seems a little pricy, but there is student/academic discounts available.
They also have a thread profiler product.

Share this post


Link to post
Share on other sites
Quote:
Original post by Deaken Frost
Quote:
Original post by Kylotan
If you code it properly, such bugs are impossible.

If we all coded properly we wouldn't need debuggers at all, multithreaded or not.


The point is that correctness of concurrent programs is something you can easily prove mathematically, and that even once a problem is found, merely catching it in the debugger is rarely sufficient to tell you what needs to change or why. It's quite a different problem to most other issues you get in software development and should really require a different approach. Debugging tools and the like are the wrong approach.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!