Skip to content
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

Pylance keeps crashing #6235

Closed
wadelamb opened this issue Aug 6, 2024 · 7 comments
Closed

Pylance keeps crashing #6235

wadelamb opened this issue Aug 6, 2024 · 7 comments
Assignees
Labels
duplicate This issue or pull request already exists needs repro Issue has not been reproduced yet waiting for user response Requires more information from user

Comments

@wadelamb
Copy link

wadelamb commented Aug 6, 2024

Type: Bug

Pylance keeps crashing

Extension version: 2024.7.1
VS Code version: Code 1.91.1 (f1e16e1e6214d7c44d078b1f0607b2388f29d729, 2024-07-09T22:06:49.809Z)
OS version: Windows_NT x64 10.0.22631
Modes:
Remote OS version: Linux x64 5.10.16.3-microsoft-standard-WSL2
Remote OS version: Linux x64 5.4.0-190-generic

System Info
Item Value
CPUs Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz (12 x 2592)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) undefined
Memory (System) 15.77GB (3.37GB free)
Process Argv --crash-reporter-id 548ace5e-f44d-40e5-a9e8-651ce714e892
Screen Reader no
VM 0%
Item Value
Remote WSL: Ubuntu
OS Linux x64 5.10.16.3-microsoft-standard-WSL2
CPUs Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz (12 x 0)
Memory (System) 7.65GB (6.50GB free)
VM 0%
Item Value
Remote SSH: WXI_Server
OS Linux x64 5.4.0-190-generic
CPUs Intel(R) Xeon(R) E-2224G CPU @ 3.50GHz (4 x 4449)
Memory (System) 7.59GB (0.93GB free)
VM 0%
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscorecescf:30445987
vscod805:30301674
binariesv615:30325510
vsaa593cf:30376535
py29gd2263:31024239
vscaat:30438848
c4g48928:30535728
azure-dev_surveyone:30548225
962ge761:30959799
pythongtdpath:30769146
welcomedialogc:30910334
pythonnoceb:30805159
asynctok:30898717
pythonregdiag2:30936856
pythonmypyd1:30879173
h48ei257:31000450
pythontbext0:30879054
accentitlementsc:30995553
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
dsvsc021:30996838
bdiig495:31013172
pythoncenvpt:31062603
a69g1124:31058053
dvdeprecation:31068756
dwnewjupyter:31046869
impr_priority:31102340
refactort:31108082
ccplti:31103428
pythonrstrctxt:31103193

@github-actions github-actions bot added the needs repro Issue has not been reproduced yet label Aug 6, 2024
@rchiodo
Copy link
Contributor

rchiodo commented Aug 6, 2024

Thanks for the issue. Can you provide the logs as described here (or code that causes the crash)?
https://github.com/microsoft/pylance-release/blob/main/TROUBLESHOOTING.md#filing-an-issue

@rchiodo rchiodo added the waiting for user response Requires more information from user label Aug 6, 2024
@Jacob-Stevens-Haas
Copy link

Jacob-Stevens-Haas commented Aug 11, 2024

@rchiodo, I'm running into this problem on the current and previous version of Pylance. I've been able to trigger it reliably. My system is slightly different than OP's:
local: windows 11 Home; Version 10.0.22621; Build 22621
Remote: Linux 6.5.0-44-generic; 22.04.1-Ubuntu

I don't think it's an out of memory error: this is a small repository with unimportant directories (/env, __pycache__/, etc) gitignored. Remote is a lambda machine with 500GB available memory. (Unless pylance runs on the local machine, not the remote?)

When I open the repository I'm fine. I run a script debug.py in a Jupyter interactive window. When I run another script, debug2.py in a Jupyter interactive window, pylance crashes.

My trace logs (abbreviated by `...` because longer than 65536 characters)
2024-08-11 15:38:54.528 [info] ,_0x223c65,_0xf287ed,_0x3e062d){const _0x604a53=_0x38ef69,_0x21902a=(0x0,_0x3395e9[_0x604a53(0xa49)])(_0x282bc0[_0x604a53(0xbf0)][_0x604a53(0x9a9)])[_0x604a53(0x183)],_0x574c4c=_0x21902a[_0x604a53(0x23d)](this['_newModuleUri']);if(_0x574c4c){for(const [_0x432864,_0x9c8a65]of _0x3e062d){this[_0x604a53(0xb55)](_0x282bc0[_0x604a53(0xbf0)],_0x432864,_0x9c8a65)&&this['_textEditTracker'][_0x604a53(0x94d)]

...

\x20в\x20области\x20вывода\x20\x5c\x22Языковой\x20сервер\x20Python\x5c\x22.\x22},\x22ProfilingCommand\x22:{\x22gotoOutputCommand\x22:\x22Перейти\x20к\x20области\x20вывода\x22,\x22profilingDataSaved\x22:

...

ります。\x22,\x22moveFileLabel\x22:\x22\x5c\x22{oldModuleName}\x5c\x22\x20のすべてのインポート参照を\x20\x5c\x22{newModuleName}\x5c\x22\x20に更新しますか?\x22,\x22moveFileMissingInfo\x22:

...

'errno','_addDocumentationPartForType','uri','visitTitle','pylance.profiling.stop','onSubtypes','sourceFileFactory','capabilities','findNodeByPosition','===','{\x22CodeAction\x22:{\x22AutoImport\x22:{\x22addAutoImport\x22:\x22\x5c\x22{importText}\x5c\x22\x20hinzufügen\x22,\x22searchImport\x22:\x22Nach\x20zusätzlichen\x20Importübereinstimmungen\x20suchen\x22},\x22ChangeSpelling\x22:{\x22changeSpellingTo\x22:\x22Schreibweise\x20in\x20\x5c\x22{word}\x5c\x22\x20ändern\x22},\x22ExtraPath\x22:{\x22addExtraPath\x22:

...

,'__ior__','isDefined','visitStringList','resourceOperations','moveFileMultipleDeclarations','removeUnusedImports','getConfigOptions','PylanceDiagnosticSink','decoratorFilter','isInteger','TimeoutTimer','StringDefinitionHoverProvider','test_*.py','python.addImport','.py','782cd91f1d1aaa09bdecc44ba7ab5078','peakRssMB','_getTypePrintOptions','workerIndex','some','_format','sendExceptionTelemetry','azure-

...

2024-08-11 15:38:54.533 [info] (followed by 60k whitespace)
2024-08-11 15:38:54.533 [info] (followed by 60k whitespace)
2024-08-11 15:38:54.534 [info] (followed by 60k whitespace)
2024-08-11 15:38:54.534 [info] (followed by 60k whitespace)
2024-08-11 15:38:54.534 [info] (followed by 60k whitespace)
2024-08-11 15:38:54.534 [info] (followed by 60k whitespace)
^
Error: Debug Failure. False expression: Duplicate path in cellFilePaths: untitled:/Interactive-1.interactive.py#W1sdW50aXRsZWQ%3D
untitled:/Interactive-1.interactive.py#W2sdW50aXRsZWQ%3D
untitled:/Interactive-1.interactive.py#X44sdW50aXRsZWQ%3D
untitled:/Interactive-1.interactive.py#X45sdW50aXRsZWQ%3D

...



2024-08-11 15:38:54.697 [info] Error: Connection is disposed.
	at de (/home/jmsh/.vscode-server/extensions/ms-python.python-2024.12.2-linux-x64/out/client/extension.js:2:1969422)
	at Object.sendRequest (/home/jmsh/.vscode-server/extensions/ms-python.python-2024.12.2-linux-x64/out/client/extension.js:2:1971726)
	at S.sendRequest (/home/jmsh/.vscode-server/extensions/ms-python.python-2024.12.2-linux-x64/out/client/extension.js:2:2012627)
	at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
	at async ce.provideDocumentSemanticTokens (/home/jmsh/.vscode-server/cli/servers/Stable-eaa41d57266683296de7d118f574d0c2652e1fc4/server/out/vs/workbench/api/node/extensionHostProcess.js:154:113697)
2024-08-11 15:38:54.697 [info] [Error - 3:38:54 p.m.] Request textDocument/semanticTokens/full failed.
2024-08-11 15:38:54.697 [info] Error: Connection is disposed.
	at de (/home/jmsh/.vscode-server/extensions/ms-python.python-2024.12.2-linux-x64/out/client/extension.js:2:1969422)
	at Object.sendRequest (/home/jmsh/.vscode-server/extensions/ms-python.python-2024.12.2-linux-x64/out/client/extension.js:2:1971726)
	at S.sendRequest (/home/jmsh/.vscode-server/extensions/ms-python.python-2024.12.2-linux-x64/out/client/extension.js:2:2012627)
	at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
	at async ce.provideDocumentSemanticTokens (/home/jmsh/.vscode-server/cli/servers/Stable-eaa41d57266683296de7d118f574d0c2652e1fc4/server/out/vs/workbench/api/node/extensionHostProcess.js:154:113697)
2024-08-11 15:38:57.788 [info] [Error - 3:38:57 p.m.] Pylance has crashed 5 times in the last 3 minutes. Pylance will not be restarted. See the output for more information.

The only thing that seems to be a clue is perhaps False expression: Duplicate path in cellFilePaths

@rchiodo
Copy link
Contributor

rchiodo commented Aug 13, 2024

Thanks @Jacob-Stevens-Haas , your issue is likely different than the original poster. Yours is this:

Error: Debug Failure. False expression: Duplicate path in cellFilePaths: untitled:/Interactive-1.interactive.py#W1sdW50aXRsZWQ%3D
untitled:/Interactive-1.interactive.py#W2sdW50aXRsZWQ%3D
untitled:/Interactive-1.interactive.py#X44sdW50aXRsZWQ%3D
untitled:/Interactive-1.interactive.py#X45sdW50aXRsZWQ%3D

Which is likely related to the regression we caught here:
#6178

@janosh
Copy link

janosh commented Sep 10, 2024

@rchiodo i'm using v2024.9.1 but still having the same issue. don't think 20247104-31-july-2024-prerelease actually solved the issue as stated here #6178 (comment)

2024-09-10 13:23:29.941 [info] Error: Debug Failure. False expression: Duplicate path in cellFilePaths: untitled:/Interactive-1.interactive.py#W1sdW50aXRsZWQ%3D
untitled:/Interactive-1.interactive.py#W2sdW50aXRsZWQ%3D
untitled:/Interactive-1.interactive.py#W3sdW50aXRsZWQ%3D
untitled:/Interactive-1.interactive.py#W4sdW50aXRsZWQ%3D
untitled:/Interactive-1.interactive.py#W5sdW50aXRsZWQ%3D
untitled:/Interactive-1.interactive.py#W6sdW50aXRsZWQ%3D
untitled:/Interactive-1.interactive.py#X10sdW50aXRsZWQ%3D



untitled:/Interactive-1.interactive.py
    at _0x3b1d9a (/Users/janosh/.vscode/extensions/ms-python.vscode-pylance-2024.9.1/dist/server.bundle.js:1:1040515)
    at _0x3c03f1 (/Users/janosh/.vscode/extensions/ms-python.vscode-pylance-2024.9.1/dist/server.bundle.js:1:1044937)
    at _0x4e65cb (/Users/janosh/.vscode/extensions/ms-python.vscode-pylance-2024.9.1/dist/server.bundle.js:1:1045372)
    at /Users/janosh/.vscode/extensions/ms-python.vscode-pylance-2024.9.1/dist/server.bundle.js:1:1001232

2024-09-10 13:23:29.971 [info] [Error - 1:23:29 PM] Server process exited with code 1.
2024-09-10 13:23:29.973 [info] [Error - 1:23:29 PM] Pylance has crashed 5 times in the last 3 minutes. Pylance will not be restarted. Please check [this link](https://aka.ms/AApf7ox) for more details.

@rchiodo
Copy link
Contributor

rchiodo commented Sep 10, 2024

Thanks, that should be this error here:
#6357

Which should be fixed this week.

@rchiodo
Copy link
Contributor

rchiodo commented Sep 10, 2024

You can workaround the issue by closing all interactive windows and restarting VS code.

@rchiodo
Copy link
Contributor

rchiodo commented Sep 11, 2024

Going to just close this as a dupe of #6357. I don't think the original poster had #6357, but since they haven't responded, closing this one.

@rchiodo rchiodo closed this as completed Sep 11, 2024
@rchiodo rchiodo added the duplicate This issue or pull request already exists label Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists needs repro Issue has not been reproduced yet waiting for user response Requires more information from user
Projects
None yet
Development

No branches or pull requests

5 participants