vscode: VSCode Insiders 1.26.x Segmentation Fault on start

VSCode Insiders 1.25 crashes upon startup:

/usr/bin/code-insiders: line 35: 20557 Segmentation fault (core dumped) ELECTRON_RUN_AS_NODE=1 "$ELECTRON" "$CLI" "$@"

Program received signal SIGSEGV, Segmentation fault.
0x0000000000b6ed00 in ?? ()
(gdb) bt
#0  0x0000000000b6ed00 in  ()
#1  0x00007ffff7b8e1d2 in node::http2::Http2Session::Callbacks::Callbacks(bool) () at /usr/share/code-insiders/libnode.so
#2  0x00007ffff7b8e295 in  () at /usr/share/code-insiders/libnode.so
#3  0x00007ffff7de677a in call_init.part () at /lib64/ld-linux-x86-64.so.2
#4  0x00007ffff7de6876 in _dl_init () at /lib64/ld-linux-x86-64.so.2
#5  0x00007ffff7dd7fba in _dl_start_user () at /lib64/ld-linux-x86-64.so.2
#6  0x0000000000000001 in  ()
#7  0x00007fffffffd747 in  ()
#8  0x0000000000000000 in  ()

I have experienced these with the last two nightly builds:

  • code-insiders-1.25.0-1528867473.el7.x86_64.rpm
  • code-insiders-1.25.0-1528953847.el7.x86_64.rpm

This problem goes away when I downgrade to code-insiders-1.24.0-1528217814.el7.x86_64.rpm

Node: 10.1.0 npm: 6.0.1

  • VSCode Version: 1.25.x
  • OS Version: Fedora Rawhide
  • Kernel: 4.18.0-0.rc0.git5.1.fc29.x86_64

Steps to Reproduce:

  1. start ‘code-insiders’

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

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 40 (11 by maintainers)

Most upvoted comments

I agree with @faahim , I just updated my antergos machine and got exactly the same error, and the electron /opt/visual-studio-code/resources/app workaround also seems to work fine.

Just for the record, I’m using:

$ uname -a
Linux antergos 4.17.14-arch1-1-ARCH #1 SMP PREEMPT Thu Aug 9 11:56:50 UTC 2018 x86_64 GNU/Linux

Any idea when this will be fixed?

edit: I can confirm that as of today, 2018-08-14, I’ve just updated antergos packages, which installed a new vscode version, and the problem seems to be fixed.

image

@autoferrit:

For now, is there a current workaround for this?

$ electron resources/app

Worked for me, anyway!

Same issue here on Arch with the latest git master (Electron 2.0.5) and glibc 2.28. Works fine with glibc downgraded to 2.27 though…

Update: seems like an issue with the prebuilt Electron binaries VSCode uses - running it with upstream Electron from the Arch repos at least launches the editor, though I’m not sure if there are any footguns that I’m not aware of.

Looks like latest vscode insider is running now with electron 2.0.9, so this libc problem is solved for insiders version at least.

@ItsWendell First fair warning: I wont recommend for downgrading back to 2.27. I ended up to updating back to 2.28 myself, and using newer version of Electron manually, since it is the problem.

Following will happen with Ubuntu 18.10 at least:

If you downgrade back to 2.27, all of the packages, which will require libc version 2.28 will be uninstalled (at least those, which have been installed with package manager). Those which aren’t, will not work. You will miss a lot of updates, if you decide to stick with 2.27. You have to manually disable, that 2.28 is not installed automatically again. 2.28 should be backwards compatible, but apparently not with electron.

Better temporal solution would be to build vscode with electron 2.0.8, but I don’t know how. So I ended up for downloading electron 2.0.8 here, electron-v2.0.8-linux-x64.zip, and starting vscode just with in my case:

$electron /usr/share/code-insiders/resources/app

You can edit your code/vscode/code-insiders.desktop file, so it will launch vscode like that.

Some functionalities will not work, like right clicking folder, and “open with other application” and select vscode. It does not open folder inside vscode in that way.

But I can live with it, once the official version is built with electron >=2.08

But anyway, if you want to downgrade libc version still, here are some guidelines in Ubuntu 18.10 I won’t recommend of doing this, since you might break your system. It might not be best way, more like a hack.

You can downgrade actual libc to 2.27 with:

sudo apt install libc6=2.27-3ubuntu1

At least in my case, it removed libc-bin as well. And some of its binaries we required in downgrade process. So during downgrade process, I had to download older libc-bin version here, and copy these binaries to correct place. I did not try to install .deb file directly, It might install or might not, depending on, which version of libc package manager thinks to be the current libc6 version.

After that, I was able to complete downgrade process.

I just updated VSCode from the AUR repo on my Arch Linux machine and I’m having the same issue.

Running electron /opt/visual-studio-code/resources/app works for now. But I’m not sure, is this an issue that electron needs to fix? Or is it likely that VSCode will fix this in future updates?

I had the same problem with Slack client last week. I removed and installed the app a few days later and its working fine now.

I’m just not sure whether I need to do something on my part to prevent all my electron apps from crashing on updates.

I came across this thread with someone having the same issue with skype in Fedora Rawhide: https://answers.microsoft.com/en-us/skype/forum/skype_linux-skype_startms-skype_installms/skype-not-opening-on-fedora-rawhide/c14eb9d2-563d-4697-b77d-077db7d77ffa

According to a poster there, the bug is related to electron and my current version of glibc. It seems probably as I get the same http2 segfault with ‘skype’ and ‘atom-beta’ so I’m going to close for now.