microsoft / vscode

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

1.90 crashes on ubuntu 20.04 under tigervnc X server #216569

Open cleemesser opened 2 months ago

cleemesser commented 2 months ago

s

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

  1. install Xubuntu 20.04.3 (x86_64/amd64) as "host A"
  2. download the "Debian, ubuntu" ".deb" option from the microsoft visual code download page
    $ apt install ./code_1.90.1-1718141439_amd64.deb 
    $ sudo apt install tigervnc-standalone-server
  3. on the command line, start the vncserver:
    $ vncserver :1 
  4. on another host B install tigervnc-viewer or TurboVNC viewer
  5. from host B login to the vnc-server desktop on host A using vncviewer
  6. from the command line in the virtual desktop of host A, type
    code <argument options as described below>

    without any arguments, nothing happens for 10-30 seconds, then sometimes I get a "application has failed, send information to developer alert. The VS Code windows never appear.

I also have been having problems with crashing on ubuntu 20.04.3 LTS since 1.90 came out. I run code on my xubuntu desktop atop a vncserver X session (tigerVNCor TurboVNC ). VS code has worked on this system using code version 1.89.1 (https://github.com/microsoft/vscode/commit/dc96b837cf6bb4af9cd736aa3af08cf8279f7685 x64). And, I have been using prior versions of code successfully for a year or two at least in the same desktop.

But with anything in the 1.9.0 1.9.1 range I get an immediate failure to launch.

$ sudo apt upgrade code  # using deb package from repo 
# 
$ code --version --verbose
1.90.1
611f9bfce64f25108829dd295f54a6894e87339d
x64

$ code --verbose
<--- Last few GCs --->

<--- JS stacktrace --->

#
# Fatal process out of memory: Oilpan: CagedHeap reservation.
#

Further tests:

Unfortunately, I get same result for: either code or code-insiders for each of the following arguments. I also tried combing --disable-extensions with some of the others


$ code --verbose --disable-gpu
$ code --verbose --disable-extensions
$ code --verbose --disable-extensions
$ code --verbose --in-process-gpu
$ code --verbose --user-data-dir /tmp/code-1-90
$ code --verbose --use-gl=swiftshader

### update for 1.90.2 and 1.91.0-insider 
still no joy, same results
deepak1556 commented 2 months ago

Can you test if the issue repros with our exploration build. If it does, please attach the crash logs following the steps at https://github.com/microsoft/vscode/wiki/Native-Crash-Issues#creating-a-crash-report

cleemesser commented 2 months ago

No luck getting you a dmp file so far. Sorry.

sudo dpkg -i code-exploration_1.91.0-1718857945_amd64.deb 
code-exploration --crash-reporter-directory /home/clee/Downloads/codecrash --verbose --disable-extensions
<--- Last few GCs --->

<--- JS stacktrace --->

#
# Fatal process out of memory: Oilpan: CagedHeap reservation.
#
----- Native stack trace -----

This does not produce a .dmp file

There is a gnome/ubuntu crash report which I sent to "the developers" unfortunately, I can't just save it or copy-paste it from the pop up panel. I can type out a little from it. It looks like the bottom of the stack traces ends at a null 0x00 address.

Same thing when I try to increase the log level and disable everything I can think of:

code-exploration --crash-reporter-directory /home/clee/Downloads/codecrash --verbose --disable-extensions --disable-gpu --log trace -s --disable-chromium-sandbox --disable-lcd-text
<--- Last few GCs --->

<--- JS stacktrace --->

#
# Fatal process out of memory: Oilpan: CagedHeap reservation.
#
----- Native stack trace -----

side info

Possibly related, when i run google-chrome-stable (ver 1.90.2-171875186) it runs in this tigervnc environment but gives the message:

google-chrome-stable 
[3317485:3317485:0623/172800.702640:ERROR:viz_main_impl.cc(166)] Exiting GPU process due to errors during initialization

I have little electron experience, but following the quick start tutorial at electronjs, I create the my-electron-app and trying npm run with it gives the exact same instant stacktrace.

This is the package.json file:

{
  "name": "my-app",
  "productName": "my-app",
  "version": "1.0.0",
  "description": "My Electron application description",
  "main": "src/index.js",
  "scripts": {
    "start": "electron-forge start",
    "package": "electron-forge package",
    "make": "electron-forge make",
    "publish": "electron-forge publish",
    "lint": "echo \"No linting configured\""
  },
  "devDependencies": {
    "@electron-forge/cli": "^7.4.0",
    "@electron-forge/maker-deb": "^7.4.0",
    "@electron-forge/maker-rpm": "^7.4.0",
    "@electron-forge/maker-squirrel": "^7.4.0",
    "@electron-forge/maker-zip": "^7.4.0",
    "@electron-forge/plugin-auto-unpack-natives": "^7.4.0",
    "@electron-forge/plugin-fuses": "^7.4.0",
    "@electron/fuses": "^1.8.0",
    "electron": "^31.0.2"
  },
  "keywords": [],
  "author": "cleemesser",
  "license": "MIT",
  "dependencies": {
    "electron-squirrel-startup": "^1.0.1"
  }
}

So I am guessing this is an electron problem, not a vscode specific one. Maybe there an upgrade in electron versions from vscode 1.89.1 to 1.90?

I went ahead and tried creating a new user on the same server and redoing the electron app from scratch and it does not crash, and neither does code-insiders 1.91-insider so it must be something specifically configured somewhere with this account so that things work with code 1.89.1 and before but not after. Not easy to reproduce, so you probably want to close this.

Sorry to waste your time. I