microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
160.75k stars 28.17k forks source link

Pylance crash #214256

Open dokutoshi opened 1 month ago

dokutoshi commented 1 month ago

Does this issue occur when all extensions are disabled?: Yes/No

Version: 1.90.0-insider Commit: f36826b4c1737fcc234a73ec043261ea893e6698 Date: 2024-06-03T05:25:35.675Z Electron: 29.4.0 ElectronBuildId: 9593362 Chromium: 122.0.6261.156 Node.js: 20.9.0 V8: 12.2.281.27-electron.0 OS: Darwin arm64 23.5.0 Pylance version: v2024.5.1

Steps to Reproduce:

  1. Unknown

Here is the message: <--- JS stacktrace --->

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory ----- Native stack trace -----

2024-06-04 17:22:06.247 [info] 1: 0xcbf220 node::Abort() [/home/ec2-user/.vscode-server-insiders/cli/servers/Insiders-f36826b4c1737fcc234a73ec043261ea893e6698/server/node]

2024-06-04 17:22:06.247 [info] 2: 0xb994b4 [/home/ec2-user/.vscode-server-insiders/cli/servers/Insiders-f36826b4c1737fcc234a73ec043261ea893e6698/server/node]

2024-06-04 17:22:06.248 [info] 3: 0xed7560 v8::Utils::ReportOOMFailure(v8::internal::Isolate, char const, v8::OOMDetails const&) [/home/ec2-user/.vscode-server-insiders/cli/servers/Insiders-f36826b4c1737fcc234a73ec043261ea893e6698/server/node]

2024-06-04 17:22:06.249 [info] 4: 0xed7916 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate, char const, v8::OOMDetails const&) [/home/ec2-user/.vscode-server-insiders/cli/servers/Insiders-f36826b4c1737fcc234a73ec043261ea893e6698/server/node]

2024-06-04 17:22:06.250 [info] 5: 0x10ccb85 [/home/ec2-user/.vscode-server-insiders/cli/servers/Insiders-f36826b4c1737fcc234a73ec043261ea893e6698/server/node]

2024-06-04 17:22:06.251 [info] 6: 0x10e2fcd v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/home/ec2-user/.vscode-server-insiders/cli/servers/Insiders-f36826b4c1737fcc234a73ec043261ea893e6698/server/node]

2024-06-04 17:22:06.251 [info] 7: 0x10bdc89 v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/home/ec2-user/.vscode-server-insiders/cli/servers/Insiders-f36826b4c1737fcc234a73ec043261ea893e6698/server/node]

2024-06-04 17:22:06.252 [info] 8: 0x10bed47 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/home/ec2-user/.vscode-server-insiders/cli/servers/Insiders-f36826b4c1737fcc234a73ec043261ea893e6698/server/node]

2024-06-04 17:22:06.253 [info] 9: 0x109f31a v8::internal::Factory::NewFillerObject(int, v8::internal::AllocationAlignment, v8::internal::AllocationType, v8::internal::AllocationOrigin) [/home/ec2-user/.vscode-server-insiders/cli/servers/Insiders-f36826b4c1737fcc234a73ec043261ea893e6698/server/node]

2024-06-04 17:22:06.254 [info] 10: 0x14bedbf v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long, v8::internal::Isolate) [/home/ec2-user/.vscode-server-insiders/cli/servers/Insiders-f36826b4c1737fcc234a73ec043261ea893e6698/server/node] 11: 0x7fb9b6a99ef6

