[PR #12120] [MERGED] harden uncaught exception registration #44962

Closed
opened 2026-04-25 00:39:08 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/12120
Author: @dhiltgen
Created: 8/30/2025
Status: Merged
Merged: 9/2/2025
Merged by: @dhiltgen

Base: mainHead: intel_mac


📝 Commits (1)

  • 5f90ab0 harden uncaught exception registration

📊 Changes

2 files changed (+34 additions, -2 deletions)

View changed files

llama/patches/0025-harden-uncaught-exception-registration.patch (+28 -0)
📝 ml/backend/ggml/ggml/src/ggml.cpp (+6 -2)

📄 Description

Some users (particularly x86 Macs) are hitting (intermittent) crashes during the dlopen of the ggml libraries. There seems to be a race or intermittent failure mode where this initialization happens twice triggering the assert. The C++ runtime is shared throughout the process, so each of these dlopen's is mutating the std::terminate_handler, and given this is ultimately just trying to wire up logging and a stack trace on catastrophic failures, the assert seems unnecessary.

Fixes #12072


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/12120 **Author:** [@dhiltgen](https://github.com/dhiltgen) **Created:** 8/30/2025 **Status:** ✅ Merged **Merged:** 9/2/2025 **Merged by:** [@dhiltgen](https://github.com/dhiltgen) **Base:** `main` ← **Head:** `intel_mac` --- ### 📝 Commits (1) - [`5f90ab0`](https://github.com/ollama/ollama/commit/5f90ab00c9d6615ebbee83df05ee480b7b6e6fbc) harden uncaught exception registration ### 📊 Changes **2 files changed** (+34 additions, -2 deletions) <details> <summary>View changed files</summary> ➕ `llama/patches/0025-harden-uncaught-exception-registration.patch` (+28 -0) 📝 `ml/backend/ggml/ggml/src/ggml.cpp` (+6 -2) </details> ### 📄 Description Some users (particularly x86 Macs) are hitting (intermittent) crashes during the dlopen of the ggml libraries. There seems to be a race or intermittent failure mode where this initialization happens twice triggering the assert. The C++ runtime is shared throughout the process, so each of these dlopen's is mutating the `std::terminate_handler`, and given this is ultimately just trying to wire up logging and a stack trace on catastrophic failures, the assert seems unnecessary. Fixes #12072 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-25 00:39:08 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#44962