-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
IntelliSense process crash detected with co_await. #8678
Comments
Do you have a code sample? It looks like it's some code using await/coroutines. |
i.e. can you provide more repro details? Is it from https://github.com/facebook/fbthrift ? What branch? Any other info on how to get a minimum repro would be helpful. |
Thanks for responding. I'm still new to fbthrift coro rpc calls. The crash will happen when opening a generated .h file by fbthrift compiler, and the code still has some compilation error. I also played with folly (a dependency of fbthrift) coroutines, everything is fine. Maybe this issue is associated with fbthrift. I'm prepare a repo for reproducing this issue. Maybe I can provide a cmake project in a few days (trying to make a minimal example after returning from work). |
@sean-mcmanus hi, i've made a repo with some detailed steps to reproduce this bug. plz let me know if there is anything else you need for analyzing. here's another stack trace, it should be the same as before
|
I get a build error: fbthrift-playground/external/fbthrift/thrift/lib/cpp/ContextStack.cpp:229:5: error: no matching function for call to 'operator delete' . Do you know how to resolve that? As an alternative, can you generate a preprocessed file using a command that matches how the repro file is compiled by IntelliSense but with and verify that it still repros the crash? UPDATE: I previously mentioned using -dM but it actually needs to be -dD. |
What compiler did you used? I saw this error when i'm using clang-11. GCC 10.2 on Debian 11 should be ok. |
Looks like it's using clang 10, gcc 10.3 libraries. Should I try switching to gcc or clang 11? |
gcc 10.3 should be ok. I also generated two files using the commands above. It seems not to be a cpp files and recognized by intellisense. I also tried adding
Anyway the generated files are a little big (more than 40w lines), and I uploaded here |
Okay, I got it to build with gcc, but I don't have a build/playground folder -- is there a step missing? It seems like you generated the precompiled file correctly, but it's giant sized so the IntelliSense process is really slow to process it, so I'm not sure if it's reproing the bug yet. (Although the -D-D and -D-D in your logging is supposed to be "just -E and -dD" without the -D). The "not a cpp file" is probably due to the extension (it should be named something like test.out.cpp and my initial response incorrectly had a space after the 1st dot). I'll follow up on Monday... |
from #!/bin/bash
set -eux
CWD=$(dirname $0)/..
cd $CWD
if [ $1 == deps ]
then
echo building deps...
source ./scripts/build-deps.sh
fi
cd build
cmake .. -GNinja
ninja If all depencies are successfully built you can Anyway happy weekends :) |
The preprocessed file isn't reproing the crash -- I'm not seeing any co_await calls in the file so it appears to be generated incorrectly...maybe you need -fcoroutines in the command line? Also, FOLLY_HAS_COROUTINES is 0, which doesn't match your previous "define". I get this error still when running cmake. Do you know what do about that?
|
Hi, sry for the late response. I've update a new method in the previous repo using docker and remote-containers to build the whole project, should be useful if there's some difference between dev environments. (I'm guessing you are running Ubuntu?). The crash should be reproduced in this container, with the same stack trace. |
Hi @Weaverzhu . Using the repo you provided, I'm able to reproduce the crash in The issue indeed appears to be related to coroutines, given the stack of the crash. Our next step will be to try to narrow it down further, to reduce it to something more manageable for our IntelliSense developers to investigate. |
I have the same issue. I used this library:https://github.com/seqan/seqan When I include this header, send crashes:
The following is the call stack
I'm a beginner, and I can't help you with debugging such a complex project. I hope the information I provide can help you locate the problem. |
Hi @Weaverzhu . I had been able to repro this, but revisiting this recently, I can't seem to get your example repo to configure/build. Are you still able to repro this using the repo you provided? |
Sorry for the late reply.
Yes, it cannot build indeed. The code would meet a build failure, but the idl code generated (part of the building process) is still able to trigger the coredump. At that time I want to find out the reason of the build failure, the intellisense might help to check if there was any syntax incompatibility. Later I found it needs Anyway since apt repo supports prebuilt only in |
@Colengms Did you want to close this or attempt to repro the crash with the scenario where it doesn't build? |
This issue has been closed because it needs more information and has not had recent activity. |
自动回复:我已经收到您的邮件,谢谢。
|
Bug type: Language Service
Describe the bug
Steps to reproduce
analyze fbthrift coroutine code with intellisense
Code sample and logs
Code sample
Configurations in
c_cpp_properties.json
C/C++: Log Diagnostics
from the VS Code command paletteScreenshots
Additional context
The text was updated successfully, but these errors were encountered: