llnl / llnl/FPChecker

clang-7: error: unable to execute command: Segmentation fault (core dumped)

Open
#13 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
44
Forks
13
PR merge metrics
No merged PRs in 30d

Description

When I run the example in the static directory, clang reported a segment error
The configuration of my ubuntu is ubuntu16.04 、 the CUDA's version is CUDA9.0、the version of clang is 7.0.
/usr/local/bin/clang++ -c compute.cu -Xclang -load -Xclang /home/tcheng/Desktop/FPChecker-master/build/libfpchecker.so -include Runtime.h -I/home/tcheng/Desktop/FPChecker-master/build/src -O0 -x cuda --cuda-gpu-arch=sm_60 -g
#FPCHECKER: Initializing instrumentation
#FPCHECKER: Pointer value (fp32_check_add_function): 0
#FPCHECKER: Found _FPC_DEVICE_CODE_FUNC_
#FPCHECKER: Found _FPC_PRINT_ERRORS_
#FPCHECKER: Found _FPC_FP32_CHECK_ADD_
#FPCHECKER: Found _FPC_FP32_CHECK_SUB_
#FPCHECKER: Found _FPC_FP32_CHECK_MUL_
#FPCHECKER: Found _FPC_FP32_CHECK_DIV_
#FPCHECKER: Found _FPC_FP64_CHECK_ADD_
#FPCHECKER: Found _FPC_FP64_CHECK_SUB_
#FPCHECKER: Found _FPC_FP64_CHECK_MUL_
#FPCHECKER: Found _FPC_FP64_CHECK_DIV_
#FPCHECKER: Found _FPC_INTERRUPT_
#FPCHECKER: Found _FPC_WARNING_
#FPCHECKER: FPC_ERRORS_DONT_ABORT set
#FPCHECKER: Running Module pass on: compute.cus
#FPCHECKER: Instrumenting function: cudaMalloc
#FPCHECKER: Entering main loop in instrumentFunction
#FPCHECKER: Instrumented operations: 0
#FPCHECKER: Leaving main loop in instrumentFunction
#FPCHECKER: Instrumenting function: cudaFuncGetAttributes
#FPCHECKER: Entering main loop in instrumentFunction
#FPCHECKER: Instrumented operations: 0
#FPCHECKER: Leaving main loop in instrumentFunction
#FPCHECKER: Instrumenting function: cudaDeviceGetAttribute
#FPCHECKER: Entering main loop in instrumentFunction
#FPCHECKER: Instrumented operations: 0
#FPCHECKER: Leaving main loop in instrumentFunction
#FPCHECKER: Instrumenting function: cudaGetDevice
#FPCHECKER: Entering main loop in instrumentFunction
#FPCHECKER: Instrumented operations: 0
#FPCHECKER: Leaving main loop in instrumentFunction
#FPCHECKER: Instrumenting function: cudaOccupancyMaxActiveBlocksPerMultiprocessor
#FPCHECKER: Entering main loop in instrumentFunction
#FPCHECKER: Instrumented operations: 0
#FPCHECKER: Leaving main loop in instrumentFunction
#FPCHECKER: Instrumenting function: cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags
#FPCHECKER: Entering main loop in instrumentFunction
#FPCHECKER: Instrumented operations: 0
#FPCHECKER: Leaving main loop in instrumentFunction
#FPCHECKER: Instrumenting function: _Z5powerd
#FPCHECKER: Entering main loop in instrumentFunction
#FPCHECKER: Instrumented operations: 6
#FPCHECKER: Leaving main loop in instrumentFunction
#FPCHECKER: Instrumenting function: _Z7computed
#FPCHECKER: Entering main loop in instrumentFunction
#FPCHECKER: Instrumented operations: 1
#FPCHECKER: Leaving main loop in instrumentFunction
#FPCHECKER: Instrumenting function: _ZL9atomicCASPiii
#FPCHECKER: Entering main loop in instrumentFunction
#FPCHECKER: Instrumented operations: 0
#FPCHECKER: Leaving main loop in instrumentFunction
#FPCHECKER: Generating code for interruption...
#FPCHECKER: Global errors array created
#FPCHECKER: cmpxchg { %11 = cmpxchg i64* %8, i64 0, i64 %10 seq_cst seq_cst} created
#FPCHECKER: found function: _FPC_READ_GLOBAL_ERRORS_ARRAY_
#FPCHECKER: found function: _FPC_WRITE_GLOBAL_ERRORS_ARRAY_
#FPCHECKER: cmpxchg { %10 = cmpxchg i64* %9, i64 0, i64 %6 seq_cst seq_cst} created
#FPCHECKER: found function: _FPC_READ_FP64_GLOBAL_ARRAY_
#FPCHECKER: found function: _FPC_WRITE_FP64_GLOBAL_ARRAY_
Stack dump:
0. Program arguments: /usr/local/clang-7.0.0/bin/clang-7 -cc1 -triple nvptx64-nvidia-cuda -aux-triple x86_64-unknown-linux-gnu -S -disable-free -disable-llvm-verifier -discard-value-names -main-file-name compute.cu -mrelocation-model static -mthread-model posix -mdisable-fp-elim -no-integrated-as -fuse-init-array -fcuda-is-device -mlink-cuda-bitcode /usr/local/cuda-9.2/nvvm/libdevice/libdevice.10.bc -target-feature +ptx61 -target-cpu sm_60 -dwarf-column-info -debug-info-kind=limited -dwarf-version=2 -debugger-tuning=gdb -resource-dir /usr/local/clang-7.0.0/lib/clang/7.0.0 -internal-isystem /usr/local/clang-7.0.0/lib/clang/7.0.0/include/cuda_wrappers -internal-isystem /usr/local/cuda-9.2/include -include __clang_cuda_runtime_wrapper.h -include Runtime.h -I /home/tcheng/Desktop/FPChecker-master/build/src -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/x86_64-linux-gnu/c++/5.4.0 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/x86_64-linux-gnu/c++/5.4.0 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/backward -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/x86_64-linux-gnu/c++/5.4.0 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/x86_64-linux-gnu/c++/5.4.0 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/backward -internal-isystem /usr/local/include -internal-isystem /usr/local/clang-7.0.0/lib/clang/7.0.0/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -internal-isystem /usr/local/include -internal-isystem /usr/local/clang-7.0.0/lib/clang/7.0.0/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -O0 -fdeprecated-macro -fno-dwarf-directory-asm -fdebug-compilation-dir /home/tcheng/Desktop/FPChecker-master/build/tests/static/test_main_is_found -ferror-limit 19 -fmessage-length 67 -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -load /home/tcheng/Desktop/FPChecker-master/build/libfpchecker.so -o /tmp/compute-3152ae.s -x cuda compute.cu
clang-7: error: unable to execute command: Segmentation fault (core dumped)
clang-7: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 7.0.0 (tags/RELEASE_700/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin
clang-7: note: diagnostic msg: PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script.
clang-7: error: unable to execute command: Segmentation fault (core dumped)
clang-7: note: diagnostic msg: Error generating preprocessed source(s).
Makefile:8: recipe for target 'all' failed
make: *** [all] Error 254

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the command from the static example against compute.cu, then inspect Makefile:8 and the loaded build/libfpchecker.so plugin. Use the reported clang-7 stack dump and the example setup to isolate the crash; done means the example no longer ends with a clang segmentation fault.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers, devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.