HeadlinesBriefing favicon HeadlinesBriefing.com

Erlang's Isolation Model Has Hidden Concurrency Problems

Hacker News •
×

The article examines Erlang's actor model as the strongest case for message passing isolation in concurrent programming. While Erlang processes have separate heaps and copy messages rather than sharing references, creating what appears to be perfect isolation, the system still suffers from fundamental concurrency problems. The author argues that even this gold standard implementation of message passing inherits the same failure modes as shared mutable state.

Erlang's single-owner mailbox design is more disciplined than Go's channels, yet the four classic failure modes of shared mutable state persist in different forms. Deadlock occurs when processes make circular calls through gen_server:call, mailbox unbounded growth leads to memory exhaustion, message interleaving creates nondeterministic ordering races, and dynamic typing allows protocol violations. These aren't theoretical problems—researchers found previously unknown instances in production OTP libraries, and a 2026 OOPSLA paper proves that deadlock-freedom doesn't compose even with individually safe protocols.

The article concludes that Erlang's mitigations—convention, monitoring, and discipline—place the burden entirely on programmers rather than being enforced by the language. This 'discipline tax' works when teams are experienced and conventions are followed, but erodes with turnover and time. Even when all mitigations are in place, the isolation model has a structural performance limitation: every process's state is accessed through its single mailbox, serializing all access and creating bottlenecks when many processes need the same data.