Comment

Comment by koverstreet

Previously, we were checking for lock ordering violations. But a lock ordering violation isn't a deadlock, just a potential deadlock.

Checking for a lock ordering violation is simpler because you only have to look at data structures for the current thread - you're just looking at what other locks the current thread is holding.

To check for a deadlock you have to do a full DFS of threads blocked on locks held by other threads, looking for cycles. Quite a bit trickier, but it was well worth it :)

parent koverstreet 4 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton