Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[C++, Linux] Segmentation fault when run OrtApi::Run #23897

Open
eason-yi-nio opened this issue Mar 5, 2025 · 1 comment
Open

[C++, Linux] Segmentation fault when run OrtApi::Run #23897

eason-yi-nio opened this issue Mar 5, 2025 · 1 comment

Comments

@eason-yi-nio
Copy link

Describe the issue

I get a Segmentation Fault when I try to run OrtApi::Run from C++ on Linux.

the back trace goes like:
(gdb) bt
#0 0x00007ffff7aadf30 in ?? () from /lib/libonnxruntime.so.1
#1 0x00007ffff711c06d in ?? () from /lib/libonnxruntime.so.1
#2 0x00007ffff7071939 in ?? () from /lib/libonnxruntime.so.1
#3 0x00005555555c5e74 in OrtHandler::ModuleInference<unsigned long, std::vector<unsigned long, std::allocator > > (this=0x7fffffffd170, input=std::vector of length 4, capacity 4 = {...},
output=std::vector of length 0, capacity 0, model_path="../tests/fota_model.ort", model_env_name="onnxruntime") at /home/eason.yi/work_space/ai-demo/FOTAi/include/common/ort_handler.h:246
#4 0x00005555555c2640 in FOTAi::FotaAnalyzer::applyModulePredication (this=0x55555562ad10) at /home/eason.yi/work_space/ai-demo/FOTAi/src/analyzer/analyzer.cpp:370
#5 0x00005555555c0126 in FOTAi::FotaAnalyzer::analyze (this=0x55555562ad10) at /home/eason.yi/work_space/ai-demo/FOTAi/src/analyzer/analyzer.cpp:224
#6 0x000055555556050b in FOTAi::Application::analyze (this=0x7fffffffdc10) at /home/eason.yi/work_space/ai-demo/FOTAi/src/application.cpp:76
#7 0x000055555555fd92 in FOTAi::Application::run (this=0x7fffffffdc10, argc=3, argv=0x7fffffffdd78) at /home/eason.yi/work_space/ai-demo/FOTAi/src/application.cpp:41
#8 0x00005555555b4548 in main (argc=3, argv=0x7fffffffdd78) at /home/eason.yi/work_space/ai-demo/FOTAi/src/main.cpp:7

To reproduce

test_demo.tar.gz
untar this gz
cd FOTAi/build
cmake ..
make -j
./FOTAi -c FOTAi.json

Urgency

No response

Platform

Linux

OS Version

Ubuntu 22.04.5 LTS

ONNX Runtime Installation

Released Package

ONNX Runtime Version or Commit ID

onnxruntime-linux-x64-1.20.1.tgz

ONNX Runtime API

C

Architecture

X64

Execution Provider

Default CPU

Execution Provider Library Version

No response

@skottmckay
Copy link
Contributor

Sorry - too many layers we don't own involved here.

Please provide a repro with an onnx or ort model and onnxruntime being used directly, with input data that causes the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants