Have a deadlock XDL file with several exchange events listed. Not sure if these are good or bad or what causes them. What causes exchange events in SQL deadlock graph?

 <exchangeEvent id="Pipe12dfb4bc900" WaitType="e_waitPipeGetRow" nodeId="28">
    <owner id="process4a9ee4eca8" />
    <waiter id="process2612ca8" />

Exchange Events provide details and context on the deadlock itself. Specifically the WaitType e_waitPipeGetRow is a resource that one SELECT statement owns and another SELECT statement is waiting on, ergo being blocked by the first SELECT (for example due to resource contention). This StackOverflow answer provides more context on it and deadlocks specifically.

I'm not an expert on reading deadlock graph data, but my research seems to indicate that kind of WaitType is potentially related to intra-query parallelism deadlocks (as mentioned in the previously linked StackOverflow answer).

You may find SentryOne's higher level read on deadlocks helpful in understanding what's going on.

  • 1
    I did notice a memorygrant warning on one of the underlying queries involved in the graph. The stats were out of date on a few tables. Updated the stats and the warning has gone away. Waiting to see if it fixes the deadlock or not. Jan 10 at 21:29
  • 1
    Note that the presense of intra-query parallel waits in a deadlock graph does not alwasy mean it is an "intra-query parallel thread deadlock". It could be that one thread of a parallel query is involved in an ordinary deadlock with another session, and other threads in the parallel query are blocked and appear in the deadlock graph. Jan 11 at 16:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.