With locking, two transactions can each hold what the other needs and wait forever. Databases deal with this by detecting cycles in a wait-for graph and aborting a victim, or by preventing them with timestamp schemes or a fixed locking order. Expect it whenever transactions lock several rows in different orders, like two transfers between the same accounts in opposite directions. The wait-die versus wound-wait table is a common interview question, and it mirrors the deadlock topic in OS.