Detection of blocking thread.
Posted: Wed Oct 05, 2011 4:37 pm
Hello.
I'm creating a multithreaded program in which a lot of Mutex.
During the program, there is interlocking of multiple threads due to LockMutex.
For some reason the debugger does not fix this situation and I can not figure out which line of the program is blocked (blocking of a Mutex is expected).
Why not add a debugger feature that would be informed about such situations and show a line number in which the interlocking threads function LockMutex().
This can be done as follows.
The debugger should create a thread in the program being debugged.
If you select LockMutex(), stream, creating a debugger will be given a signal LockMutex and line in which it happened.
If you select UnlockMutex(), the debugger will be given information that the Mutex is unlocked.
If within a certain time after performing LockMutex() function will fail UnlockMutex(), then it can be considered interlocking threads and to inform the programmer about this line of code in which it happened.
I'm creating a multithreaded program in which a lot of Mutex.
During the program, there is interlocking of multiple threads due to LockMutex.
For some reason the debugger does not fix this situation and I can not figure out which line of the program is blocked (blocking of a Mutex is expected).
Why not add a debugger feature that would be informed about such situations and show a line number in which the interlocking threads function LockMutex().
This can be done as follows.
The debugger should create a thread in the program being debugged.
If you select LockMutex(), stream, creating a debugger will be given a signal LockMutex and line in which it happened.
If you select UnlockMutex(), the debugger will be given information that the Mutex is unlocked.
If within a certain time after performing LockMutex() function will fail UnlockMutex(), then it can be considered interlocking threads and to inform the programmer about this line of code in which it happened.