Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Failed to create CoreCLR, HRESULT: 0x80004005 #1595

Closed

Description

Issue Type: Bug

Open python project from code opened out of a Debian terminal running in WSL.

Extension version: 2019.9.34911
VS Code version: Code 1.38.1 (b37e54c98e1a74ba89e03073e5a3761284e3ffb0, 2019-09-11T13:35:15.005Z)
OS version: Windows_NT x64 10.0.18362
Remote OS version: Linux x64 4.4.0-18362-Microsoft

System Info
Item Value
CPUs Intel(R) Xeon(R) W-2125 CPU @ 4.00GHz (8 x 4008)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: enabled
skia_deferred_display_list: disabled_off
skia_renderer: disabled_off
surface_synchronization: enabled_on
video_decode: enabled
viz_display_compositor: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 31.66GB (18.01GB free)
Process Argv --folder-uri=vscode-remote://wsl+Debian/home/srankin/src/phoenix-labs/python-monorepo --remote=wsl+Debian
Screen Reader no
VM 0%
Item Value
Remote WSL: Debian
OS Linux x64 4.4.0-18362-Microsoft
CPUs Intel(R) Xeon(R) W-2125 CPU @ 4.00GHz (8 x 4008)
Memory (System) 31.66GB (18.01GB free)
VM 0%

