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

vscode snap version fails to encrypt using the encryptionService #116690

Closed
controldev opened this issue Feb 15, 2021 · 21 comments · Fixed by #127320
Closed

vscode snap version fails to encrypt using the encryptionService #116690

controldev opened this issue Feb 15, 2021 · 21 comments · Fixed by #127320
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug confirmed Issue has been confirmed by VS Code Team member insiders-released Patch has been released in VS Code Insiders linux Issues with VS Code on Linux mitigated Issue has workaround in place snap Issues related to the snap package verified Verification succeeded
Milestone

Comments

@controldev
Copy link

controldev commented Feb 15, 2021

  • VS Code Version: 1.53.2
  • OS Version: Ubuntu 20.04 LTS

Steps to Reproduce:

  1. Run the program in any way
  2. Sit back and watch

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

VS code automatically crashes and closes a few seconds after start up, with no popup or other information provided.
I tried purging (including all settings), reinstalling (both through snap and apt), but no luck.

Below are the only logs visible after running Code with
code --disable-extensions

[2021-02-15 12:17:23.351] [exthost] [info] extension host started
[2021-02-15 12:17:23.368] [exthost] [info] ExtensionService#_doActivateExtension vscode.microsoft-authentication {"startup":false,"extensionId":{"value":"vscode.microsoft-authentication","_lower":"vscode.microsoft-authentication"},"activationEvent":"onAuthenticationRequest:microsoft"}
[2021-02-15 12:17:23.368] [exthost] [info] ExtensionService#loadCommonJSModule file:///usr/share/code/resources/app/extensions/microsoft-authentication/dist/extension.js
[2021-02-15 12:17:23.379] [exthost] [info] ExtensionService#_doActivateExtension vscode.debug-auto-launch {"startup":true,"extensionId":{"value":"vscode.debug-auto-launch","_lower":"vscode.debug-auto-launch"},"activationEvent":"*"}
[2021-02-15 12:17:23.379] [exthost] [info] ExtensionService#loadCommonJSModule file:///usr/share/code/resources/app/extensions/debug-auto-launch/dist/extension
[2021-02-15 12:17:23.380] [exthost] [info] ExtensionService#_doActivateExtension vscode.git {"startup":true,"extensionId":{"value":"vscode.github","_lower":"vscode.github"},"activationEvent":"*"}
[2021-02-15 12:17:23.380] [exthost] [info] ExtensionService#loadCommonJSModule file:///usr/share/code/resources/app/extensions/git/dist/main
[2021-02-15 12:17:23.438] [exthost] [info] ExtensionService#_doActivateExtension vscode.github {"startup":true,"extensionId":{"value":"vscode.github","_lower":"vscode.github"},"activationEvent":"*"}
[2021-02-15 12:17:23.438] [exthost] [info] ExtensionService#loadCommonJSModule file:///usr/share/code/resources/app/extensions/github/dist/extension.js
[2021-02-15 12:17:23.442] [exthost] [info] ExtensionService#_doActivateExtension ms-vscode.js-debug {"startup":false,"extensionId":{"value":"ms-vscode.js-debug","_lower":"ms-vscode.js-debug"},"activationEvent":"onCommand:extension.js-debug.clearAutoAttachVariables"}
[2021-02-15 12:17:23.442] [exthost] [info] ExtensionService#loadCommonJSModule file:///usr/share/code/resources/app/extensions/ms-vscode.js-debug/src/extension.js
[2021-02-15 12:17:23.540] [exthost] [info] eager extensions activated
[2021-02-15 12:17:23.547] [exthost] [info] ExtensionService#_doActivateExtension vscode.emmet {"startup":false,"extensionId":{"value":"vscode.emmet","_lower":"vscode.emmet"},"activationEvent":"onStartupFinished"}
[2021-02-15 12:17:23.547] [exthost] [info] ExtensionService#loadCommonJSModule file:///usr/share/code/resources/app/extensions/emmet/dist/node/emmetNodeMain
[2021-02-15 12:17:23.556] [exthost] [info] ExtensionService#_doActivateExtension vscode.merge-conflict {"startup":false,"extensionId":{"value":"vscode.merge-conflict","_lower":"vscode.merge-conflict"},"activationEvent":"onStartupFinished"}
[2021-02-15 12:17:23.556] [exthost] [info] ExtensionService#loadCommonJSModule file:///usr/share/code/resources/app/extensions/merge-conflict/dist/mergeConflictMain
[2021-02-15 12:17:23.558] [exthost] [info] ExtensionService#_doActivateExtension vscode.testing-editor-contributions {"startup":false,"extensionId":{"value":"vscode.testing-editor-contributions","_lower":"vscode.testing-editor-contributions"},"activationEvent":"onStartupFinished"}
[2021-02-15 12:17:23.558] [exthost] [info] ExtensionService#loadCommonJSModule file:///usr/share/code/resources/app/extensions/testing-editor-contributions/dist/extension.js
[2021-02-15 12:17:23.570] [exthost] [info] ExtensionService#_doActivateExtension vscode.github-authentication {"startup":false,"extensionId":{"value":"vscode.github-authentication","_lower":"vscode.github-authentication"},"activationEvent":"onAuthenticationRequest:github"}
[2021-02-15 12:17:23.570] [exthost] [info] ExtensionService#loadCommonJSModule file:///usr/share/code/resources/app/extensions/github-authentication/dist/extension.js
[2021-02-15 12:17:24.339] [exthost] [info] extension host terminating: parent process 16843 does not exist anymore: kill ESRCH (code: ESRCH) (errno: ESRCH)
[2021-02-15 12:17:25.346] [exthost] [info] exiting with code 0

