-
Notifications
You must be signed in to change notification settings - Fork 12k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vscode clangd crash in envoy dev environment #109297
Comments
Looks like it's resolved in the latest version and just needs a release. Tested and resolved for the meantime by:
and adding in
Now I look further into it, it appears the envoy dev container may have an ancient clangd by default:
Sorry to have bothered! |
@llvm/issue-subscribers-clangd Author: Raven Black (ravenblackx)
Crashing while work in progress on some envoy code.
I made a branch to capture the complete code state at the time of the crash - this consistently occurs within a few seconds of starting up the window with the code in this state and only the cache_filter.cc tab open. The compilation database has been freshly generated (I don't know if that's relevant) via envoy's script for that purpose. I definitely don't expect it to compile in this half-modified state, but I also would prefer not to expect the clangd server to crash and drop core dumps into my workspace. :) Edit: I disabled several other extensions to make sure it wasn't interference, the remaining non-disabled extensions that could feasibly be related are <details>
|
(Related suggestion, maybe the clangd extension should notify somewhere prominent if the clangd server is ancient so that chumps like me don't waste your time filing bugs that were fixed a century ago! It's non-obvious at the user-level that the extension is disconnected from the server version.) |
Could you file an issue at https://github.com/clangd/vscode-clangd/issues with this suggestion please, so we don't forget about it? |
Crashing while work in progress on some envoy code.
I made a branch to capture the complete code state at the time of the crash - this consistently occurs within a few seconds of starting up the window with the code in this state and only the cache_filter.cc tab open.
The compilation database has been freshly generated (I don't know if that's relevant) via envoy's script for that purpose.
I definitely don't expect it to compile in this half-modified state, but I also would prefer not to expect the clangd server to crash and drop core dumps into my workspace. :)
Edit: I disabled several other extensions to make sure it wasn't interference, the remaining non-disabled extensions that could feasibly be related are
C/C++ Themes (Microsoft)
,Bazel
,Github Pull Requests
andclangd v0.1.29
.Stack trace and surrounding log
``` I[14:44:53.854] <-- reply(1) I[14:44:53.854] --> reply:textDocument/documentSymbol(9) 3439 ms I[14:44:53.855] --> reply:textDocument/hover(10) 1997 ms, error: Task was cancelled. I[14:44:53.855] --> reply:textDocument/hover(11) 465 ms, error: Task was cancelled. I[14:44:53.855] --> textDocument/clangd.fileStatus [Error - 2:44:53 PM] Request textDocument/hover failed. [object Object] [Error - 2:44:53 PM] Request textDocument/hover failed. [object Object] #0 0x000000000053b893 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/llvm/bin/clangd+0x53b893) #1 0x000000000053991c llvm::sys::RunSignalHandlers() (/opt/llvm/bin/clangd+0x53991c) #2 0x000000000053bbff SignalHandler(int) Signals.cpp:0:0 #3 0x00007905fa3f0420 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14420) #4 0x00000000006d0a4f clang::StmtVisitorBase::Visit(clang::Stmt const*) ExprConstant.cpp:0:0 #5 0x0000000000687e44 EvaluateInPlace(clang::APValue&, (anonymous namespace)::EvalInfo&, (anonymous namespace)::LValue const&, clang::Expr const*, bool) ExprConstant.cpp:0:0 #6 0x0000000000687ab4 clang::Expr::EvaluateAsConstantExpr(clang::Expr::EvalResult&, clang::ASTContext const&, clang::Expr::ConstantExprKind) const (/opt/llvm/bin/clangd+0x687ab4) #7 0x0000000001aa0a90 clang::Sema::PopExpressionEvaluationContext() (/opt/llvm/bin/clangd+0x1aa0a90) #8 0x000000000196a9c8 clang::Sema::ActOnFinishFunctionBody(clang::Decl*, clang::Stmt*, bool) (/opt/llvm/bin/clangd+0x196a9c8) #9 0x00000000016b4c1d clang::Parser::ParseFunctionStatementBody(clang::Decl*, clang::Parser::ParseScope&) (/opt/llvm/bin/clangd+0x16b4c1d) #10 0x0000000001613baf clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&, clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAttrList*) (/opt/llvm/bin/clangd+0x1613baf) #11 0x000000000162f519 clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, clang::DeclaratorContext, clang::SourceLocation*, clang::Parser::ForRangeInit*) (/opt/llvm/bin/clangd+0x162f519) #12 0x0000000001612b0b clang::Parser::ParseDeclOrFunctionDefInternal(clang::ParsedAttributesWithRange&, clang::ParsingDeclSpec&, clang::AccessSpecifier) (/opt/llvm/bin/clangd+0x1612b0b) #13 0x00000000016125dc clang::Parser::ParseDeclarationOrFunctionDefinition(clang::ParsedAttributesWithRange&, clang::ParsingDeclSpec*, clang::AccessSpecifier) (/opt/llvm/bin/clangd+0x16125dc) #14 0x0000000001611afe clang::Parser::ParseExternalDeclaration(clang::ParsedAttributesWithRange&, clang::ParsingDeclSpec*) (/opt/llvm/bin/clangd+0x1611afe) #15 0x00000000016419a3 clang::Parser::ParseInnerNamespace(llvm::SmallVector const&, unsigned int, clang::SourceLocation&, clang::ParsedAttributes&, clang::BalancedDelimiterTracker&) (/opt/llvm/bin/clangd+0x16419a3) #16 0x0000000001641582 clang::Parser::ParseNamespace(clang::DeclaratorContext, clang::SourceLocation&, clang::SourceLocation) (/opt/llvm/bin/clangd+0x1641582) #17 0x00000000016294a9 clang::Parser::ParseDeclaration(clang::DeclaratorContext, clang::SourceLocation&, clang::ParsedAttributesWithRange&, clang::SourceLocation*) (/opt/llvm/bin/clangd+0x16294a9) #18 0x00000000016112c3 clang::Parser::ParseExternalDeclaration(clang::ParsedAttributesWithRange&, clang::ParsingDeclSpec*) (/opt/llvm/bin/clangd+0x16112c3) #19 0x00000000016419a3 clang::Parser::ParseInnerNamespace(llvm::SmallVector const&, unsigned int, clang::SourceLocation&, clang::ParsedAttributes&, clang::BalancedDelimiterTracker&) (/opt/llvm/bin/clangd+0x16419a3) #20 0x0000000001641582 clang::Parser::ParseNamespace(clang::DeclaratorContext, clang::SourceLocation&, clang::SourceLocation) (/opt/llvm/bin/clangd+0x1641582) #21 0x00000000016294a9 clang::Parser::ParseDeclaration(clang::DeclaratorContext, clang::SourceLocation&, clang::ParsedAttributesWithRange&, clang::SourceLocation*) (/opt/llvm/bin/clangd+0x16294a9) #22 0x00000000016112c3 clang::Parser::ParseExternalDeclaration(clang::ParsedAttributesWithRange&, clang::ParsingDeclSpec*) (/opt/llvm/bin/clangd+0x16112c3) #23 0x00000000016419a3 clang::Parser::ParseInnerNamespace(llvm::SmallVector const&, unsigned int, clang::SourceLocation&, clang::ParsedAttributes&, clang::BalancedDelimiterTracker&) (/opt/llvm/bin/clangd+0x16419a3) #24 0x0000000001641582 clang::Parser::ParseNamespace(clang::DeclaratorContext, clang::SourceLocation&, clang::SourceLocation) (/opt/llvm/bin/clangd+0x1641582) #25 0x00000000016294a9 clang::Parser::ParseDeclaration(clang::DeclaratorContext, clang::SourceLocation&, clang::ParsedAttributesWithRange&, clang::SourceLocation*) (/opt/llvm/bin/clangd+0x16294a9) #26 0x00000000016112c3 clang::Parser::ParseExternalDeclaration(clang::ParsedAttributesWithRange&, clang::ParsingDeclSpec*) (/opt/llvm/bin/clangd+0x16112c3) #27 0x00000000016419a3 clang::Parser::ParseInnerNamespace(llvm::SmallVector const&, unsigned int, clang::SourceLocation&, clang::ParsedAttributes&, clang::BalancedDelimiterTracker&) (/opt/llvm/bin/clangd+0x16419a3) #28 0x0000000001641582 clang::Parser::ParseNamespace(clang::DeclaratorContext, clang::SourceLocation&, clang::SourceLocation) (/opt/llvm/bin/clangd+0x1641582) #29 0x00000000016294a9 clang::Parser::ParseDeclaration(clang::DeclaratorContext, clang::SourceLocation&, clang::ParsedAttributesWithRange&, clang::SourceLocation*) (/opt/llvm/bin/clangd+0x16294a9) #30 0x00000000016112c3 clang::Parser::ParseExternalDeclaration(clang::ParsedAttributesWithRange&, clang::ParsingDeclSpec*) (/opt/llvm/bin/clangd+0x16112c3) #31 0x0000000001610218 clang::Parser::ParseTopLevelDecl(clang::OpaquePtr&, bool) (/opt/llvm/bin/clangd+0x1610218) #32 0x000000000160fd97 clang::Parser::ParseFirstTopLevelDecl(clang::OpaquePtr&) (/opt/llvm/bin/clangd+0x160fd97) #33 0x000000000160c48c clang::ParseAST(clang::Sema&, bool, bool) (/opt/llvm/bin/clangd+0x160c48c) #34 0x000000000145b719 clang::FrontendAction::Execute() (/opt/llvm/bin/clangd+0x145b719) #35 0x0000000000c1a2b1 clang::clangd::ParsedAST::build(llvm::StringRef, clang::clangd::ParseInputs const&, std::unique_ptr >, llvm::ArrayRef, std::shared_ptr) (/opt/llvm/bin/clangd+0xc1a2b1) #36 0x0000000000c90a37 clang::clangd::(anonymous namespace)::ASTWorker::updatePreamble(std::unique_ptr >, clang::clangd::ParseInputs, std::shared_ptr, std::vector >, clang::clangd::WantDiagnostics)::$_2::operator()() TUScheduler.cpp:0:0 #37 0x0000000000c8c56a clang::clangd::(anonymous namespace)::ASTWorker::runTask(llvm::StringRef, llvm::function_ref) TUScheduler.cpp:0:0 #38 0x0000000000c8bfde void llvm::detail::UniqueFunctionBase::CallImpl(void*) TUScheduler.cpp:0:0 #39 0x0000000000e17ef2 void* llvm::thread::ThreadProxy)::$_1> >(void*) Threading.cpp:0:0 #40 0x00007905fa3e4609 start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x8609) #41 0x00007905f9f15353 __clone (/lib/x86_64-linux-gnu/libc.so.6+0x11f353) Signalled during AST worker action: Build AST Filename: source/extensions/filters/http/cache/cache_filter.cc ```The text was updated successfully, but these errors were encountered: