microsoft / vscode-mypy

Linting support for Python using the mypy linter.
https://marketplace.visualstudio.com/items?itemName=ms-python.mypy-type-checker
MIT License
119 stars 26 forks source link

Extension spawns orphan python.exe processes that aren't killed when VSCode/extension_host are shutdown #291

Closed Kein closed 8 months ago

Kein commented 8 months ago

At a glance:

image

In detail:

Env command line reports this:

c:\Programs\Python390\python.exe -m mypy.dmypy --status-file e:\Temp\.vscode.dmypy_status\status-72e28ba3-939e-4538-8ce8-0f67c32a71f7.json daemon --options-data=\"gASVGgoAAAAAAAB9lCiMCmJ1aWxkX3R5cGWUSwCMDnB5dGhvbl92ZXJzaW9ulEsDSwmGlIwRcHl0aG9uX2V4ZWN1dGFibGWUjCBjOlxQcm9ncmFtc1xQeXRob24zOTBccHl0aG9uLmV4ZZSMCHBsYXRmb3JtlIwFd2luMzKUjBRjdXN0b21fdHlwaW5nX21vZHVsZZROjBNjdXN0b21fdHlwZXNoZWRfZGlylE6MF2Fic19jdXN0b21fdHlwZXNoZWRfZGlylE6MCW15cHlfcGF0aJRdlIwLcmVwb3J0X2RpcnOUfZSMGG5vX3NpbGVuY2Vfc2l0ZV9wYWNrYWdlc5SJjBBub19zaXRlX3BhY2thZ2VzlImMFmlnbm9yZV9taXNzaW5nX2ltcG9ydHOUiYwhaWdub3JlX21pc3NpbmdfaW1wb3J0c19wZXJfbW9kdWxllImMDmZvbGxvd19pbXBvcnRzlIwGbm9ybWFslIwYZm9sbG93X2ltcG9ydHNfZm9yX3N0dWJzlImMEm5hbWVzcGFjZV9wYWNrYWdlc5SIjBZleHBsaWNpdF9wYWNrYWdlX2Jhc2VzlImMB2V4Y2x1ZGWUXZSMFWRpc2FsbG93X2FueV9nZW5lcmljc5SJjBdkaXNhbGxvd19hbnlfdW5pbXBvcnRlZJSJjBFkaXNhbGxvd19hbnlfZXhwcpSJjBZkaXNhbGxvd19hbnlfZGVjb3JhdGVklImMFWRpc2FsbG93X2FueV9leHBsaWNpdJSJjBZkaXNhbGxvd191bnR5cGVkX2Nhb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YXN0X2V4aXSUiIwSZmFzdF9tb2R1bGVfbG9va3VwlImMEmFsbG93X2VtcHR5X2JvZGllc5SJjBB0cmFuc2Zvcm1fc291cmNllE6MEnNob3dfYWJzb2x1dGVfcGF0aJSIjA1pbnN0YWxsX3R5cGVzlImMD25vbl9pbnRlcmFjdGl2ZZSJjBVtYW55X2Vycm9yc190aHJlc2hvbGSUSv////+MEm5ld190eXBlX2luZmVyZW5jZZSJjBlkaXNhYmxlX3JlY3Vyc2l2ZV9hbGlhc2VzlImMGGVuYWJsZV9yZWN1cnNpdmVfYWxpYXNlc5SJjA9leHBvcnRfcmVmX2luZm+UiYwbZGlzYWJsZV9ieXRlYXJyYXlfcHJvbW90aW9ulImMHGRpc2FibGVfbWVtb3J5dmlld19wcm9tb3Rpb26UiYwYZm9yY2VfdXBwZXJjYXNlX2J1aWx0aW5zlImMEmZvcmNlX3VuaW9uX3N5bnRheJSJdS4=\"

The issue:

Upon closing VSCode these processes are orphaned forever and wont quit. Opening and closing VSCode 10 times repetitively spawns 20 zombie processes

Config/Setup:

VSCode 1.86 Mypy Type Checker: v2023.6.0

"mypy-type-checker.interpreter": ["c:\\Programs\\Python390\\python.exe"],
"mypy-type-checker.preferDaemon": true,
"mypy-type-checker.reportingScope": "workspace",
"mypy-type-checker.importStrategy": "useBundled",
    "mypy-type-checker.severity": {
        "error": "Error",
        "note": "Information"
    },

P.S. Switching "mypy-type-checker.preferDaemon": true, makes no difference to the issue

karthiknadig commented 8 months ago

"mypy-type-checker.preferDaemon": true is what causes daemon to be used (i.e, dmypy is used instead of mypy). Turn this off (or switching to plain mypy) for now using "mypy-type-checker.preferDaemon": false.

duplicate of https://github.com/microsoft/vscode-mypy/issues/236

Kein commented 8 months ago

"mypy-type-checker.preferDaemon": true is what causes daemon to be used

Yes, it causes the daemon to be used, but it is not the cause of this issue. The reason I even set daemon to True is because I saw the same problem in default configuration. very often closing VSCode would leave 2-3 orphaned python processes. So I went deep into the settings nd tried to change the things, see if anything affects it. It didn't.

I no longer have the extension in question installed, I swapped it for a different mypy one, but that is the gist of it and why I even reported it in a first place.