2024-06-04 17:22:06.812 [info] [Error - 5:22:06 PM] Server process exited with signal SIGABRT. 2024-06-04 17:25:44.957 [info] [Info - 5:25:44 PM] Connection to server got closed. Server will restart. 2024-06-04 17:25:44.957 [info] true 2024-06-04 17:25:45.557 [info] [Info - 5:25:45 PM] (19292) Pylance language server 2024.5.1 (pyright version 1.1.360, commit 4bc8428d) starting 2024-06-04 17:25:45.558 [info] [Info - 5:25:45 PM] (19292) Server root directory: file:///home/ec2-user/.vscode-server-insiders/extensions/ms-python.vscode-pylance-2024.5.1/dist 2024-06-04 17:25:45.574 [info] [Info - 5:25:45 PM] (19292) Starting service instance "ec2-user" 2024-06-04 17:25:45.586 [info] [Info - 5:25:45 PM] (19292) Auto-Indent enabled 2024-06-04 17:25:45.632 [info] [Info - 5:25:45 PM] (19292) Setting pythonPath for service "ec2-user": "/opt/tensorflow/bin/python" 2024-06-04 17:25:45.632 [info] [Info - 5:25:45 PM] (19292) Setting environmentName for service "ec2-user": "3.10.7 (tensorflow venv)" 2024-06-04 17:25:45.674 [info] [Info - 5:25:45 PM] (19292) Assuming Python version 3.10.7.final.0

dokutoshi commented 1 month ago

Note the VSCode Crash resulting from use of -I.

2024-06-04 18:31:35.095 [info] shell: bash 2024-06-04 18:31:35.732 [info] > /usr/bin/python -I ./.vscode-server-insiders/extensions/ms-python.python-2024.6.0/python_files/get_output_via_markers.py ./.vscode-server-insiders/extensions/ms-python.python-2024.6.0/python_files/interpreterInfo.py 2024-06-04 18:31:35.802 [info] > ./miniforge-pypy3/envs/tf_2.15/bin/python -I ./.vscode-server-insiders/extensions/ms-python.python-2024.6.0/python_files/get_output_via_markers.py ./.vscode-server-insiders/extensions/ms-python.python-2024.6.0/python_files/interpreterInfo.py

2024-06-04 18:31:35.816 [warning] [Error: Command failed: /usr/bin/python -I /home/ec2-user/.vscode-server-insiders/extensions/ms-python.python-2024.6.0/python_files/get_output_via_markers.py /home/ec2-user/.vscode-server-insiders/extensions/ms-python.python-2024.6.0/python_files/interpreterInfo.py Unknown option: -I usage: /usr/bin/python [option] ... [-c cmd | -m mod | file | -] [arg] ... Try `python -h' for more information.

at ChildProcess.exithandler (node:child_process:423:12)
at ChildProcess.emit (node:events:530:35)
at maybeClose (node:internal/child_process:1105:16)
at Socket.<anonymous> (node:internal/child_process:457:11)
at Socket.emit (node:events:518:28)
at Pipe.<anonymous> (node:net:337:12)] {

code: 2, killed: false, signal: null, cmd: '/usr/bin/python -I /home/ec2-user/.vscode-server-insiders/extensions/ms-python.python-2024.6.0/python_files/get_output_via_markers.py /home/ec2-user/.vscode-server-insiders/extensions/ms-python.python-2024.6.0/python_files/interpreterInfo.py' } 2024-06-04 18:31:35.816 [error] Support for Python 2.7 has been dropped by the Python extension so certain features may not work, upgrade to using Python 3. 2024-06-04 18:31:35.843 [info] > /usr/bin/python ./.vscode-server-insiders/extensions/ms-python.python-2024.6.0/python_files/get_output_via_markers.py ./.vscode-server-insiders/extensions/ms-python.python-2024.6.0/python_files/interpreterInfo.py 2024-06-04 18:31:36.115 [info] > ./miniforge-pypy3/bin/python -I ./.vscode-server-insiders/extensions/ms-python.python-2024.6.0/python_files/get_output_via_markers.py ./.vscode-server-insiders/extensions/ms-python.python-2024.6.0/python_files/interpreterInfo.py 2024-06-04 18:31:36.279 [info] > /usr/local/bin/python -I ./.vscode-server-insiders/extensions/ms-python.python-2024.6.0/python_files/get_output_via_markers.py ./.vscode-server-insiders/extensions/ms-python.python-2024.6.0/python_files/interpreterInfo.py 2024-06-04 18:31:36.554 [info] Starting Pylance language server.

VSCodeTriageBot commented 1 month ago

Thanks for creating this issue! We figured it's missing some basic information or in some other way doesn't follow our issue reporting guidelines. Please take the time to review these and update the issue.

Happy Coding!

karthiknadig commented 1 month ago

@dokutoshi This is not a crash, and it has no side effect for pylance. This is python extension probing various python on your machine. It sees you have something on PATH and tries to launch it with a script that gives us additional info about it.

2024-06-04 18:31:35.816 [warning] [Error: Command failed: /usr/bin/python -I /home/ec2-user/.vscode-server-insiders/extensions/ms-python.python-2024.6.0/python_files/get_output_via_markers.py /home/ec2-user/.vscode-server-insiders/extensions/ms-python.python-2024.6.0/python_files/interpreterInfo.py
Unknown option: -I
usage: /usr/bin/python [option] ... [-c cmd | -m mod | file | -] [arg] ...
Try `python -h' for more information.

    at ChildProcess.exithandler (node:child_process:423:12)
    at ChildProcess.emit (node:events:530:35)
    at maybeClose (node:internal/child_process:1105:16)
    at Socket.<anonymous> (node:internal/child_process:457:11)
    at Socket.emit (node:events:518:28)
    at Pipe.<anonymous> (node:net:337:12)] {
  code: 2,
  killed: false,
  signal: null,
  cmd: '/usr/bin/python -I /home/ec2-user/.vscode-server-insiders/extensions/ms-python.python-2024.6.0/python_files/get_output_via_markers.py /home/ec2-user/.vscode-server-insiders/extensions/ms-python.python-2024.6.0/python_files/interpreterInfo.py'
}

