Skip to content

Debugging Tips

Sambhav Jain edited this page Dec 22, 2023 · 1 revision

Segmentation fault (core dumped) where the stack dump doesn't have symbol names:

PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.                                                                                         
Stack dump:                                                                                                                                                                                         
0.      Program arguments: bazel-bin/external/torch-mlir/torch-mlir-opt -convert-torch-to-stablehlo test.mlir                                                                                       
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):                                                    
0  torch-mlir-opt 0x000055a54d9e3f8d                                                                                                                                                                
1  torch-mlir-opt 0x000055a54d9e447b                                                                                                                                                                
2  torch-mlir-opt 0x000055a54d9e1bb6                                                                                                                                                                
3  torch-mlir-opt 0x000055a54d9e4bc5                                                                                                                                                                
4  libc.so.6      0x00007f192181d520                                                                                                                                                                
5  torch-mlir-opt 0x000055a54949d55c                                                                                                                                                                
6  torch-mlir-opt 0x000055a54949d4a5              
...

Do this:

bazel build @llvm-project//llvm:llvm-symbolizer
export LLVM_SYMBOLIZER_PATH=`pwd`/bazel-bin/external/llvm-project/llvm/llvm-symbolizer
Clone this wiki locally