Skip to content

segmentation fault, bus error when importing onnxruntime-node #24096

@amkorousagi

Description

@amkorousagi

Describe the issue

env

  • arm64
  • macOS (Sonoma 14.3)
  • npm version : 11.1.0
  • node v23.7.0
  • onnxruntime-node@1.21.0 (no issue on 1.20.1 version)
  • @huggingface/transformers@3.4.0

description

when importing onnxruntime-node and @huggingface/transformers, onnxruntime makes segmentation fault or bus error and prints the following error message

libc++abi: terminating due to uncaught exception of type onnxruntime::OnnxRuntimeException: /Users/runner/work/1/s/onnxruntime/core/session/ort_env.cc:92 static void OrtEnv::Release(OrtEnv *) env_ptr == p_instance_.get() was false. 

zsh: abort      node index.js

screenshots(only import):

Image

screenshots(load model after import):

Image

Image

Image

To reproduce

to reproduce

Urgency

No response

Platform

Mac

OS Version

Sonoma 14.3

ONNX Runtime Installation

Released Package

ONNX Runtime Version or Commit ID

onnxruntime-node@1.21.0

ONNX Runtime API

JavaScript

Architecture

ARM64

Execution Provider

Default CPU

Execution Provider Library Version

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    api:Javascriptissues related to the Javascript APImodel:transformerissues related to a transformer model: BERT, GPT2, Hugging Face, Longformer, T5, etc.platform:webissues related to ONNX Runtime web; typically submitted using template

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions