This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Make sure ReplyCallbacks are destroyed before RequestCancelersMutex
ClosedPublic

Authored by kadircet on Oct 9 2019, 6:21 AM.

Details

Summary

After rL374163, replycallbacks might have a cancellable context, which
will try to access RequestCancellers on destruction. Example failure:

libc++abi.dylib: terminating with uncaught exception of type std::__1::system_error: mutex lock failed: Invalid argument
src/llvm-project/out/gn/obj/clang-tools-extra/clangd/test/Output/code-action-request.test.script: line 1: 90699 Abort trap: 6           clangd -log=verbose -lit-test < src/llvm-project/clang-tools-extra/clangd/test/code-action-request.test
     90705 Done                    | FileCheck -strict-whitespace src/llvm-project/clang-tools-extra/clangd/test/code-action-request.test

Diff Detail

Event Timeline

kadircet created this revision.Oct 9 2019, 6:21 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 9 2019, 6:21 AM
ilya-biryukov added inline comments.Oct 9 2019, 6:28 AM
clang-tools-extra/clangd/ClangdLSPServer.cpp
429

Please document that this has to go after RequestCancelersMutex

thakis added a comment.Oct 9 2019, 6:32 AM

Maybe inline the error from the bot. Right now stuff on 45.33.8.238 is very in flux.

kadircet updated this revision to Diff 224045.Oct 9 2019, 6:54 AM
kadircet marked an inline comment as done.
  • Address comments
sammccall accepted this revision.Oct 9 2019, 6:55 AM
This revision is now accepted and ready to land.Oct 9 2019, 6:55 AM
kadircet edited the summary of this revision. (Show Details)Oct 9 2019, 7:00 AM
This revision was automatically updated to reflect the committed changes.