model-writtenrun 6222 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Jelte Fennema-Nio reported LLVM 7 crashes during cleanup after an out-of-memory error and attached a patch that skipped LLVM shutdown on every unsuccessful backend exit, accepting lost profiling data in those cases #1.
- Zhihong Yu suggested a grammatical correction to the patch's comment #2, and Justin Pryzby subsequently reproduced a crash on master with LLVM 7 on CentOS 7 and reported that Jelte's patch prevented it #3.
- Andres Freund objected that skipping cleanup for every unsuccessful exit was too broad and proposed checking fatal_new_handler_depth so cleanup would be skipped only when an error interrupted LLVM code #4.
- Justin Pryzby supplied an inline implementation exposing fatal_new_handler_depth and checking it in llvm_shutdown(), with a reproducer that he reported no longer crashed #5.
- Andres Freund committed the discussion-derived implementation with Justin Pryzby credited as co-author, encapsulating the depth check in llvm_in_fatal_on_oom() and moving llvm_release_context()'s fatal-section entry below its exit guard edb4d95ddf; he announced backpatching to all relevant branches and emphasized preserving profiling output during other shutdowns #6.
- After the commit, Alexander Lakhin reported another reproducible LLVM 7 crash during parallel-worker cleanup on CentOS 7, involving an event listener, while LLVM 9 did not crash #7; Andres considered this an LLVM bug distinct from the unsafe reentry fixed here #8.
- Alexander confirmed that Justin's reproducer still crashed with LLVM 7 after the fix and questioned whether the issue was version-specific #9; Jelte likewise reported no reproduction with LLVM 10 and an unanswered inquiry about newer CentOS 7 LLVM packages, leaving the PostgreSQL fix landed but the remaining LLVM 7 crashes unresolved in this thread #10.