I wanted to try changing git.enabled to false in settings.json, but the path indicated in the official docs (https://code.visualstudio.com/docs/getstarted/settings) does not contain settings.json.

@weinand weinand added the freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues label Feb 15, 2021
@bpasero
Copy link
Member

bpasero commented Feb 15, 2021

Can you please follow the steps in https://github.com/Microsoft/vscode/wiki/Native-Crash-Issues to get at more details around the crash and attach the result here? Thanks!

@bpasero bpasero added the info-needed Issue requires more information from poster label Feb 15, 2021
@controldev
Copy link
Author

controldev commented Feb 15, 2021

Can you please follow the steps in https://github.com/Microsoft/vscode/wiki/Native-Crash-Issues to get at more details around the crash and attach the result here? Thanks!

Any idea how I can send you the .dmp file @bpasero? GitHub won't accept it, I can send it via email as the link you provided suggests.

@bpasero
Copy link
Member

bpasero commented Feb 15, 2021

@controldev GH will accept it if you first create a zip archive, but mail is also fine.

@harriskrem
Copy link

Hi i have exactly the same issue, i'm attaching you the crash dmp file, can you please help me? I'm using Pop!_OS 20.10
crash.zip

@bpasero
Copy link
Member

bpasero commented Feb 19, 2021

@deepak1556 can you work your magic to symbolify?

@inc0der
Copy link

inc0der commented Feb 21, 2021

Hey guys I'm having the same issue with VSCode(non snap version) crashing upon start in a new install of Ubuntu 20.04. Snap version works fine but also takes about 1 minute to open on the very first time after a system restart.

Here are my logs for the crash vscode_crash_logs_Ubuntu_20.04.zip

@deepak1556
Copy link
Collaborator

Both the reports point to SIGABRT from the vscode-encrypt module, we currently don't generate debug symbols for the module. Will upload the symbolized dump tomorrow.

@deepak1556 deepak1556 added linux Issues with VS Code on Linux and removed info-needed Issue requires more information from poster labels Feb 22, 2021
@bpasero bpasero assigned RMacfarlane and unassigned bpasero Feb 22, 2021
@grhwalls
Copy link

grhwalls commented Feb 27, 2021

Hello, I think I am having the same issue and I may have some useful debug info. I am running vscode 1.53.2 on two Kubuntu 20.10 machines, a laptop and a desktop. It works fine on the desktop, but not on the laptop.

I can think of one thing that I did differently on these two machines: on the laptop, I used to have the snap package and switched to the apt package; on the desktop, I never installed the snap package. The snap package still works on the laptop, but the apt package does not (just like @inc0der reported).

Additionally, the code-insiders apt package works just fine on the laptop.

The fact that I am not having any issues on the desktop makes me wonder if some configuration was changed when the snap package was installed that is preventing the apt package from running correctly. Anyways, I have attached my crash report as well. Hope this helps.

crash_report.zip

@deepak1556
Copy link
Collaborator

Symbolicated trace

Crash reason:  SIGABRT
Crash address: 0x3e800003ee6
Process uptime: not available

Thread 26 (crashed)
 0  libc.so.6!__GI_raise [raise.c : 51 + 0x0]
    rax = 0x0000000000000000   rdx = 0x0000000000000000
    rcx = 0x00007f4b2edb718b   rbx = 0x00007f4b20056700
    rsi = 0x00007f4b20055480   rdi = 0x0000000000000002
    rbp = 0x00007f4b25fbf50c   rsp = 0x00007f4b20055480
     r8 = 0x0000000000000000    r9 = 0x00007f4b20055480
    r10 = 0x0000000000000008   r11 = 0x0000000000000246
    r12 = 0x00001dc9a5ae83d0   r13 = 0x0000000000000000
    r14 = 0x00007f4b200557b0   r15 = 0x000000000000003e
    rip = 0x00007f4b2edb718b
    Found by: given as instruction pointer in context
 1  libc.so.6!abort [abort.c : 79 + 0xa]
    rbx = 0x00007f4b20056700   rbp = 0x00007f4b25fbf50c
    rsp = 0x00007f4b200555a0   r12 = 0x00001dc9a5ae83d0
    r13 = 0x0000000000000000   r14 = 0x00007f4b200557b0
    r15 = 0x000000000000003e   rip = 0x00007f4b2ed96859
    Found by: call frame info
 2  libstdc++.so.6!__gnu_cxx::__verbose_terminate_handler() [clone .cold] + 0x5d
    rbx = 0x00007f4b2ef5d780   rbp = 0x00007f4b25fbf50c
    rsp = 0x00007f4b200556d0   r12 = 0x00001dc9a5ae83d0
    r13 = 0x0000000000000000   r14 = 0x00007f4b200557b0
    r15 = 0x000000000000003e   rip = 0x00007f4b25ed7951
    Found by: call frame info
 3  libstdc++.so.6!__cxxabiv1::__terminate(void (*)()) + 0xc
    rbx = 0x0000000000000000   rbp = 0x00001dc9a4aa40f0
    rsp = 0x00007f4b20055700   r12 = 0x00007f4b2600b8b0
    r13 = 0x0000000000000000   r14 = 0x00007f4b200557b0
    r15 = 0x000000000000003e   rip = 0x00007f4b25ee347c
    Found by: call frame info
 4  libstdc++.so.6!std::terminate() [eh_terminate.cc : 58 + 0xd]
    rbx = 0x0000000000000000   rbp = 0x00001dc9a4aa40f0
    rsp = 0x00007f4b20055710   r12 = 0x00007f4b2600b8b0
    r13 = 0x0000000000000000   r14 = 0x00007f4b200557b0
    r15 = 0x000000000000003e   rip = 0x00007f4b25ee34e7
    Found by: call frame info
 5  libstdc++.so.6!__cxa_throw [eh_throw.cc : 95 + 0x5]
    rbx = 0x0000000000000000   rbp = 0x00001dc9a4aa40f0
    rsp = 0x00007f4b20055720   r12 = 0x00007f4b2600b8b0
    r13 = 0x0000000000000000   r14 = 0x00007f4b200557b0
    r15 = 0x000000000000003e   rip = 0x00007f4b25ee3799
    Found by: call frame info
 6  vscode-encrypt-native.node!pos_of_char(unsigned char) [clone .part.6] + 0x29
    rbx = 0x0000000000000000   rbp = 0x00007f4b20055740
    rsp = 0x00007f4b20055740   r12 = 0x00001dc9a5205400
    r13 = 0x0000000000000000   r14 = 0x00007f4b200557b0
    r15 = 0x000000000000003e   rip = 0x00007f4b18b2e0f1
    Found by: call frame info
 7  vscode-encrypt-native.node!base64_decode(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool) + 0x7e1
    rbx = 0x0000000000000000   rbp = 0x00007f4b20055830
    rsp = 0x00007f4b20055750   r12 = 0x00001dc9a5205400
    r13 = 0x0000000000000000   r14 = 0x00007f4b200557b0
    r15 = 0x000000000000003e   rip = 0x00007f4b18b35791
    Found by: call frame info
 8  vscode-encrypt-native.node!Encryption::Decrypt(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*) + 0x4e
    rbx = 0x00001dc9a4fad270   rbp = 0x00007f4b20055970
    rsp = 0x00007f4b20055840   r12 = 0x00007f4b20055890
    r13 = 0x00001dc9a4fad250   r14 = 0x00007f4b200559a0
    r15 = 0x000055e6ad33ac70   rip = 0x00007f4b18b346ce
    Found by: call frame info
 9  vscode-encrypt-native.node!DecryptWorker::Execute() + 0x55
    rbx = 0x00007f4b200559a0   rbp = 0x00007f4b20055a20
    rsp = 0x00007f4b20055980   r12 = 0x00001dc9a4fad1e0
    r13 = 0x00007ffd31f6fd01   r14 = 0x00001dc9a5b68968
    r15 = 0x000055e6ad33ac70   rip = 0x00007f4b18b31c65
    Found by: call frame info
10  vscode-encrypt-native.node!Napi::AsyncWorker::OnAsyncWorkExecute(napi_env__*, void*) + 0x33
    rbx = 0x00001dc9a4fad1e0   rbp = 0x00007f4b20055a70
    rsp = 0x00007f4b20055a30   r12 = 0x0000000000000090
    r13 = 0x00007ffd31f6fd01   r14 = 0x00001dc9a5b68968
    r15 = 0x000055e6ad33ac70   rip = 0x00007f4b18b33003
    Found by: call frame info
11  code!uv_cancel + 0x2c4
    rbx = 0x000055e6ad33abf0   rbp = 0x00007f4b20055ab0
    rsp = 0x00007f4b20055a80   r12 = 0x0000000000000090
    r13 = 0x00007ffd31f6fd01   r14 = 0x00001dc9a5b68968
    r15 = 0x000055e6ad33ac70   rip = 0x000055e6a729a994
    Found by: call frame info
12  libpthread.so.0!start_thread [pthread_create.c : 477 + 0x12]
    rsp = 0x00007f4b20055ac0   rip = 0x00007f4b304b1609
    Found by: stack scanning
13  libc.so.6!__GI___clone + 0x43
    rbx = 0x00007f4b20056700   rbp = 0x0000000000000000
    rsp = 0x00007f4b20055b80   r12 = 0x00007ffd31f6fdde
    rip = 0x00007f4b2ee93293
    Found by: call frame info

@deepak1556 deepak1556 added this to the March 2021 milestone Mar 4, 2021
@deepak1556
Copy link
Collaborator

@deepak1556
Copy link
Collaborator

deepak1556 commented Mar 5, 2021

Can everyone check if you have entries in login keyring under either of the service named vscodevscode.github-authentication or vscodevscode.microsoft-authentication ? Can you delete them and check if the crash continues to happen.

@grhwalls
Copy link

grhwalls commented Mar 5, 2021

Can everyone check if you have entries in login keyring under either of the service named vscodevscode.github-authentication or vscodevscode.microsoft-authentication ? Can you delete them and check if the crash continues to happen.

I had an entry for vscodevscode.github-authentication and I deleted it. This seemed to fix the problem for me.

@deepak1556
Copy link
Collaborator

deepak1556 commented Mar 5, 2021

Thanks for checking, at this point I don't have a good way to analyze the issue because that involves inspecting the stored value or having a reliable repro both of which aren't possible. It would help if we have a repro.

@RMacfarlane will add some logs to atleast narrow down which extension is triggering this.

From the user end, if possible can you check if the values under those keys are valid base64 strings ?

@RMacfarlane RMacfarlane added this to the April 2021 milestone Mar 23, 2021
@deepak1556
Copy link
Collaborator

The startup crash is now fixed in latest insiders and will also be fixed in next stable release 1.55.

@RMacfarlane RMacfarlane modified the milestones: April 2021, May 2021 Apr 27, 2021
@TylerLeonhardt TylerLeonhardt modified the milestones: May 2021, June 2021 May 28, 2021
deepak1556 added a commit that referenced this issue Jun 28, 2021
Fixes #116690

vscode-encrypt fails to load with GLIBC_2.25 not found error.

ldd vscode-encrypt.node
  libstdc++.so.6 => /snap/core/current/usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fc887a3a000)
  libgcc_s.so.1 => /snap/core/current/lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fc887824000)
  libpthread.so.0 => /snap/core/current/lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fc887607000)
  libc.so.6 => /snap/core/current/lib/x86_64-linux-gnu/libc.so.6 (0x00007fc88723d000)
  libm.so.6 => /snap/core/current/lib/x86_64-linux-gnu/libm.so.6 (0x00007fc886f34000)
  /lib64/ld-linux-x86-64.so.2 (0x00007fc8882bc000)

libc.so.6 from ubuntu16.04 core is not sufficient for support.
Switching to core18 matches with the build environment used for the native module
https://github.com/microsoft/vscode-linux-build-agent/blob/main/bionic-x64/Dockerfile
@deepak1556 deepak1556 modified the milestones: June 2021, July 2021 Jun 28, 2021
deepak1556 added a commit that referenced this issue Jul 13, 2021
Fixes #116690

vscode-encrypt fails to load with GLIBC_2.25 not found error.

ldd vscode-encrypt.node
  libstdc++.so.6 => /snap/core/current/usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fc887a3a000)
  libgcc_s.so.1 => /snap/core/current/lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fc887824000)
  libpthread.so.0 => /snap/core/current/lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fc887607000)
  libc.so.6 => /snap/core/current/lib/x86_64-linux-gnu/libc.so.6 (0x00007fc88723d000)
  libm.so.6 => /snap/core/current/lib/x86_64-linux-gnu/libm.so.6 (0x00007fc886f34000)
  /lib64/ld-linux-x86-64.so.2 (0x00007fc8882bc000)

libc.so.6 from ubuntu16.04 core is not sufficient for support.
Switching to core18 matches with the build environment used for the native module
https://github.com/microsoft/vscode-linux-build-agent/blob/main/bionic-x64/Dockerfile
deepak1556 added a commit that referenced this issue Jul 18, 2021
Fixes #116690

