You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
corrupted double-linked list [1] 14443 IOT instruction (core dumped) #169
bugSomething isn't workingep: CUDARelated to CUDA execution provider (Windows/Linux)onnxruntime issueProblem caused by ONNX Runtime, not actionable by ortos: linuxp: medMedium priority (bugs/regressions)
When I use CUDA provider to run the corresponding onnx model and complete the inference, this problem will appear from time to time. (The inference result is totally correct!)
corrupted double-linked list [1]
14443 IOT instruction (core dumped)
pub fn new(config: &Config) -> Result<Self> {
// build session first in order to get `shape, dtype, names` from onnx model.
ort::init().commit()?;
let session =
Session::builder()?.with_model_from_file(onnx_path)?;
// --------------------------------------------------------------------
// do something about inputs and outputs here
// --------------------------------------------------------------------
// build session again
let builder = Session::builder()?;
let cuda = CUDAExecutionProvider::default().build();
if cuda.is_available()? && cuda.register(&builder).is_ok() {
println!("> Using CUDA");
} else {
println!("> Using CPU");
}
let session = builder
.with_optimization_level(ort::GraphOptimizationLevel::Level3)?
.with_model_from_file(onnx_path)?;
pub fn run_fp32(
&self,
xs: &Array<f32, IxDyn>,
) -> Result<Vec<Array<f32, IxDyn>>> {
// run
let ys = self.session.run(ort::inputs![xs.view()]?)?;
Ok(ys
.iter()
.map(|(_, v)| {
v.extract_tensor::<f32>()
.unwrap()
.view()
.clone()
.into_owned()
})
.collect::<Vec<Array<_, _>>>())
}
When using TensorRT and CPU providers, there will be fine.
Given that the results print before the crash I assume it may be occurring when something is dropped. Are you able to use a debugger to step through & see where it crashes?
I could reproduce this on Windows using rustc 1.78.0-nightly (2dceda4f3 2024-03-01) but only with --release. --profile dev doesn't crash.
rustc 1.78.0-nightly (46b180ec2 2024-03-08) (latest nightly) and rustc 1.76.0 (07dca489a 2024-02-04) (stable) do not crash in either profile. Seems like a regression in rustc that's already been fixed.
1.76.0在 2024年3月10日,00:03,Carson M. ***@***.***> 写道:
@jamjamjon What's rustc --version say?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
I am encountering the same "corrupted double-linked list. Aborted (core dumped)" crash, quite random, when running in release mode AND with onnx GraphOptimizationLevel == 3. (with 1 and 2 doesn't seem to crash)
ort = { version = "=2.0.0-rc.9", features = ["cuda"] }
rustc 1.86.0 (05f9846f8 2025-03-31)
ubuntu 24.04
bugSomething isn't workingep: CUDARelated to CUDA execution provider (Windows/Linux)onnxruntime issueProblem caused by ONNX Runtime, not actionable by ortos: linuxp: medMedium priority (bugs/regressions)
Activity
decahedron1 commentedon Mar 9, 2024
Is
run_fp32being called from multiple threads/or a different thread than the one the session was created on?jamjamjon commentedon Mar 9, 2024
Yes! I use
[mpsc](std::sync::mpsc::channel())But, this problem will appear even if I use the single thread.
Here is the output:
decahedron1 commentedon Mar 9, 2024
Given that the results print before the crash I assume it may be occurring when something is dropped. Are you able to use a debugger to step through & see where it crashes?
jamjamjon commentedon Mar 9, 2024
I tried yolov8 example and found out that this problem can be be reproduced.
Demo files
yolov8-ort-bug-demo.zip
run
and you will see
The model inference results is ok, and the image annotated will show up. This bug appears when I press the button.
I tried some code with
ort=1.16.3andonnxruntime=1.16.3, this bug won't show up.jamjamjon commentedon Mar 9, 2024
2.0.0 rc0 also has this problem when running yolov8 example using
CUDAexecute provider.decahedron1 commentedon Mar 9, 2024
@jamjamjon What's
rustc --versionsay?decahedron1 commentedon Mar 9, 2024
I could reproduce this on Windows using
rustc 1.78.0-nightly (2dceda4f3 2024-03-01)but only with--release.--profile devdoesn't crash.rustc 1.78.0-nightly (46b180ec2 2024-03-08)(latest nightly) andrustc 1.76.0 (07dca489a 2024-02-04)(stable) do not crash in either profile. Seems like a regression in rustc that's already been fixed.jamjamjon commentedon Mar 10, 2024
masc-it commentedon May 5, 2025
I am encountering the same "corrupted double-linked list. Aborted (core dumped)" crash, quite random, when running in release mode AND with onnx GraphOptimizationLevel == 3. (with 1 and 2 doesn't seem to crash)