Open haolongzhangm opened 3 years ago
any possile add file filter for clangd ENV : CLANGD_FLAGS?
Please include some information about the crash: is it a background index crash (does --background-index=0 suppress it?)
Can you provide a stack trace? Should be at the end of the logs, if you have llvm-symbolizer on your PATH.
Without an isolated reproducer or a stack trace, we likely don't have the resources to dig into such cases.
Workarounds: you can selectively disable background indexing using the config file (clangd.llvm.org/config.html)
this is ycm log:
Printing YouCompleteMe debug information... -- Completion API: 1 -- Client logfile: /tmp/ycm_ho56ru_g.log -- Server Python interpreter: /usr/bin/python3 -- Server Python version: 3.5.2 -- Server has Clang support compiled in: True -- Clang version: clang version 10.0.0 (https://github.com/ycm-core/llvm 038587147cf2f97d1c3e677042f69560c65b5bea) -- Extra configuration file found and loaded -- Extra configuration path: /mnt/second/zhl_second/code/megvii3/brain/megbrain/.ycm_extra_conf.py -- C-family completer debug information: -- Clangd not running -- Clangd executable: ['/usr/bin/clangd-11', '-log=verbose', '-header-insertion-decorators=0', '-limit-results=500'] -- Clangd logfiles: -- /tmp/clangd_stderrh6putp4v.log -- Clangd Server State: Dead -- Clangd Project Directory: /mnt/second/zhl_second/code/megvii3/brain/megbrain -- Clangd Settings: {} -- Clangd Compilation Command: ['clang-tool', '--driver-mode=g++', '-DMEGDNN_ENABLE_SEARCH_CHECKER=1', '-DMGB_ENABLE_CPUINFO_CHECK', '-DMGB_ENABLE_FBS_SERIALIZATION=1', '-I/mnt/second/zhl_second/code/megv ii3/brain/megbrain/third_party/cpuinfo/include', '-I/usr/local/cuda/targets/x86_64-linux/include', '-I/mnt/second/zhl_second/code/megvii3/brain/megbrain/third_party/midout/src', '-I/mnt/second/zhl_second/co de/megvii3/brain/megbrain/genfiles', '-I/mnt/second/zhl_second/code/megvii3/brain/megbrain/src/core/include', '-I/mnt/second/zhl_second/code/megvii3/brain/megbrain/src/gopt/include', '-I/mnt/second/zhl_seco nd/code/megvii3/brain/megbrain/src/opr/include', '-I/mnt/second/zhl_second/code/megvii3/brain/megbrain/src/plugin/include', '-I/mnt/second/zhl_second/code/megvii3/brain/megbrain/src/serialization/include', '-I/mnt/second/zhl_second/code/megvii3/brain/megbrain/src/jit/include', '-I/mnt/second/zhl_second/code/megvii3/brain/megbrain/src/jit/impl/cuda', '-I/mnt/second/zhl_second/code/megvii3/brain/megbrain/src/op r-mm/include', '-I/mnt/second/zhl_second/code/megvii3/brain/megbrain/src/tensorrt/include', '-I/mnt/second/zhl_second/code/megvii3/brain/megbrain/third_party/cppzmq', '-I/mnt/second/zhl_second/code/megvii3/ brain/megbrain/src', '-I/mnt/second/zhl_second/code/megvii3/brain/megbrain/third_party/llvm-project/llvm/include', '-I/mnt/second/zhl_second/code/megvii3/brain/megbrain/third_party/llvm-project/llvm/include ', '-I/mnt/second/zhl_second/code/megvii3/brain/megbrain/third_party/llvm-project/mlir/include', '-I/mnt/second/zhl_second/code/megvii3/brain/megbrain/third_party/llvm-project/llvm/tools/mlir/include', '-I/ mnt/second/zhl_second/code/megvii3/brain/megbrain/src/jit/include', '-I/mnt/second/zhl_second/code/megvii3/brain/megbrain/src/serialization/include/megbrain/serialization/internal', '-I/mnt/second/zhl_secon d/code/megvii3/brain/megbrain/src/serialization/include', '-I/mnt/second/zhl_second/code/megvii3/brain/megbrain/src/genfiles', '-I/mnt/second/zhl_second/code/megvii3/brain/megbrain/src/opr/include', '-I/mnt /second/zhl_second/code/megvii3/brain/megbrain/dnn/include', '-I/mnt/second/zhl_second/code/megvii3/brain/megbrain/dnn/include', '-I/mnt/second/zhl_second/code/megvii3/brain/megbrain/dnn', '-I/mnt/second/zh l_second/code/megvii3/brain/megbrain/dnn/opencl-stub/include', '-I/mnt/second/zhl_second/code/megvii3/brain/megbrain/third_party/MegRay/include', '-I/mnt/second/zhlsecond/code/megvii3/brain/megbrain/third party/MegRay/include', '-I/mnt/second/zhl_second/code/megvii3/brain/megbrain/third_party/flatbuffers/include', '-isystem', '/mnt/second/zhl_second/code/megvii3/brain/megbrain/third_party/libzmq/include', '- isystem', '/mnt/second/zhl_second/code/megvii3/brain/megbrain/third_party/protobuf/include', '-isystem', '/mnt/second/zhl_second/code/megvii3/brain/megbrain/third_party/MegRay/third_party/nccl/build/include ', '-Wall', '-Wextra', '-Wno-unused-parameter', '-Wno-extra', '-m64', '-msse4.2', '-mfpmath=sse', '-O0', '-g', '-fPIC', '-Wno-unused-parameter', '-Wno-class-memaccess', '-x', 'c++-header', '-std=c++17', '-W all', '-Wextra', '-std=c++17', '-x', 'c++', '-I/mnt/second/zhl_second/code/megvii3/brain/megbrain/.ycm/loader/sstar9351', '-I/mnt/second/zhl_second/code/megvii3/brain/megbrain/.ycm/loader/3516', '-DMGB_OPEN CL=1', '-DMEGDNN_WITH_OPENCL=1', '-DMEGDNN_WITH_HEXAGON=1', '-DMEGDNN_WITH_CADENCE=1', '-DMGB_ATLAS=1', '-DMGB_CUDA=1', '-DMEGDNN_WITH_BENCHMARK=1', '-DMEGDNN_ENABLE_EXCEPTIONS=1', '-DMEGDNN_ENABLE_MANGLING =0', '-DMEGDNN_ENABLE_LOGGING=1', '-DMEGDNN_ENABLE_RTTI=1', '-DMEGDNN_CUDA_WITH_CUDNN_5=1', '-DMEGDNN_X86_WITH_MKL=1', '-DMEGDNN_X86_WITH_MKL_DNN=1', '-DMEGDNN_YCM_COMPILE=1', '-DMEGDNN_X86=1', '-DMEGDNN_WI TH_CUDA=1', '-DMEGDNN_ARMV7=1', '-DMEGDNN_AARCH64=1', '-DMEGDNN_MIPS=1', '-DMEGDNN_WITH_OPENCL=1', '-DMEGDNN_WITH_HEXAGON=1', '-DMEGDNN_WITH_ATLAS=1', '-DMEGDNN_ENABLE_FP16_NEON=1', '-DMEGDNN_ARMV8_2_FEATUR E_DOTPROD=1', '-D__ARM_FEATURE_FP16_VECTOR_ARITHMETIC', '-DMEGDNN_WITH_CADENCE=1', '-DMGB_ENABLE_SUBLINEAR=1', '-DMGB_ENABLE_JSON=1', '-DMGB_ENABLE_TENSOR_RT=1', '-DMGB_JIT=1', '-DMGB_JIT_MLIR=1', '-DMGB_EN ABLE_DEBUG_UTIL=1', '-I', '/usr/include', '-I', '/usr/local/include-I', '-I', '/mnt/second/zhl_second/code/megvii3/brain/megbrain/dnn/opencl-stub/include', '-I', '/mnt/second/zhl_second/code/megvii3/brain/m egbrain/test/src/include', '-I', '/mnt/second/zhl_second/code/megvii3/brain/megbrain/src/atlas/include', '-I', '/mnt/second/zhl_second/code/megvii3/brain/megbrain/third_party/intel-mkl/include/', '-I', '/mn t/second/zhl_second/code/megvii3/brain/megbrain/third_party/intel-mkl-dnn/include/', '-I', '/mnt/second/zhl_second/code/megvii3/brain/megbrain/third_party/midout/src', '-I', '/mnt/second/zhl_second/code/meg vii3/brain/megbrain/third_party/gtest/build/release/include', '-I', '/mnt/second/zhl_second/code/megvii3/brain/megbrain/include', '-I', '/mnt/second/zhl_second/code/megvii3/brain/megbrain/.ycm', '-I', '/mnt /second/zhl_second/code/megvii3/brain/megbrain/.ycm/dnnl', '-I', '/mnt/second/zhl_second/code/megvii3/brain/megbrain/.ycm/param/', '-I', '/mnt/second/zhl_second/code/megvii3/brain/megbrain/.ycm/param/src', '-I', '/mnt/second/zhl_second/code/megvii3/brain/megbrain/.ycm/param/include', '-I', '/mnt/second/zhl_second/code/megvii3/brain/megbrain/.ycm/param/src/opencl/kernels', '-I', '/mnt/second/zhl_second/code/me gvii3/brain/megbrain/.ycm/param/src/opr/include', '-I', '/mnt/second/zhl_second/code/megvii3/brain/megbrain/.ycm/src/jit/include', '-I', '/mnt/second/zhl_second/code/megvii3/brain/megbrain/dnn/include', '-I ', '/mnt/second/zhl_second/code/megvii3/brain/megbrain/imperative/src/include', '-I', '/mnt/second/zhl_second/code/megvii3/brain/megbrain/imperative/python/src/', '-I', '/mnt/second/zhl_second/code/megvii3/ brain/megbrain/build/genfiles/', '-I', '/mnt/second/zhl_second/code/megvii3/brain/megbrain/build/imperative/src/include/', '-I', '/mnt/second/zhl_second/code/megvii3/brain/megbrain/third_party/pybind11/incl ude/', '-I', '/usr/include/python3.6/', '-I', '/usr/local/lib/python3.6/dist-packages/numpy/core/include/', '-I', '/mnt/second/zhl_second/code/megvii3/brain/megbrain/sdk/build_config', '/mnt/second/zhl_seco nd/code/megvii3/brain/megbrain/src/core/include/megbrain/common.h']
find Clangd Server State: Dead alwayd die
V[08:45:45.346] >>> {"id":4,"jsonrpc":"2.0","result":[{"range":{"end":{"character":13,"line":25},"start":{"character":10,"line":25}},"uri":"file:///mnt/second/zhl_second/code/megvii3/brain/megbrain[35/2310] /include/megbrain/common.h"}]}
V[08:45:46.221] <<< {"id":5,"jsonrpc":"2.0","method":"textDocument/definition","params":{"position":{"character":34,"line":33},"textDocument":{"uri":"file:///mnt/second/zhl_second/code/megvii3/brain/megbrai n/src/core/include/megbrain/common.h"}}}
I[08:45:46.221] <-- textDocument/definition(5)
V[08:45:46.221] ASTWorker running Definitions on version 1 of /mnt/second/zhl_second/code/megvii3/brain/megbrain/src/core/include/megbrain/common.h
I[08:45:46.221] --> reply:textDocument/definition(5) 0 ms
V[08:45:46.221] >>> {"id":5,"jsonrpc":"2.0","result":[{"range":{"end":{"character":13,"line":25},"start":{"character":10,"line":25}},"uri":"file:///mnt/second/zhl_second/code/megvii3/brain/megbrain/src/core
/include/megbrain/common.h"}]}
V[08:45:46.950] <<< {"id":6,"jsonrpc":"2.0","method":"textDocument/definition","params":{"position":{"character":34,"line":33},"textDocument":{"uri":"file:///mnt/second/zhl_second/code/megvii3/brain/megbrai n/src/core/include/megbrain/common.h"}}}
I[08:45:46.950] <-- textDocument/definition(6)
V[08:45:46.951] ASTWorker running Definitions on version 1 of /mnt/second/zhl_second/code/megvii3/brain/megbrain/src/core/include/megbrain/common.h
I[08:45:46.951] --> reply:textDocument/definition(6) 0 ms
V[08:45:46.951] >>> {"id":6,"jsonrpc":"2.0","result":[{"range":{"end":{"character":13,"line":25},"start":{"character":10,"line":25}},"uri":"file:///mnt/second/zhl_second/code/megvii3/brain/megbrain/src/core
/include/megbrain/common.h"}]}
V[08:45:47.327] BackgroundIndex: serving version 1 (362860756 bytes)
E[08:45:47.382] Background-index: Couldn't read /mnt/second/zhl_second/code/megvii3/brain/megbrain/dnn/opencl/kernels/map_defs.cpp to validate stored index: No such file or directory
E[08:45:47.402] Background-index: Couldn't read /mnt/second/zhl_second/code/megvii3/brain/megbrain/src/mm_handler.pb.cc to validate stored index: No such file or directory
E[08:45:47.411] Background-index: Couldn't read /mnt/second/zhl_second/code/megvii3/brain/megbrain/third_party/llvm-project/llvm/lib/Frontend/OpenACC/ACC.cpp to validate stored index: No such file or direct
ory
E[08:45:47.416] Background-index: Couldn't read /mnt/second/zhl_second/code/megvii3/brain/megbrain/third_party/llvm-project/llvm/lib/Frontend/OpenMP/OMP.cpp to validate stored index: No such file or directo
ry
E[08:45:47.416] Background-index: Couldn't read /mnt/second/zhl_second/code/megvii3/brain/megbrain/python_module/mgbPYTHON_wrap.cxx to validate stored index: No such file or directory
V[08:45:47.547] Indexing /mnt/second/zhl_second/code/megvii3/brain/megbrain/third_party/intel-mkl-dnn/src/cpu/jit_avx512_core_x8s8s32x_1x1_convolution.cpp (digest:=259C77D20BB06614)
V[08:45:47.551] Indexing /mnt/second/zhl_second/code/megvii3/brain/megbrain/third_party/intel-mkl-dnn/src/cpu/jit_avx512_core_x8s8s32x_conv_kernel.cpp (digest:=B2EB2CD94419A055)
V[08:45:47.555] Indexing /mnt/second/zhl_second/code/megvii3/brain/megbrain/third_party/intel-mkl-dnn/src/cpu/jit_avx512_core_x8s8s32x_deconvolution.cpp (digest:=7EA4E66B05F57636)
V[08:45:47.560] Indexing /mnt/second/zhl_second/code/megvii3/brain/megbrain/third_party/intel-mkl-dnn/src/cpu/jit_avx512_common_1x1_conv_kernel.cpp (digest:=03397DEE169C683E)
V[08:45:47.563] Indexing /mnt/second/zhl_second/code/megvii3/brain/megbrain/third_party/intel-mkl-dnn/src/cpu/jit_sse41_convolution.cpp (digest:=48A472D68B55A091)
V[08:45:47.568] Indexing /mnt/second/zhl_second/code/megvii3/brain/megbrain/third_party/intel-mkl-dnn/src/cpu/jit_sse41_conv_kernel_f32.cpp (digest:=226655CA97CB0739)
V[08:45:47.569] <<< {"id":7,"jsonrpc":"2.0","method":"textDocument/definition","params":{"position":{"character":10,"line":25},"textDocument":{"uri":"file:///mnt/second/zhl_second/code/megvii3/brain/megbrain/src/core/include/megbrain/common.h"}}}
I[08:45:47.569] <-- textDocument/definition(7) V[08:45:47.570] ASTWorker running Definitions on version 1 of /mnt/second/zhl_second/code/megvii3/brain/megbrain/src/core/include/megbrain/common.h I[08:45:47.570] --> reply:textDocument/definition(7) 0 ms V[08:45:47.570] >>> {"id":7,"jsonrpc":"2.0","result":[{"range":{"end":{"character":13,"line":25},"start":{"character":10,"line":25}},"uri":"file:///mnt/second/zhl_second/code/megvii3/brain/megbrain/src/core/include/megbrain/common.h"}]}
V[08:45:47.574] Indexing /mnt/second/zhl_second/code/megvii3/brain/megbrain/third_party/intel-mkl-dnn/src/cpu/jit_avx2_1x1_convolution.cpp (digest:=85CEBB52DFFFCE41) V[08:45:47.580] Indexing /mnt/second/zhl_second/code/megvii3/brain/megbrain/third_party/intel-mkl-dnn/src/cpu/jit_avx512_common_conv_kernel.cpp (digest:=95AF2E2AF8EC6943) V[08:45:47.587] Indexing /mnt/second/zhl_second/code/megvii3/brain/megbrain/third_party/intel-mkl-dnn/src/cpu/jit_sse41_1x1_convolution.cpp (digest:=251DB9A118302C96) V[08:45:47.593] Indexing /mnt/second/zhl_second/code/megvii3/brain/megbrain/third_party/intel-mkl-dnn/src/cpu/jit_avx512_core_bf16_1x1_conv_kernel.cpp (digest:=06D54EE79099C282) V[08:45:47.600] Indexing /mnt/second/zhl_second/code/megvii3/brain/megbrain/third_party/intel-mkl-dnn/src/cpu/jit_avx512_core_x8s8s32x_1x1_conv_kernel.cpp (digest:=9F6B21DA5D0A6AE0) V[08:45:47.608] Indexing /mnt/second/zhl_second/code/megvii3/brain/megbrain/third_party/intel-mkl-dnn/src/cpu/jit_avx512_core_bf16_conv_kernel.cpp (digest:=175BF9FCB848962D) V[08:45:47.617] Indexing /mnt/second/zhl_second/code/megvii3/brain/megbrain/third_party/intel-mkl-dnn/src/cpu/jit_uni_dw_convolution.cpp (digest:=44825DB6E5991ECB) V[08:45:47.627] Indexing /mnt/second/zhl_second/code/megvii3/brain/megbrain/third_party/intel-mkl-dnn/src/cpu/jit_uni_reorder.cpp (digest:=A52C3FEDEB61F887) V[08:45:47.637] Indexing /mnt/second/zhl_second/code/megvii3/brain/megbrain/third_party/intel-mkl-dnn/src/cpu/jit_avx512_common_1x1_convolution.cpp (digest:=8FB62AEBBCCE2341) V[08:45:47.642] Indexing /mnt/second/zhl_second/code/megvii3/brain/megbrain/third_party/intel-mkl-dnn/src/cpu/jit_avx512_common_convolution.cpp (digest:=7A8BC05F757E2E28)
this is clangd log
update info:
find all the jit file need two headers, which need create by cmake tool, when I generate this two file , issue not happened include/dnnl_config.h include/dnnl_version.h
but why clangd will exit suddenly when without this two headers ?
more info, even generate include/dnnl_config.h include/dnnl_version.h then remove clang cache, reopen vim src/cpu/jit_avx512_core_u8s8s32x_wino_convolution.cpp
clangd will be hang
any possile add file filter for clangd (blacklist)
update:
deleted: src/cpu/jit_avx2_1x1_conv_kernel_f32.cpp
deleted: src/cpu/jit_avx2_1x1_conv_kernel_f32.hpp
deleted: src/cpu/jit_avx2_1x1_convolution.cpp
deleted: src/cpu/jit_avx2_1x1_convolution.hpp
deleted: src/cpu/jit_avx2_conv_kernel_f32.cpp
deleted: src/cpu/jit_avx2_conv_kernel_f32.hpp
deleted: src/cpu/jit_avx2_convolution.cpp
deleted: src/cpu/jit_avx2_convolution.hpp
deleted: src/cpu/jit_avx512_common_1x1_conv_kernel.cpp
deleted: src/cpu/jit_avx512_common_1x1_conv_kernel.hpp
deleted: src/cpu/jit_avx512_common_1x1_convolution.cpp
deleted: src/cpu/jit_avx512_common_1x1_convolution.hpp
deleted: src/cpu/jit_avx512_common_conv_kernel.cpp
deleted: src/cpu/jit_avx512_common_conv_kernel.hpp
deleted: src/cpu/jit_avx512_common_conv_winograd_kernel_f32.cpp
deleted: src/cpu/jit_avx512_common_conv_winograd_kernel_f32.hpp
deleted: src/cpu/jit_avx512_common_convolution.cpp
deleted: src/cpu/jit_avx512_common_convolution.hpp
deleted: src/cpu/jit_avx512_common_convolution_winograd.cpp
deleted: src/cpu/jit_avx512_common_convolution_winograd.hpp
deleted: src/cpu/jit_avx512_common_lrn.cpp
deleted: src/cpu/jit_avx512_common_lrn.hpp
deleted: src/cpu/jit_avx512_core_bf16_1x1_conv_kernel.cpp
deleted: src/cpu/jit_avx512_core_bf16_1x1_conv_kernel.hpp
deleted: src/cpu/jit_avx512_core_bf16_1x1_convolution.cpp
deleted: src/cpu/jit_avx512_core_bf16_1x1_convolution.hpp
deleted: src/cpu/jit_avx512_core_bf16_conv_kernel.cpp
deleted: src/cpu/jit_avx512_core_bf16_conv_kernel.hpp
deleted: src/cpu/jit_avx512_core_bf16_convolution.cpp
deleted: src/cpu/jit_avx512_core_bf16_convolution.hpp
deleted: src/cpu/jit_avx512_core_bf16_dw_conv_kernel.cpp
deleted: src/cpu/jit_avx512_core_bf16_dw_conv_kernel.hpp
deleted: src/cpu/jit_avx512_core_bf16_sum.cpp
deleted: src/cpu/jit_avx512_core_bf16_sum.hpp
deleted: src/cpu/jit_avx512_core_bf16cvt.hpp
deleted: src/cpu/jit_avx512_core_f32_wino_conv_2x3.cpp
deleted: src/cpu/jit_avx512_core_f32_wino_conv_2x3.hpp
deleted: src/cpu/jit_avx512_core_f32_wino_conv_4x3.cpp
deleted: src/cpu/jit_avx512_core_f32_wino_conv_4x3.hpp
deleted: src/cpu/jit_avx512_core_f32_wino_conv_4x3_kernel.cpp
deleted: src/cpu/jit_avx512_core_f32_wino_conv_4x3_kernel.hpp
deleted: src/cpu/jit_avx512_core_u8s8s32x_wino_convolution.cpp
deleted: src/cpu/jit_avx512_core_u8s8s32x_wino_convolution.hpp
deleted: src/cpu/jit_avx512_core_x8s8s32x_1x1_conv_kernel.cpp
deleted: src/cpu/jit_avx512_core_x8s8s32x_1x1_conv_kernel.hpp
deleted: src/cpu/jit_avx512_core_x8s8s32x_1x1_convolution.cpp
deleted: src/cpu/jit_avx512_core_x8s8s32x_1x1_convolution.hpp
deleted: src/cpu/jit_avx512_core_x8s8s32x_1x1_deconvolution.hpp
deleted: src/cpu/jit_avx512_core_x8s8s32x_conv_kernel.cpp
deleted: src/cpu/jit_avx512_core_x8s8s32x_conv_kernel.hpp
deleted: src/cpu/jit_avx512_core_x8s8s32x_convolution.cpp
deleted: src/cpu/jit_avx512_core_x8s8s32x_convolution.hpp
deleted: src/cpu/jit_avx512_core_x8s8s32x_deconvolution.cpp
deleted: src/cpu/jit_avx512_core_x8s8s32x_deconvolution.hpp
https://github.com/oneapi-src/oneDNN
will lead clangd crash suddenly (without backtrace)
how to get the clangd exist suddenly issue
donw https://github.com/oneapi-src/oneDNN git checkout 4ade75c38 mkdir tmp_hhhhh && cd tmp_hhhhh && cmake .. -DDNNL_CPU_RUNTIME="SEQ" -DCMAKE_EXPORT_COMPILE_COMMANDS=ON && sed -i 's/tmp_hhhhh\///g' compile_commands.json mv ./include/dnnl_version.h .. mv ./include/dnnl_config.h .. mv compile_commands.json .. cd .. rm -rf tmp_hhhhh
vim src/cpu/jit_avx512_core_x8s8s32x_deconvolution.hpp
now workround is remove all oneDNN jit file from compile_commands.json, will be ok
sed didn't like the command s/tmp_hhhhh///g
but I did get this assertion firing with no stack trace I may add
clangd: /home/nathan/src/llvm-project/clang/lib/Sema/SemaLookup.cpp:3022: Sema::SpecialMemberOverloadResult clang::Sema::LookupSpecialMember(clang::CXXRecordDecl *, clang::Sema::CXXSpecialMember, bool, bool, bool, bool, bool): Assertion `CanDeclareSpecialMemberFunction(RD) && "doing special member lookup into record that isn't fully complete"' failed.```
s/tmp_hhhhh///g means , remove tmp_hhhhh
Thats what I did, the version of sed on my distro didn't like it, so i used s/tmp_hhhhh//
which does the same thing
This is a debug build crash trace.
V[11:44:18.955] Indexing /home/nathan/src/oneDNN/src/cpu/jit_avx512_core_x8s8s32x_1x1_convolution.cpp (digest:=259C77D20BB06614)
V[11:44:25.235] Ignored diagnostic. /home/nathan/src/oneDNN/include/dnnl.h:23:10:'dnnl_config.h' file not found
clangd: /home/nathan/src/llvm-project/clang/lib/Sema/SemaLookup.cpp:3023: Sema::SpecialMemberOverloadResult clang::Sema::LookupSpecialMember(clang::CXXRecordDecl *, clang::Sema::CXXSpecialMember, bool, bool, bool, bool, bool): Assertion `CanDeclareSpecialMemberFunction(RD) && "doing special member lookup into record that isn't fully complete"' failed.
#0 0x00007fdc631ecaaa llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/nathan/src/llvm-project/llvm/lib/Support/Unix/Signals.inc:563:11
#1 0x00007fdc631ecc7b PrintStackTraceSignalHandler(void*) /home/nathan/src/llvm-project/llvm/lib/Support/Unix/Signals.inc:630:1
#2 0x00007fdc631eb26b llvm::sys::RunSignalHandlers() /home/nathan/src/llvm-project/llvm/lib/Support/Signals.cpp:70:5
#3 0x00007fdc631ed3bd SignalHandler(int) /home/nathan/src/llvm-project/llvm/lib/Support/Unix/Signals.inc:405:1
#4 0x00007fdc68aac3c0 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x153c0)
#5 0x00007fdc6291418b raise /build/glibc-ZN95T4/glibc-2.31/signal/../sysdeps/unix/sysv/linux/raise.c:51:1
#6 0x00007fdc628f3859 abort /build/glibc-ZN95T4/glibc-2.31/stdlib/abort.c:81:7
#7 0x00007fdc628f3729 get_sysdep_segment_value /build/glibc-ZN95T4/glibc-2.31/intl/loadmsgcat.c:509:8
#8 0x00007fdc628f3729 _nl_load_domain /build/glibc-ZN95T4/glibc-2.31/intl/loadmsgcat.c:970:34
#9 0x00007fdc62904f36 (/lib/x86_64-linux-gnu/libc.so.6+0x36f36)
#10 0x00007fdc661add0d clang::Sema::LookupSpecialMember(clang::CXXRecordDecl*, clang::Sema::CXXSpecialMember, bool, bool, bool, bool, bool) /home/nathan/src/llvm-project/clang/lib/Sema/SemaLookup.cpp:3024:8
#11 0x00007fdc661af7ab clang::Sema::LookupDestructor(clang::CXXRecordDecl*) /home/nathan/src/llvm-project/clang/lib/Sema/SemaLookup.cpp:3324:34
#12 0x00007fdc6567532a clang::UsedDeclVisitor<(anonymous namespace)::DeferredDiagnosticsEmitter>::VisitCXXDeleteExpr(clang::CXXDeleteExpr*) /home/nathan/src/llvm-project/clang/lib/Sema/UsedDeclVisitor.h:75:18
#13 0x00007fdc65672aae clang::StmtVisitorBase<std::add_pointer, (anonymous namespace)::DeferredDiagnosticsEmitter, void>::Visit(clang::Stmt*) /home/nathan/src/llvm-project/build/Debug/tools/clang/include/clang/AST/StmtNodes.inc:717:1
#14 0x00007fdc656769b8 clang::EvaluatedExprVisitorBase<std::add_pointer, (anonymous namespace)::DeferredDiagnosticsEmitter>::VisitStmt(clang::Stmt*) /home/nathan/src/llvm-project/clang/include/clang/AST/EvaluatedExprVisitor.h:101:5
#15 0x00007fdc65673f03 clang::StmtVisitorBase<std::add_pointer, (anonymous namespace)::DeferredDiagnosticsEmitter, void>::VisitCompoundStmt(clang::CompoundStmt*) /home/nathan/src/llvm-project/build/Debug/tools/clang/include/clang/AST/StmtNodes.inc:73:1
#16 0x00007fdc6567214e clang::StmtVisitorBase<std::add_pointer, (anonymous namespace)::DeferredDiagnosticsEmitter, void>::Visit(clang::Stmt*) /home/nathan/src/llvm-project/build/Debug/tools/clang/include/clang/AST/StmtNodes.inc:73:1
#17 0x00007fdc6567170e (anonymous namespace)::DeferredDiagnosticsEmitter::checkFunc(clang::SourceLocation, clang::FunctionDecl*) /home/nathan/src/llvm-project/clang/lib/Sema/Sema.cpp:0:13
#18 0x00007fdc6566d53c (anonymous namespace)::DeferredDiagnosticsEmitter::checkRecordedDecl(clang::Decl*) /home/nathan/src/llvm-project/clang/lib/Sema/Sema.cpp:1614:5
#19 0x00007fdc6566a3a6 clang::Sema::emitDeferredDiags() /home/nathan/src/llvm-project/clang/lib/Sema/Sema.cpp:1659:15
#20 0x00007fdc6566a0fb clang::Sema::ActOnEndOfTranslationUnitFragment(clang::Sema::TUFragmentKind) /home/nathan/src/llvm-project/clang/lib/Sema/Sema.cpp:981:3
#21 0x00007fdc6566a512 clang::Sema::ActOnEndOfTranslationUnit() /home/nathan/src/llvm-project/clang/lib/Sema/Sema.cpp:1014:5
#22 0x00007fdc5e233d6a clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, bool) /home/nathan/src/llvm-project/clang/lib/Parse/Parser.cpp:692:5
#23 0x00007fdc5e0f5be3 clang::ParseAST(clang::Sema&, bool, bool) /home/nathan/src/llvm-project/clang/lib/Parse/ParseAST.cpp:158:16
#24 0x00007fdc66d50762 clang::ASTFrontendAction::ExecuteAction() /home/nathan/src/llvm-project/clang/lib/Frontend/FrontendAction.cpp:1058:1
#25 0x00007fdc66d50128 clang::FrontendAction::Execute() /home/nathan/src/llvm-project/clang/lib/Frontend/FrontendAction.cpp:953:7
#26 0x00007fdc68958df5 clang::clangd::BackgroundIndex::index(clang::tooling::CompileCommand) /home/nathan/src/llvm-project/clang-tools-extra/clangd/index/Background.cpp:321:33
#27 0x00007fdc6895b82e clang::clangd::Backgrou[Error - 11:44:39] Connection to server got closed. Server will not be restarted.
any plan to fix this issue?
any update for this issue ?
In #859 which has a similar stack trace, a user observed that clangd was crashing on invalid code due to not finding a header, and fixing the project configuration resolved the crash.
Looking at the stack trace here, just before the crash there is:
V[11:44:25.235] Ignored diagnostic. /home/nathan/src/oneDNN/include/dnnl.h:23:10:'dnnl_config.h' file not found
So the first thing to try is to make sure that file is found, maybe that avoids the crash.
@HighCommander4
- other side, i think, even some project can not find some headers, it should not lead to clangd crash , this desgin is not ease of use for user
I completely agree, a crash on invalid code is still a bug. I was just trying to see if there's perhaps a workaround you could apply right away.
I think a good next step for making progress on this is to take the file on which clangd crashes, and reduce it to something more minimal and hopefully self-contained which still triggers the crash.
Please describe the problem. For hints on what information is helpful, see: https://clangd.llvm.org/troubleshooting.html
If you can, provide a minimal chunk of code that shows the problem (either inline, or attach it if larger).
Logs Please attach the clangd stderr log if you can. (Usually available from the editor) If possible, run with
--log=verbose
- note that the logs will include the contents of open files! If this is a crash, try to putllvm-symbolizer
on your PATH per the troubleshooting instructions.System information Output of
clangd --version
: Editor/LSP plugin: Operating system:clangd version : test clangd-8 clangd-10 clangd-11, both crash
test code version: https://github.com/oneapi-src/oneDNN @ 4ade75c386c8bea56bd60529b021d8b853d62617
if I remove file : src/cpu/jit* clangd will be ok