Giter Club home page Giter Club logo

Comments (19)

sean-mcmanus avatar sean-mcmanus commented on September 27, 2024 3

@rokostrup I hit a deadlock with 1.19.8 on Linux -- it was after doing a go to definition after an IntelliSense update was triggered on a file. Deadlock is in cpptools-srv (killing the process caused cpptools to continue functioning).

from vscode-cpptools.

sean-mcmanus avatar sean-mcmanus commented on September 27, 2024 3

@rokostrup We plan to as soon as we find a fix. We're still investigating.

from vscode-cpptools.

sean-mcmanus avatar sean-mcmanus commented on September 27, 2024 3

@JohnW71 1.20.0 won't (or isn't expected to) have the fix, but it should enable attaching a debugger to get a call stack so we can determine where it's deadlocked.

from vscode-cpptools.

sean-mcmanus avatar sean-mcmanus commented on September 27, 2024 2

Yes, this was already reported in #12051 and we've reproed and fixed the issue in our pending 1.19.8 release which we're planning to release later today.

from vscode-cpptools.

rokostrup avatar rokostrup commented on September 27, 2024 1

@sean-mcmanus thanks for letting me (us) know. Is this something that you plan to fix in the next update?

from vscode-cpptools.

sean-mcmanus avatar sean-mcmanus commented on September 27, 2024 1

@rokostrup This might be fixed with 1.19.9 if it was related to the crashes we fixed -- we haven't reproed the deadlock with that version yet. If it still repros, we should be able to get a call stack with 1.20.0 once we fix #12091 .

from vscode-cpptools.

JohnW71 avatar JohnW71 commented on September 27, 2024 1

@JohnW71 Windows x64 symbols for cpptools.exe/cpptools-srv.exe have just been published for 1.19.9, so if you repro bug again and attach a debugger with a launch.json

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "(Windows) Attach",
            "type": "cppvsdbg",
            "request": "attach",
            "symbolSearchPath": "https://msdl.microsoft.com/download/symbols"
        }

    ]
}

then you could get the call stacks of the threads that appear to be doing work, but are deadlocked. I would try cpptools-srv.exe first. You can ignore the threads that appear to be idle. There probably should only be 2-3 threads that are not idle with 2 of them being deadlocked and maybe some other additional threads stuck as well.

VS has the ability to copy all the call stacks at once, but VS Code seems to only allow copying one thread's call stack at a time.

(Linux call stacks still won't be available till 1.20.0).

Many thanks for the info, I'll set this up tonight and hope to catch something useful.

from vscode-cpptools.

rokostrup avatar rokostrup commented on September 27, 2024

@sean-mcmanus , just tried out the new release (v1.19.8) and it was running good for a while (2 hours), but just had the issue again -> IntelliSense seems to be hanging forever.

from vscode-cpptools.

sean-mcmanus avatar sean-mcmanus commented on September 27, 2024

@rokostrup We could use more info. Is any CPU being used by cpptools or cpptool-srv? Can you set C_Cpp.loggingLevel to "Debug" and provide the C/C++ logging starting with the last time an IntelliSense message was invoked but no response was sent? e.g. hover, documentHighlight, etc. (but not documentSymbol or willSaveWaitUntil, which aren't blocked by IntelliSense processing). The callstacks of cpptools and/or cpptool-srv could help, but we don't currently know how you would be able to provide them due the binaries being built with musl on Linux unless you reproed the issue on another OS (#12091).

Also, does using kill -9 <pid> with the pid of the cpptools-srv process that is stuck cause the extension to start working or is it still stuck (having only 1 file open would make it easier to identify the correct pid). That would help us determine which process is deadlocked.

from vscode-cpptools.

sean-mcmanus avatar sean-mcmanus commented on September 27, 2024

@rokostrup We're not aware of any bugs with excludes not working with configuration providers. It would be better to track that with a separate issue with more repro details.

from vscode-cpptools.

rokostrup avatar rokostrup commented on September 27, 2024

@sean-mcmanus , once it happens again I'll get you some more info and try out the above.
Can I set the logging level after I see the error, or should it be on before?

from vscode-cpptools.

sean-mcmanus avatar sean-mcmanus commented on September 27, 2024

@rokostrup You would need to set the loggingLevel to "Debug" beforehand -- I don't believe the logging should slow down the extension.

from vscode-cpptools.

rokostrup avatar rokostrup commented on September 27, 2024

@sean-mcmanus , Thanks. I'll enable it and let you know. It seems to have been running stable for at least 8 hours now, so might be a fluke. I'll close this issue for now and re-open if I see the issue again.

from vscode-cpptools.

rokostrup avatar rokostrup commented on September 27, 2024

Sounds good. And thanks for a superb tool!

from vscode-cpptools.

JohnW71 avatar JohnW71 commented on September 27, 2024

I'm still having the issue on 1.19.9, though it was fine for several hours. VS Code 1.87.2 Windows 10. Hopefully 1.20 holds the cure :)

from vscode-cpptools.

sean-mcmanus avatar sean-mcmanus commented on September 27, 2024

@JohnW71 Also, we're not sure if the issue you're hitting is the same issue the original poster and I hit on Linux. If you set C_Cpp.loggingLevel to "Debug" and see that IntelliSense-based messages like referenceHighlight/hover stop being invoked and killing the IntelliSense cpptools-srv processes fixes the issue, then it's the same issue (deadlock in cpptools-srv). Otherwise, it would be a different issue. It's possible the debug logging leading up to the issue could help without having a call stack of cpptools.exe/cpptools-srv.exe, which currently don't have pdbs available publicly unless you're a Microsoft internal.

from vscode-cpptools.

sean-mcmanus avatar sean-mcmanus commented on September 27, 2024

@JohnW71 Windows x64 symbols for cpptools.exe/cpptools-srv.exe have just been published for 1.19.9, so if you repro bug again and attach a debugger with a launch.json

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "(Windows) Attach",
            "type": "cppvsdbg",
            "request": "attach",
            "symbolSearchPath": "https://msdl.microsoft.com/download/symbols"
        }

    ]
}

then you could get the call stacks of the threads that appear to be doing work, but are deadlocked. I would try cpptools-srv.exe first. You can ignore the threads that appear to be idle. There probably should only be 2-3 threads that are not idle with 2 of them being deadlocked and maybe some other additional threads stuck as well.

VS has the ability to copy all the call stacks at once, but VS Code seems to only allow copying one thread's call stack at a time.

(Linux call stacks still won't be available till 1.20.0).

from vscode-cpptools.

github-actions avatar github-actions commented on September 27, 2024

Hey @sean-mcmanus, this issue might need further attention.

@rokostrup, you can help us out by closing this issue if the problem no longer exists, or adding more information.

from vscode-cpptools.

github-actions avatar github-actions commented on September 27, 2024

This issue has been closed because it needs more information and has not had recent activity.

from vscode-cpptools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.