onnxruntime: segmentation fault while using onnxruntime==1.21.0
onnxruntime getting crashed with segmentation fault when using version 1.21.0. It is not crashing when using 1.20.1 release.
Steps to reproduce:
import onnxruntime as ort
sess_options = ort.SessionOptions()
sess = ort.InferenceSession('hf_Qwen2-7B-Instruct_model.onnx', sess_options)
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 1
- Comments: 20 (11 by maintainers)
@yuslepukhin, I’m sorry, I deleted my own issue here, because I solved my problem by reinstalling
cuDNNto version 9 so thatonnx-runtimesupports it. Thank you for your reply! 🙂Please,
Add this information to the GH issue along with the hardware you are using. I do not have time allocated for this now, but I will get to it eventually.
– Dmitri
From: Dmytro Varich @.> Sent: Tuesday, April 29, 2025 4:41 To: microsoft/onnxruntime @.> Cc: Mention @.>; Comment @.>; Subscribed @.***> Subject: Re: [microsoft/onnxruntime] segmentation fault while using onnxruntime==1.21.0 (Issue #24144)
@yuslepukhinhttps://github.com/yuslepukhin, Hi!
I am writing an bachelor’s thesis in which I am developing a custom package for ROS 2. In this package, my node uses ONNX Runtime to run a segmentation model using CUDA (GPU acceleration).
I have a segmentation fault when trying to run inference using ONNX Runtime 1.21.1 with CUDAExecutionProvider (CUDA version 12.2). The crash occurs during the initialization of the InferenceSession.
Here is the relevant code snippet:
if not os.path.exists(self.model_path):
self.session = ort.InferenceSession(self.model_path, providers=[‘CUDAExecutionProvider’, ‘CPUExecutionProvider’])
self.get_logger().info(f"ONNX model loaded from {self.model_path}")
Environment:
🤔 Idk, It’s either a problem because I’m using a model from NVIDIA that was originally designed for TensorRT (from Isaac ROS), or it’s still an issue with the ONNX Runtime version — even though you said it would be fixed in the new release compared to 1.21.0.
Thank you in advance!
— Reply to this email directly, view it on GitHubhttps://github.com/microsoft/onnxruntime/issues/24144#issuecomment-2838493731 or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACWHYNERVMO3FUPUARAYQED235QN3BFKMF2HI4TJMJ2XIZLTSSBKK5TBNR2WLJDUOJ2WLJDOMFWWLO3UNBZGKYLEL5YGC4TUNFRWS4DBNZ2F6YLDORUXM2LUPGBKK5TBNR2WLJDUOJ2WLJDOMFWWLLTXMF2GG2C7MFRXI2LWNF2HTAVFOZQWY5LFUVUXG43VMWSG4YLNMWVXI2DSMVQWIX3UPFYGLAVFOZQWY5LFVIZDAMJUGE4DKOJWGGSG4YLNMWUWQYLTL5WGCYTFNSWHG5LCNJSWG5C7OR4XAZNMJFZXG5LFINXW23LFNZ2KM5DPOBUWG44TQKSHI6LQMWVHEZLQN5ZWS5DPOJ42K5TBNR2WLKJRGU3DSMZZGY3TFAVEOR4XAZNFNFZXG5LFUV3GC3DVMWVDEOJUGM4TCNBRG43IFJDUPFYGLJLMMFRGK3FFOZQWY5LFVIZDAMJUGE4DKOJWGGTXI4TJM5TWK4VGMNZGKYLUMU. You are receiving this email because you were mentioned.
Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.