<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Greetings,
<br>
<br>
I'm attempting to use a libclang-based language server in vscode
for cross compiling projects. This language server is working
multithreaded and I'm experiencing deadlocks which seem to come
frome a race condition, e.g. when I use a debug build of libclang
they happen less frequently presumably because the ratio of time
spent parsing sources and time spent starting/stopping threads
changes and makes it less likely to hit the condition.
<br>
<br>
Whenever I do hit the deadlock, I observed there are two threads
around that are related to clang querying a visual studio
installation for platform specifics
("libclang.dll!findVCToolChainViaSetupConfig").
<br>
Here is a dump of all the stack traces in such a situation: <a
class="moz-txt-link-freetext" href="https://www.paste.org/94037">https://www.paste.org/94037</a>
<br>
<br>
Now my question is two-fold:
<br>
- Since I am cross compiling with a gcc, I don't really need clang
to query microsoft platform stuff. If there was a way to suppress
these queries, my hope is that the deadlocks disappear. Is there a
way to suppress this?
<br>
- Are you aware of ways for me to get more detailed information on
the deadlock situation with the VS.community debugger? I could not
easily find information on which locks the OS exactly tried to
get, only that it tried to get <b class="moz-txt-star"><span
class="moz-txt-tag">*</span>some<span class="moz-txt-tag">*</span></b>
lock by the calls visible in the stack traces. Is there something
built-in and readily available to debug such situations that I
missed?
<br>
<br>
Any help sorting this out is highly appreciated.
<br>
<br>
Kind regards
<br>
Michael
<br>
</p>
</body>
</html>