vscode-encrypt fails to load with GLIBC_2.25 not found error.

ldd vscode-encrypt.node
  libstdc++.so.6 => /snap/core/current/usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fc887a3a000)
  libgcc_s.so.1 => /snap/core/current/lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fc887824000)
  libpthread.so.0 => /snap/core/current/lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fc887607000)
  libc.so.6 => /snap/core/current/lib/x86_64-linux-gnu/libc.so.6 (0x00007fc88723d000)
  libm.so.6 => /snap/core/current/lib/x86_64-linux-gnu/libm.so.6 (0x00007fc886f34000)
  /lib64/ld-linux-x86-64.so.2 (0x00007fc8882bc000)

libc.so.6 from ubuntu16.04 core is not sufficient for support.
Switching to core18 matches with the build environment used for the native module
https://github.com/microsoft/vscode-linux-build-agent/blob/main/bionic-x64/Dockerfile
@deepak1556 deepak1556 removed this from the July 2021 milestone Jul 26, 2021
@TylerLeonhardt TylerLeonhardt removed their assignment Oct 22, 2021
@deepak1556
Copy link
Collaborator

/closedWith bebab7e

@connor4312 connor4312 added the verified Verification succeeded label Apr 29, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Jun 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug confirmed Issue has been confirmed by VS Code Team member insiders-released Patch has been released in VS Code Insiders linux Issues with VS Code on Linux mitigated Issue has workaround in place snap Issues related to the snap package verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

13 participants