We’ve all had to solve deadlock issues. Identify the two conflicting pieces of code, work out an appropriate change to one of them to avoid the issue. Job done.
Occasionally you see a deadlock that has three nodes. Okay, a little bit more analysis and head scratching before the solution presents itself
What if you have 10 nodes, though, twenty, thirty…
Sometimes the best thing to do might be just to sit back and appreciate the deadlock graph as a piece of art.
Here’s one we found related to an attempted DACPAC (SSDT) deployment in a continuous integration environment:
I found something quite satisfying in that picture. Was tempted to print it out and stick it up by my desk.
Later another colleague was asking for advice on solving deadlocks, I shared him the above as a fun example but also to reassure him “at least the one you’re looking at isn’t that bad”.
About a month later he came back with “I take your deadlock graph and raise you…”:
Now that’s what I call a deadlock!
Can anyone do any better? Either in the realms of the more elegant or the more extreme.
Unfortunately my blogging platform doesn’t allow images in the comments so tweet me if you have one you want to share @MattMcGiffen #whendeadlocksbecomeart