Is there something preventing you from working on things? Are you spefically trying to use /usr/bin/python? /usr/bin/python seems to look like python 2.7 which is no longer supported.

dokutoshi commented 1 month ago

I don’t use python 2.7.

Perhaps you can explain the role of python or condos environments. If the notebook or python script is assigned to a 3.11 or 3.12 environment, why is vscode searching for python environment on the ec2?

I don’t control what was installed by AWS; hence the creation and selection of conda environments.

Best,

Leo

Sent from my iPhone

On Jun 5, 2024, at 18:17, Karthik Nadig @.***> wrote:



@dokutoshihttps://github.com/dokutoshi This is not a crash, and it has no side effect for pylance. This is python extension probing various python on your machine. It sees you have something on PATH and tries to launch it with a script that gives us additional info about it.

2024-06-04 18:31:35.816 [warning] [Error: Command failed: /usr/bin/python -I /home/ec2-user/.vscode-server-insiders/extensions/ms-python.python-2024.6.0/python_files/get_output_via_markers.py /home/ec2-user/.vscode-server-insiders/extensions/ms-python.python-2024.6.0/python_files/interpreterInfo.py Unknown option: -I usage: /usr/bin/python [option] ... [-c cmd | -m mod | file | -] [arg] ... Try `python -h' for more information.

    at ChildProcess.exithandler (node:child_process:423:12)
    at ChildProcess.emit (node:events:530:35)
    at maybeClose (node:internal/child_process:1105:16)
    at Socket.<anonymous> (node:internal/child_process:457:11)
    at Socket.emit (node:events:518:28)
    at Pipe.<anonymous> (node:net:337:12)] {

code: 2, killed: false, signal: null, cmd: '/usr/bin/python -I /home/ec2-user/.vscode-server-insiders/extensions/ms-python.python-2024.6.0/python_files/get_output_via_markers.py /home/ec2-user/.vscode-server-insiders/extensions/ms-python.python-2024.6.0/python_files/interpreterInfo.py' }

Is there something preventing you from working on things? Are you spefically trying to use /usr/bin/python? /usr/bin/python seems to look like python 2.7 which is no longer supported.

— Reply to this email directly, view it on GitHubhttps://github.com/microsoft/vscode/issues/214256#issuecomment-2151049733, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACNWBJMULW57X3QENXEF3YTZF6E6TAVCNFSM6AAAAABIY6WZLSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJRGA2DSNZTGM. You are receiving this because you were mentioned.Message ID: @.***>

This email and any attachments may contain private, confidential and privileged material for the sole use of the intended recipient. Any review, reliance or distribution by others or forwarding without express permission is strictly prohibited. If you are not the intended recipient, please notify the sender immediately and delete this email and any attachments afterwards.