Activity

  1. botscholar-scott commented on Sep 25, 2019

    @botscholar-scott
    Author

    Output window from the Python Language Server,

    Failed to create CoreCLR, HRESULT: 0x80004005
    [Info  - 2:27:30 PM] Connection to server got closed. Server will restart.
    Failed to create CoreCLR, HRESULT: 0x80004005
    [Info  - 2:27:31 PM] Connection to server got closed. Server will restart.
    Failed to create CoreCLR, HRESULT: 0x80004005
    [Info  - 2:27:31 PM] Connection to server got closed. Server will restart.
    Failed to create CoreCLR, HRESULT: 0x80004005
    [Info  - 2:27:31 PM] Connection to server got closed. Server will restart.
    Failed to create CoreCLR, HRESULT: 0x80004005
    [Error - 2:27:31 PM] Connection to server got closed. Server will not be restarted.
    
  2. botscholar-scott commented on Sep 25, 2019

    @botscholar-scott
    Author

    Output window from Python,

    User belongs to experiment group 'ShowPlayIcon - start'
    User belongs to experiment group 'AA_testing - experiment'
    > conda --version
    > python3.7 -c "import sys;print(sys.executable)"
    > python3.6 -c "import sys;print(sys.executable)"
    > python3 -c "import sys;print(sys.executable)"
    > python2 -c "import sys;print(sys.executable)"
    > python -c "import sys;print(sys.executable)"
    > ~/.local/share/virtualenvs/python-monorepo-0N0D55HM/bin/python -c "import sys;print(sys.executable)"
    > conda info --json
    > pipenv --version
    cwd: ~/src/phoenix-labs/python-monorepo
    Starting Microsoft Python language server.
    > pipenv --version
    cwd: ~/src/phoenix-labs/python-monorepo
    > pipenv --version
    cwd: ~/src/phoenix-labs/python-monorepo
    > pipenv --version
    cwd: ~/src/phoenix-labs/python-monorepo
    > pipenv --version
    cwd: ~/src/phoenix-labs/python-monorepo
    > pipenv --version
    cwd: ~/src/phoenix-labs/python-monorepo
    > pipenv --version
    cwd: ~/src/phoenix-labs/python-monorepo
    > pipenv --venv
    cwd: ~/src/phoenix-labs/python-monorepo
    > pipenv --venv
    cwd: ~/src/phoenix-labs/python-monorepo
    > pipenv --venv
    cwd: ~/src/phoenix-labs/python-monorepo
    > pipenv --venv
    cwd: ~/src/phoenix-labs/python-monorepo
    > pipenv --venv
    cwd: ~/src/phoenix-labs/python-monorepo
    > pipenv --venv
    cwd: ~/src/phoenix-labs/python-monorepo
    > pipenv --venv
    cwd: ~/src/phoenix-labs/python-monorepo
    > pipenv --version
    cwd: ~/src/phoenix-labs/python-monorepo
    > pipenv --py
    cwd: ~/src/phoenix-labs/python-monorepo
    > pipenv --py
    cwd: ~/src/phoenix-labs/python-monorepo
    > pipenv --py
    cwd: ~/src/phoenix-labs/python-monorepo
    > pipenv --py
    cwd: ~/src/phoenix-labs/python-monorepo
    > pipenv --py
    cwd: ~/src/phoenix-labs/python-monorepo
    > pipenv --py
    cwd: ~/src/phoenix-labs/python-monorepo
    > pipenv --py
    cwd: ~/src/phoenix-labs/python-monorepo
    > pipenv --venv
    cwd: ~/src/phoenix-labs/python-monorepo
    > pipenv --py
    cwd: ~/src/phoenix-labs/python-monorepo
    
  3. botscholar-scott commented on Sep 25, 2019

    @botscholar-scott
    Author

    Python info from within Debian terminal,

    (python-monorepo) PC-SRANKIN% which python
    /home/srankin/.local/share/virtualenvs/python-monorepo-0N0D55HM/bin/python
    (python-monorepo) PC-SRANKIN% where python
    /home/srankin/.local/share/virtualenvs/python-monorepo-0N0D55HM/bin/python
    /home/srankin/.pyenv/shims/python
    /home/srankin/.pyenv/versions/3.6.6/bin/python
    /home/srankin/.pyenv/shims/python
    /usr/bin/python
    (python-monorepo) PC-SRANKIN% python --version
    Python 3.6.6
    
  4. karthiknadig commented on Sep 27, 2019

    @karthiknadig
    Member

    Language server team might have a better chance at diagnosing this. It did not repro for me, I tried a couple of different projects on Debian WSL.

  5. jakebailey commented on Sep 27, 2019

    @jakebailey
    Member

    The download is likely corrupted. Try deleting the downloaded folder and retrigger a download. microsoft/vscode-python#3977 contains some instructions to do this.

  6. MikhailArkhipov commented on Sep 27, 2019

    @MikhailArkhipov

    This may also happen if you switch from stable to beta and back without deleting language server folder. See https://github.com/microsoft/python-language-server/wiki/Versioning-and-download-channels

  7. botscholar-scott commented on Sep 27, 2019

    @botscholar-scott
    Author

    Jake Bailey (@jakebailey) what is the "downloaded folder" you are referring to? Is this the Extensions folder?

    I don't have a folder whose name begins with ms-python.python despite this extension being enabled.

    image

    image

    Also that issue [1] states that I should see the version in the Output window for Python and I definitely do not,

    User belongs to experiment group 'ShowPlayIcon - start'
    User belongs to experiment group 'AA_testing - experiment'
    > conda --version
    > python3.6 -c "import sys;print(sys.executable)"
    > python2 -c "import sys;print(sys.executable)"
    > python3.7 -c "import sys;print(sys.executable)"
    > ~/.local/share/virtualenvs/python-monorepo-0N0D55HM/bin/python -c "import sys;print(sys.executable)"
    > python -c "import sys;print(sys.executable)"
    > python3 -c "import sys;print(sys.executable)"
    > conda info --json
    > pipenv --version
    cwd: ~/src/phoenix-labs/python-monorepo
    Starting Microsoft Python language server.
    > pipenv --version
    

    Mikhail Arkhipov (@MikhailArkhipov) I have never switched between stable and beta.

    I'm going to uninstall the extension and re-install to see if that helps.

    [1] microsoft/vscode-python#3977

  8. jakebailey commented on Sep 27, 2019

    @jakebailey
    Member

    The language server is not starting, so it's not going to print its version. Knowing the version is not important to removing it.

    Reinstalling an extension does not help. VS Code doesn't actually uninstall extensions immediately, just marks them as uninstalled without deleting them.

    The download folder is a folder that starts with languageServer in the folder for the extension with the name ms-python.python. If you don't have that on your system, then I'm not sure how the extension is running on your machine... If you're using VS Code remote, maybe the directory is living on another system and you'll have to find it there. Otherwise, I'm not sure where it could be and would suggest searching the system (maybe by using the explorer, or some other program like Everything).

  9. botscholar-scott commented on Sep 27, 2019

    @botscholar-scott
    Author

    No dice. However, looking at the Output for the Python Language Server I see the following so perhaps this isn't using a Windows path as [1] describes?

    Downloading https://pvsc.azureedge.net/python-language-server-stable/Python-Language-Server-linux-x64.0.4.24.nupkg...
    Language server dowload complete
    Unpacking archive... done
    

    [1] microsoft/vscode-python#3977

  10. jakebailey commented on Sep 27, 2019

    @jakebailey
    Member

    I missed that this was WSL, so I'm not entirely certain where it's going to be storing the extension, but you might be able to use a WSL terminal and find .vscode there.

  11. botscholar-scott commented on Sep 27, 2019

    @botscholar-scott
    Author

    It does look like there's a .vscode-server directory in my $HOME,

    PC-SRANKIN% pwd
    /home/srankin/.vscode-server/extensions
    PC-SRANKIN% ls -al
    total 0
    drwxrwxrwx 1 srankin srankin 4096 Sep 27 14:51 .
    drwxrwxrwx 1 srankin srankin 4096 Aug  9 11:29 ..
    drwxrwxrwx 1 srankin srankin 4096 Sep 18 14:37 gabrielbb.vscode-lombok-0.9.9
    drwxrwxrwx 1 srankin srankin 4096 Aug 23 10:35 jeff-hykin.code-eol-1.0.8
    drwxrwxrwx 1 srankin srankin 4096 Sep 27 14:51 ms-python.python-2019.9.34911
    drwxrwxrwx 1 srankin srankin 4096 Sep 18 10:09 redhat.java-0.49.0
    drwxrwxrwx 1 srankin srankin 4096 Aug 28 12:18 visualstudioexptteam.vscodeintellicode-1.1.9
    drwxrwxrwx 1 srankin srankin 4096 Sep 24 10:26 vscjava.vscode-java-debug-0.22.0
    drwxrwxrwx 1 srankin srankin 4096 Aug 28 12:17 vscjava.vscode-java-dependency-0.5.1
    drwxrwxrwx 1 srankin srankin 4096 Sep  3 10:23 vscjava.vscode-java-pack-0.8.0
    drwxrwxrwx 1 srankin srankin 4096 Sep 26 09:10 vscjava.vscode-java-test-0.20.0
    drwxrwxrwx 1 srankin srankin 4096 Sep 27 13:15 vscjava.vscode-maven-0.19.1
    

    that timestamp looks like when I just re-installed it.

    Should I just run Code on the regular Windows side and install the extension there? Not sure what to try next?

  12. jakebailey commented on Sep 27, 2019

    @jakebailey
    Member

    I don't have any experience running the extension via WSL personally, but you should be able to go into that ms-python.python directory and delete the languageServer folder to trigger a re-download, if the issue is just that the download was bad. The timestamp may not matter if VS Code is caching uninstalled extensions for future installs.

  13. botscholar-scott commented on Sep 27, 2019

    @botscholar-scott
    Author

    Unfortunately deleting the languageServer.0.4.24 folder and restarting Code didn't improve anything. I'm starting to wonder if there's some bigger problem with the CoreCLR on this version of Debian or within WSL after seeing a number of references from other projects with this same sort of Failed to create CoreCLR, HRESULT: 0X800004005?

    (python-monorepo) PC-SRANKIN% cd
    (python-monorepo) PC-SRANKIN% cd .vscode-server
    (python-monorepo) PC-SRANKIN% ls -al
    total 0
    drwxrwxrwx 1 srankin srankin 4096 Aug  9 11:29 .
    drwxr-xr-x 1 srankin srankin 4096 Sep 27 14:59 ..
    drwxrwxrwx 1 srankin srankin 4096 Sep 17 14:36 bin
    drwxrwxrwx 1 srankin srankin 4096 Sep 27 14:50 data
    drwxrwxrwx 1 srankin srankin 4096 Sep 27 14:51 extensions
    (python-monorepo) PC-SRANKIN% cd extensions
    (python-monorepo) PC-SRANKIN% ls
    gabrielbb.vscode-lombok-0.9.9  visualstudioexptteam.vscodeintellicode-1.1.9  vscjava.vscode-java-test-0.20.0
    jeff-hykin.code-eol-1.0.8      vscjava.vscode-java-debug-0.22.0              vscjava.vscode-maven-0.19.1
    ms-python.python-2019.9.34911  vscjava.vscode-java-dependency-0.5.1
    redhat.java-0.49.0             vscjava.vscode-java-pack-0.8.0
    (python-monorepo) PC-SRANKIN% cd ms-python.python-2019.9.34911
    (python-monorepo) PC-SRANKIN% ls -al
    total 1504
    drwxrwxrwx 1 srankin srankin   4096 Sep 27 14:51 .
    drwxrwxrwx 1 srankin srankin   4096 Sep 27 14:51 ..
    -rw-rw-r-- 1 srankin srankin 245654 Sep 27 14:50 CHANGELOG.md
    -rw-r--r-- 1 srankin srankin   1773 Sep 27 14:50 experiments.json
    -rw-r--r-- 1 srankin srankin  48597 Sep 27 14:50 icon.png
    drwxrwxrwx 1 srankin srankin   4096 Sep 27 14:50 languages
    drwxrwxrwx 1 srankin srankin   4096 Sep 27 14:51 languageServer.0.4.24
    -rw-r--r-- 1 srankin srankin   1095 Sep 27 14:50 LICENSE.txt
    drwxrwxrwx 1 srankin srankin   4096 Sep 27 14:50 out
    -rw-r--r-- 1 srankin srankin  86058 Sep 27 14:51 package.json
    -rw-r--r-- 1 srankin srankin   2379 Sep 27 14:50 package.nls.de.json
    -rw-r--r-- 1 srankin srankin   2465 Sep 27 14:50 package.nls.es.json
    -rw-r--r-- 1 srankin srankin   2481 Sep 27 14:50 package.nls.fr.json
    -rw-r--r-- 1 srankin srankin   2349 Sep 27 14:50 package.nls.it.json
    -rw-r--r-- 1 srankin srankin   2182 Sep 27 14:50 package.nls.ja.json
    -rw-r--r-- 1 srankin srankin  29134 Sep 27 14:50 package.nls.json
    -rw-r--r-- 1 srankin srankin   2036 Sep 27 14:50 package.nls.ko-kr.json
    -rw-r--r-- 1 srankin srankin  14187 Sep 27 14:50 package.nls.nl.json
    -rw-r--r-- 1 srankin srankin   4296 Sep 27 14:50 package.nls.pl.json
    -rw-r--r-- 1 srankin srankin   2436 Sep 27 14:50 package.nls.pt-br.json
    -rw-r--r-- 1 srankin srankin   3217 Sep 27 14:50 package.nls.ru.json
    -rw-r--r-- 1 srankin srankin   2269 Sep 27 14:50 package.nls.zh-cn.json
    -rw-r--r-- 1 srankin srankin   2288 Sep 27 14:50 package.nls.zh-tw.json
    drwxrwxrwx 1 srankin srankin   4096 Sep 27 14:51 pythonFiles
    -rw-rw-r-- 1 srankin srankin   6013 Sep 27 14:51 README.md
    drwxrwxrwx 1 srankin srankin   4096 Sep 27 14:51 resources
    drwxrwxrwx 1 srankin srankin   4096 Sep 27 14:51 schemas
    drwxrwxrwx 1 srankin srankin   4096 Sep 27 14:51 snippets
    drwxrwxrwx 1 srankin srankin   4096 Sep 27 14:51 syntaxes
    -rw-r--r-- 1 srankin srankin 941944 Sep 27 14:51 ThirdPartyNotices-Distribution.txt
    -rw-r--r-- 1 srankin srankin  54926 Sep 27 14:51 ThirdPartyNotices-Repository.txt
    -rw-rw-r-- 1 srankin srankin   3117 Sep 27 14:50 .vsixmanifest
    (python-monorepo) PC-SRANKIN% rm -rf ./languageServer.0.4.24
    (python-monorepo) PC-SRANKIN% cd ~/src/phoenix-labs/python-monorepo
    (python-monorepo) PC-SRANKIN% code .
    

    image

  14. 7 remaining items

  15. cloudhello commented on Oct 3, 2019

    @cloudhello

    https://stackoverflow.com/questions/38235855/when-dotnet-tool-wont-start-up-failed-to-initialize-what-environment-variable suggests setting

    COREHOST_TRACE=1
    

    to get more info. Also does dotnet --version work? What does it output? Although this will fail if .NET is not installed (which is normal since LS packages everything it needs).

    after I type in set COREHOST_TRACE=1 in command line,there is no echo result.
    I don't find more info.

    what does your LS mean?

    output of dotnet --version

    .NET Core SDK (reflecting any global.json):
     Version:   3.0.100
     Commit:    04339c3a26
    
    Runtime Environment:
     OS Name:     Mac OS X
     OS Version:  10.14
     OS Platform: Darwin
     RID:         osx.10.14-x64
     Base Path:   /usr/local/share/dotnet/sdk/3.0.100/
    
    Host (useful for support):
      Version: 3.0.0
      Commit:  7d57652f33
    
    .NET Core SDKs installed:
      3.0.100 [/usr/local/share/dotnet/sdk]
    
    .NET Core runtimes installed:
      Microsoft.AspNetCore.App 3.0.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
      Microsoft.NETCore.App 2.1.13 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
      Microsoft.NETCore.App 3.0.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
    
    To install additional .NET Core runtimes or SDKs:
      https://aka.ms/dotnet-download
    
  16. jakebailey commented on Oct 3, 2019

    @jakebailey
    Member

    COREHOST_TRACE=1 would need to be set in the environment that the LS starts in. I'm not sure if it'd pass through, but you might be able to do an export COREHOST_TRACE=1, then launch code from the terminal (code ., or the full path to the code binary in the Applications folder), and then see if the LS outputs something there via stderr.

  17. cloudhello commented on Oct 3, 2019

    @cloudhello

    #1619 was the same thing, but happened on macOS.

    yes...but this problem is still unsolved, so I still use intellisense for auto-complete until this bug is fixed

  18. MikhailArkhipov commented on Oct 3, 2019

    @MikhailArkhipov

    Try removing 2.x version as described here https://docs.microsoft.com/en-us/dotnet/core/versions/remove-runtime-sdk-versions?tabs=macos i.e. this
    Microsoft.NETCore.App 2.1.13 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

  19. cloudhello commented on Oct 3, 2019

    @cloudhello

    Try removing 2.x version as described here https://docs.microsoft.com/en-us/dotnet/core/versions/remove-runtime-sdk-versions?tabs=macos i.e. this
    Microsoft.NETCore.App 2.1.13 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

    after do this, that problem is still.

  20. MikhailArkhipov commented on Oct 3, 2019

    @MikhailArkhipov

    Did you try setting COREHOST_TRACE=1 to get more info on the CLR failure.

  21. cloudhello commented on Oct 4, 2019

    @cloudhello

    Did you try setting COREHOST_TRACE=1 to get more info on the CLR failure.

    yes,i did(type in "export COREHOST_TRACE=1" in terminal). there is no more info,the same as before.

    Downloading https://pvsc.azureedge.net/python-language-server-stable/Python-Language-Server-osx-x64.0.4.38.nupkg...
    Language server dowload complete
    Unpacking archive... done
    Failed to create CoreCLR, HRESULT: 0x80004005
    [Info  - 1:00:33 PM] Connection to server got closed. Server will restart.
    Failed to create CoreCLR, HRESULT: 0x80004005
    [Info  - 1:00:33 PM] Connection to server got closed. Server will restart.
    Failed to create CoreCLR, HRESULT: 0x80004005
    [Info  - 1:00:33 PM] Connection to server got closed. Server will restart.
    Failed to create CoreCLR, HRESULT: 0x80004005
    [Info  - 1:00:34 PM] Connection to server got closed. Server will restart.
    Failed to create CoreCLR, HRESULT: 0x80004005
    [Error - 1:00:34 PM] Connection to server got closed. Server will not be restarted.
    
  22. MikhailArkhipov commented on Oct 4, 2019

    @MikhailArkhipov

    Frankly, we are not CLR experts, there are few closed issues in dotnet repo on this. Perhaps this one about ulimit? https://github.com/dotnet/cli/issues/10071

  23. MikhailArkhipov commented on Oct 4, 2019

    @MikhailArkhipov
  24. cloudhello commented on Oct 5, 2019

    @cloudhello

    Frankly, we are not CLR experts, there are few closed issues in dotnet repo on this. Perhaps this one about ulimit? dotnet/cli#10071

    when I do this(type in "ulimit -n 4096" in terminal,but system default value is 256),that problem is still and log doesn't change.

  25. MikhailArkhipov commented on May 1, 2020

    @MikhailArkhipov

    Closing since there is nothing we can do with CLR behavior. Upstream issue is still open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions