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

Linux Mint Guest OS crashes while using VSCode #84745

Closed
prjemian opened this issue Nov 13, 2019 · 48 comments
Closed

Linux Mint Guest OS crashes while using VSCode #84745

prjemian opened this issue Nov 13, 2019 · 48 comments
Assignees
Labels
gpu Issues concerning GPU related items linux Issues with VS Code on Linux upstream-issue-linked This is an upstream issue that has been reported upstream virtual-machine Issues related to virtualbox, parallels etc

Comments

@prjemian
Copy link

Issue Type: Bug

problem:
VirtualBoxVM crashes with Application Error while running VSCode

  1. start with Windows 10
  2. Run Oracle VirtualBox
  3. create linux mint VM
  4. run linux mint VM
  5. install VSCode for Linux from tar.gz
  6. clone some repo from GitHub
  7. cd into local repo and start editor (usually code -a .)
  8. work with VSCode in local clone (unsure exactly what activity triggers this)

After some unpredictable amount of time, clicking on a menu or the settings icon (maybe some other actions also trigger), the expected pop-up menu will be all black instead of filled with content. A short time (usually no more than a minute) later, the guest VM will be unresponsive and an Application Error dialog will appear in the Win10 host. The VM is dead at this point. Here is the content of the dialog just received:

The instruction at 0x00007FF84210F161 referenced memory at 
0x00000000000000000000000000000000.  The memory could not be written.

Click on OK to terminate the program

This has been a consistent problem in the VSCode versions since I started. May be tied to git plugin and editing in a directory that is a git repo.

VS Code version: Code 1.40.0 (86405ea, 2019-11-06T18:14:08.920Z)
OS version: Linux x64 4.15.0-70-generic

System Info
Item Value
CPUs Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz (1 x 1991)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: disabled_off
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: disabled_software
skia_renderer: disabled_off
surface_control: disabled_off
surface_synchronization: enabled_on
video_decode: unavailable_off
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) 1, 1, 0
Memory (System) 5.82GB (3.37GB free)
Process Argv -a . --no-sandbox
Screen Reader no
VM 100%
Extensions (6)
Extension Author (truncated) Version
gitlens eam 10.1.2
vscode-docker ms- 0.8.2
python ms- 2019.10.44104
cpptools ms- 0.26.2-insiders
preview-vscode myh 1.3.0
vscode-print pdc 0.7.13

Also:

(base) mintadmin@mint-vm:~/.../eclipse/adl2pydm$ more /etc/os-release 
NAME="Linux Mint"
VERSION="19.2 (Tina)"
ID=linuxmint
ID_LIKE=ubuntu
PRETTY_NAME="Linux Mint 19.2"
VERSION_ID="19.2"
HOME_URL="https://www.linuxmint.com/"
SUPPORT_URL="https://forums.ubuntu.com/"
BUG_REPORT_URL="http://linuxmint-troubleshooting-guide.readthedocs.io/en/latest/"
PRIVACY_POLICY_URL="https://www.linuxmint.com/"
VERSION_CODENAME=tina
UBUNTU_CODENAME=bionic

Windows 10 host details (running Oracle VirtualBox)

VS Code version: Code 1.40.0 (86405ea, 2019-11-06T17:02:13.381Z)
OS version: Windows_NT x64 10.0.17763

System Info
Item Value
CPUs Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz (8 x 1992)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: enabled
rasterization: enabled
skia_renderer: disabled_off
surface_control: disabled_off
surface_synchronization: enabled_on
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 15.85GB (6.32GB free)
Process Argv -a .
Screen Reader no
VM 0%
@prjemian
Copy link
Author

screen shot at time of recent crash
VSCode-crash

Linux Mint Guest VM is in right panel

@prjemian
Copy link
Author

Suspecting that git is involved, will try working without plugins next.

@prjemian
Copy link
Author

FYI: code -a --disable-extensions .

System still crashed.

@prjemian
Copy link
Author

This screen shows one of the symptoms. In this case (just installed VSCode-linux-x64-1573664143 now), starting with: code -a --disable-extensions ., opened one of the python source code files. Then clicked on the settings gear (planning to look for plugin configuration to verify that plugins are still off) and received this black box instead of a pop-up menu:
Clipboard01

@prjemian
Copy link
Author

And now the VM has crashed with exactly the same VirtualBoxVM.exe - Application Error dialog as originally posted: The instruction at 0x00007FF84210F161 referenced memory ...

Hope this is enough info for y'all to figure this one out.

@prjemian
Copy link
Author

Ok, one more variation to try (don't use the -a option), once the VM is restarted. code --disable-extensions

@prjemian
Copy link
Author

This is not a good sign (tried clicking the settings gear):
Clipboard01

@prjemian
Copy link
Author

Any other diagnostics?

@prjemian
Copy link
Author

... and system has now crashed again

Was moving mouse between menus, looking if any of them would appear with text content rather than all black. Started with Help (all black), slid left to Terminal (text content), back to Help (all black and VM crashed right away.)

@deepak1556
Copy link
Contributor

Can you run with code --disable-gpu and see if it still crashes ?

@deepak1556 deepak1556 added the info-needed Issue requires more information from poster label Nov 14, 2019
@prjemian
Copy link
Author

Started with code --disable-gpu and observe no initial problems while clicking the settings gear or moving between the different items in the menu bar. Before, symptoms were displayed during these activities as shown above.

Before we declare this to be a finding, let's work with it a bit, typical activities, and see if problem recurs.

@prjemian
Copy link
Author

Here's the VirtualBox Display setup for this VM:
Clipboard01

@prjemian
Copy link
Author

restarted code as code --disable-gpu -a . and still no problems

This "works for me now". However, not closing the issue since it remains a bug. I assume you have all you need to resolve it?

@prjemian
Copy link
Author

prjemian commented Nov 14, 2019

Oh, two more things that may not have been clear about the system description:

  • VSCode is installed by the unprivileged user, not root account, in subdirectory of ~/Apps/, subdir includes the build number so I can easily revert if desired
  • linux mint Mate variant is used

@prjemian
Copy link
Author

update: worked with that (code --disable-gpu -a .) all day with no problems

Looks like a NULL pointer was not checked, perhaps related to when GPU use is enabled.

Once that line of code is found, will you follow up with Oracle VirtualBox? There is no way that a user program on linux (even in a VM) should crash the entire machine.

@prjemian
Copy link
Author

It just crashed out. Same error message. Crashes only happen when interacting with VSCode editor.

@deepak1556
Copy link
Contributor

Thanks for testing this, the fix for it has to come from chromium. I am leaving the issue open until the fix is landed in future versions, can you test our exploration build from #84574 (comment) that has newer chromium runtime to see if its fixed.

@deepak1556 deepak1556 added electron-6.0.x-update gpu Issues concerning GPU related items linux Issues with VS Code on Linux upstream Issue identified as 'upstream' component related (exists outside of VS Code) labels Nov 18, 2019
@prjemian
Copy link
Author

prjemian commented Nov 18, 2019

On it now (this version, obviously, VSCode-linux-x64-exploration-1573181432). And, thanks for being responsive!

@prjemian
Copy link
Author

Youch! Crashed right out in this many minutes! (started with code -a .)

@prjemian
Copy link
Author

Specifically, had been editing python code. Needed to configure the new app with theme and extensions (GitLens, Python). Ran debugger once. No problems yet. Edited a .coveragerc file and git commit. When trying to do the git push, got the black pop-up menu. Tried using the menubar. Help menu OK, Debug menu all black and then VM crashed.

@deepak1556
Copy link
Contributor

Thanks for the repro steps, I will see if I can narrow down the issue from upstream. Will ping back if needed addional info.

@deepak1556 deepak1556 removed the info-needed Issue requires more information from poster label Nov 18, 2019
@jmaha
Copy link

jmaha commented Jan 10, 2020

@jrial Aha, thanks for the clarification. Well I can confirm the same issue with VMWare Fusion, and also can confirm that setting the --disable-gpu flag in all VSCode processes (and disabling hardware acceleration in my Chromium-based Electron app in development) eliminates the graphical corruption -> OS crash issue described here.

@tahaimt
Copy link

tahaimt commented Feb 7, 2020

I just tried this with the latest version of VSCode on a ubuntu VM. After opening VSCode and pressing right click on a file in the side panel shows an empty context menu. Second right click crashes the VM.

@dandymon
Copy link

dandymon commented Mar 5, 2020

Same symptoms here with Centos7.
Followed these instructions insode VSCode to fix - no performance changes other than it doesn't crash!

Open the Command Palette (Ctrl+Shift+P).
Run the Preferences: Configure Runtime Arguments command. This command will open a argv.json file to configure runtime arguments.
You might see some default arguments there already.
Add
"disable-hardware-acceleration": true
Restart VS Code.

@prjemian
Copy link
Author

prjemian commented Mar 5, 2020

On my linux mint, that file is ${HOME}/.vscode/argv.json

@deepak1556 deepak1556 added upstream-issue-linked This is an upstream issue that has been reported upstream virtual-machine Issues related to virtualbox, parallels etc and removed upstream Issue identified as 'upstream' component related (exists outside of VS Code) labels Mar 11, 2020
@AndyXan
Copy link

AndyXan commented Apr 1, 2020

Also happens on Ubuntu 19.10, fully updated, latest vs code

@d-daniel
Copy link

I have the very same issue using Virtual Box and Red Hat 7.8 as the guest OS. Using VS Code version 1.44.2. The only way to make it stable is to open it with code --disable-gpu -a

@danogburn
Copy link

danogburn commented May 7, 2020

I'm having this same issue with a centos 7 vm in a virtual box. Opening right-click context menus will eventually crash the whole VM.

image

@flavio20002
Copy link

Same issue...With Linux Mint. Black popup and VM Crash.

@mathisgag
Copy link

mathisgag commented Jul 6, 2020

Related? #98924 I found an other temporary solution (with the help of a dev) switching the titleBar to Custom.

@prjemian
Copy link
Author

prjemian commented Jul 6, 2020

Yes.

@HasneinTareque
Copy link

Still experiencing the same crash when clicking VSCode menu on LinuxMint VM. VSCode menus turns black and the whole VM is crashed. Experienced each time tried to use the VSCode menu.

@studiozandra
Copy link

studiozandra commented Dec 21, 2020

Ran into the same issue (although no crash dialog pops up) with Ubuntu 20 (guest) on Windows 10 with Virtual box. After losing many hours of work time to this, I found the workaround here but it doesn't seem to be a long term solution. Edit: I guess this same issue has been present for years (here, and here)

@mathisgag
Copy link

You should check out a more permanent fix here.
Until they fix it, it's the better we got.
P.S. Can you confirm it still works.

@studiozandra
Copy link

You should check out a more permanent fix here.
Until they fix it, it's the better we got.
P.S. Can you confirm it still works.

no, it did not work for me, thanks anyway! I have finally switched to a dual boot machine.

@bongraster
Copy link

Same issue - seems like dual boot is the solution

@vivekkarne
Copy link

Same issue when working with xubuntu on virtualbox, centos works fine.

@hello-smile6
Copy link
Contributor

Same issue when working with xubuntu on virtualbox, centos works fine.

Can you reproduce with v86? https://copy.sh/v86/

If you want to try with Arch, https://copy.sh/v86/?profile=archlinux&c=.%2Fnetworking.sh%3Bdate%20--set%3D%22%60hwclock%60%22%3B.%2Fstartx.sh

@deepak1556
Copy link
Contributor

Closing as the upstream issues #84745 (comment) have not gained any momentum. Please continue to disable hardware acceleration in VSCode for this specific setup as workaround.

@deepak1556 deepak1556 closed this as not planned Won't fix, can't repro, duplicate, stale Dec 12, 2022
@prjemian
Copy link
Author

The upstream issues are cited above.

@github-actions github-actions bot locked and limited conversation to collaborators Feb 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
gpu Issues concerning GPU related items linux Issues with VS Code on Linux upstream-issue-linked This is an upstream issue that has been reported upstream virtual-machine Issues related to virtualbox, parallels etc
Projects
None yet
Development

No branches or pull requests