If present, represents the location and associated call stack where the resource was created.
Represents the location and associated call stack of the thread holding the object requested by another thread.
Represents the location and associated call stack of the thread requesting the object held by another thread.
- Deadlockproblems are usually, but not always, caused byLock hierarchy violationproblems. If theIntel Inspectordetects aDeadlockproblem caused by aLock hierarchy violationproblem, it reports only theDeadlockproblem.
- Intel Inspectorcannot detect aDeadlockproblem involving more than four threads.
- EnterCriticalSection(&cs1);in thread #1
- EnterCriticalSection(&cs2);in thread #2
- call omp_set_lock(lock1)in thread #1
- call omp_set_lock(lock2)in thread #2
- Do not use multiple synchronization objects if one synchronization object is sufficient.
- Use recursive synchronization objects such as recursive mutexes if a thread must acquire the same object more than once.
- Avoid the case where two threads wait for each other to terminate. Instead, use a third thread to wait for both threads to terminate.
- Establish a global lock hierarchy and honor the same lock hierarchy in each thread. For example:
- C language: If you have critical sectionscs1andcs2and establish a global lock hierarchy (cs1,cs2), always acquirecs1before acquiringcs2and releasecs1after releasingcs2.
- Fortran language: If you have lockslock1andlock2and establish a global lock hierarchy (lock1,lock2), always acquirelock1before acquiringlock2and releaselock1after releasinglock2.
- C language: Consider acquiring multiple synchronization objects at the same time using, for example, Microsoft Windows* system APIs such asWaitForMultipleObjects().