VS Code crashes Wayland

Everything about X, Gnome, KDE, ... and everything running on it

VS Code crashes Wayland

Postby HankB » 2018-08-19 19:33

The latest version of Visual Studio Code (1.26.1-1534444688 installed as a snap package) reliably crashes the Gnome desktop on startup. It never even gets to the point where the VS Code window appears. I'm not sure whether the fault lies with Wayland, Gnome or VS Code but Wayland leaves a core file in my home directory so that seems like a good place to start.

Here's what I have:
Debian testing (on a ZFS root.) I rolled back a few days to where VS code was at 1.25 and it did not exhibit this problem. Shortly after, the desktop crashed (leaving me at the GDM login prompt) and when I logged in, I found that VS Code had been upgraded to 1.26.
Wayland related packages:
Code: Select all
hbarta@rocinante:~$ dpkg -l|grep -i wayland
ii  libwayland-client0:amd64              1.15.0-2                                amd64        wayland compositor infrastructure - client library
ii  libwayland-cursor0:amd64              1.15.0-2                                amd64        wayland compositor infrastructure - cursor library
ii  libwayland-egl1:amd64                 1.15.0-2                                amd64        wayland compositor infrastructure - EGL library
ii  libwayland-egl1-mesa:amd64            18.1.5-1                                amd64        transitional dummy package
ii  libwayland-server0:amd64              1.15.0-2                                amd64        wayland compositor infrastructure - server library
ii  xwayland                              2:1.20.0-3                              amd64        Xwayland X server
hbarta@rocinante:~$


Gnome related packages
Code: Select all
hbarta@rocinante:~$ dpkg -l|grep gnome
ii  chrome-gnome-shell                    9-1                                     all          GNOME Shell extensions integration for web browsers
ii  gir1.2-gnomebluetooth-1.0:amd64       3.28.0-2                                amd64        Introspection data for GnomeBluetooth
ii  gir1.2-gnomedesktop-3.0:amd64         3.28.2-2                                amd64        Introspection data for GnomeDesktop
ii  gkbd-capplet                          3.26.0-3                                amd64        GNOME control center tools for libgnomekbd
ii  gnome                                 1:3.22+9                                amd64        Full GNOME Desktop Environment, with extra components
ii  gnome-accessibility-themes            3.28-1                                  all          High Contrast GTK+ 2 theme and icons
ii  gnome-backgrounds                     3.28.0-1                                all          Set of backgrounds packaged with the GNOME desktop
ii  gnome-bluetooth                       3.28.0-2                                amd64        GNOME Bluetooth tools
ii  gnome-calculator                      3.28.2-1                                amd64        GNOME desktop calculator
ii  gnome-calendar                        3.28.2-1                                amd64        Calendar application for GNOME
ii  gnome-characters                      3.28.2-1                                amd64        character map application
ii  gnome-chess                           1:3.28.1-1                              amd64        simple chess game
ii  gnome-clocks                          3.28.0-1                                amd64        Simple GNOME app with stopwatch, timer, and world clock support
ii  gnome-color-manager                   3.28.0-1                                amd64        Color management integration for the GNOME desktop environment
ii  gnome-contacts                        3.28.2-1                                amd64        Contacts manager for GNOME
ii  gnome-control-center                  1:3.28.2-1                              amd64        utilities to configure the GNOME desktop
ii  gnome-control-center-data             1:3.28.2-1                              all          configuration applets for GNOME - data files
ii  gnome-core                            1:3.22+9                                amd64        GNOME Desktop Environment -- essential components
ii  gnome-desktop3-data                   3.28.2-2                                all          Common files for GNOME desktop apps
ii  gnome-disk-utility                    3.28.3-1                                amd64        manage and configure disk drives and media
ii  gnome-documents                       3.28.0-1                                amd64        Document manager for GNOME
ii  gnome-font-viewer                     3.28.0-1                                amd64        font viewer for GNOME
ii  gnome-games                           1:3.22+9                                all          games for the GNOME desktop
ii  gnome-getting-started-docs            3.28.2-1                                all          Help a new user get started in GNOME
ii  gnome-icon-theme                      3.12.0-3                                all          GNOME Desktop icon theme
ii  gnome-keyring                         3.28.0.2-1                              amd64        GNOME keyring services (daemon and tools)
ii  gnome-keyring-pkcs11:amd64            3.28.0.2-1                              amd64        GNOME keyring module for the PKCS#11 module loading library
ii  gnome-klotski                         1:3.22.3-1                              amd64        Klotski puzzle game for GNOME
ii  gnome-logs                            3.28.2-1                                amd64        viewer for the systemd journal
ii  gnome-mahjongg                        1:3.22.0-3                              amd64        classic Eastern tile game for GNOME
ii  gnome-maps                            3.28.2-1                                amd64        map application for GNOME
ii  gnome-menus                           3.13.3-11                               amd64        GNOME implementation of the freedesktop menu specification
ii  gnome-mines                           1:3.28.0-1                              amd64        popular minesweeper puzzle game for GNOME
ii  gnome-music                           3.28.2.1-1                              amd64        Music is the new GNOME music playing application
ii  gnome-nibbles                         1:3.24.0-3+b1                           amd64        snake game, up to four players
ii  gnome-online-accounts                 3.28.0-1                                amd64        service to manage online accounts for the GNOME desktop
ii  gnome-online-miners                   3.26.0-3                                amd64        Crawls through your online content
ii  gnome-orca                            3.28.1-3                                all          Scriptable screen reader - transitional package
ii  gnome-robots                          1:3.22.3-1                              amd64        improved old BSD robots game
ii  gnome-screenshot                      3.26.0-3                                amd64        screenshot application for GNOME
ii  gnome-session                         3.28.1-1                                all          GNOME Session Manager - GNOME 3 session
ii  gnome-session-bin                     3.28.1-1                                amd64        GNOME Session Manager - Minimal runtime
ii  gnome-session-common                  3.28.1-1                                all          GNOME Session Manager - common files
ii  gnome-settings-daemon                 3.28.1-1                                amd64        daemon handling the GNOME session settings
ii  gnome-shell                           3.28.3-1                                amd64        graphical shell for the GNOME desktop
ii  gnome-shell-common                    3.28.3-1                                all          common files for the GNOME graphical shell
ii  gnome-shell-extension-dashtodock      63-1                                    all          dash-to-dock extension for GNOME shell
ii  gnome-shell-extensions                3.29.3+really3.28.1-1                   all          Extensions to extend functionality of GNOME Shell
ii  gnome-software                        3.28.2-1                                amd64        Software Center for GNOME
ii  gnome-software-common                 3.28.2-1                                all          Software Center for GNOME (common files)
ii  gnome-sound-recorder                  3.28.1-1                                amd64        simple and modern sound recorder for GNOME
ii  gnome-sudoku                          1:3.28.0-1                              amd64        Sudoku puzzle game for GNOME
ii  gnome-sushi                           3.28.3-1                                amd64        sushi is a quick previewer for nautilus
ii  gnome-system-monitor                  3.28.2-1                                amd64        Process viewer and system resource monitor for GNOME
ii  gnome-taquin                          3.28.0-1                                amd64        game to move tiles so that they reach their places
ii  gnome-terminal                        3.28.2-1                                amd64        GNOME terminal emulator application
ii  gnome-terminal-data                   3.28.2-1                                all          Data files for the GNOME terminal emulator
ii  gnome-tetravex                        1:3.22.0-2                              amd64        put tiles on a board and match their edges together
ii  gnome-themes-extra:amd64              3.28-1                                  amd64        Adwaita GTK+ 2 theme — engine
ii  gnome-themes-extra-data               3.28-1                                  all          Adwaita GTK+ 2 theme — common files
ii  gnome-todo                            3.28.1-1                                amd64        minimalistic personal task manager designed to fit GNOME desktop
ii  gnome-todo-common                     3.28.1-1                                all          common files for GNOME To Do
ii  gnome-tweak-tool                      3.28.1-1                                all          adjust advanced settings for GNOME - transitional package
ii  gnome-tweaks                          3.28.1-1                                all          tool to adjust advanced configuration settings for GNOME
ii  gnome-user-docs                       3.28.2-1                                all          GNOME user docs
ii  gnome-user-share                      3.18.3-3                                amd64        User level public file sharing via WebDAV
ii  gnome-video-effects                   0.4.3-2                                 all          Collection of GStreamer effects
ii  gnome-weather                         3.26.0-4                                all          access current conditions and forecasts
ii  libgnome-autoar-0-0:amd64             0.2.3-1                                 amd64        Archives integration support for GNOME
ii  libgnome-autoar-gtk-0-0:amd64         0.2.3-1                                 amd64        GTK+ widgets for the GNOME Autoar library
ii  libgnome-bluetooth13:amd64            3.28.0-2                                amd64        GNOME Bluetooth tools - support library
ii  libgnome-desktop-3-17:amd64           3.28.2-2                                amd64        Utility library for loading .desktop files - runtime files
ii  libgnome-games-support-1-3:amd64      1.4.1-1                                 amd64        library for common functions of GNOME games
ii  libgnome-games-support-common         1.4.1-1                                 all          library for common functions of GNOME games (common files)
ii  libgnome-menu-3-0:amd64               3.13.3-11                               amd64        GNOME implementation of the freedesktop menu specification
ii  libgnome-todo                         3.28.1-1                                amd64        library data for GNOME To Do
ii  libgnomekbd-common                    3.26.0-3                                all          GNOME library to manage keyboard configuration - common files
ii  libgnomekbd8:amd64                    3.26.0-3                                amd64        GNOME library to manage keyboard configuration - shared library
ii  libpam-gnome-keyring:amd64            3.28.0.2-1                              amd64        PAM module to unlock the GNOME keyring upon login
ii  libreoffice-gnome                     1:6.1.0-1                               amd64        office productivity suite -- GNOME integration
ii  libsoup-gnome2.4-1:amd64              2.62.2-2                                amd64        HTTP library implementation in C -- GNOME support library
ii  nautilus-extension-gnome-terminal     3.28.2-1                                amd64        GNOME terminal emulator application
ii  network-manager-gnome                 1.8.14-1                                amd64        network management framework (GNOME frontend)
ii  pinentry-gnome3                       1.1.0-1+b1                              amd64        GNOME 3 PIN or pass-phrase entry dialog for GnuPG
ii  policykit-1-gnome                     0.105-7                                 amd64        authentication agent for PolicyKit
ii  task-gnome-desktop                    3.44                                    all          GNOME
hbarta@rocinante:~$


Info from the core
Code: Select all
hbarta@rocinante:~$ file core
core: ELF 64-bit LSB core file, x86-64, version 1 (SYSV), SVR4-style, from '/usr/bin/Xwayland :0 -rootless -terminate -accessx -core -listen 4 -listen 5 -d', real uid: 1000, effective uid: 1000, real gid: 1000, effective gid: 1000, execfn: '/usr/bin/Xwayland', platform: 'x86_64'
hbarta@rocinante:~$ gdb /usr/bin/Xwayland  core
GNU gdb (Debian 8.1-4) 8.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/bin/Xwayland...(no debugging symbols found)...done.
[New LWP 7205]
[New LWP 7209]
[New LWP 7210]
[New LWP 7208]
[New LWP 7211]
[New LWP 7214]
[New LWP 7206]
[New LWP 7207]
[New LWP 7212]
[New LWP 7213]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/bin/Xwayland :0 -rootless -terminate -accessx -core -listen 4 -listen 5 -d'.
Program terminated with signal SIGABRT, Aborted.
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51   ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
[Current thread is 1 (Thread 0x7f8196b09640 (LWP 7205))]
(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1  0x00007f8198a052f1 in __GI_abort () at abort.c:79
#2  0x000055ce5a8ecd4a in OsAbort ()
#3  0x000055ce5a8f28e3 in ?? ()
#4  0x000055ce5a8f3705 in FatalError ()
#5  0x000055ce5a8e9de3 in ?? ()
#6  <signal handler called>
#7  0x00007f818f517fd0 in ?? () from /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#8  0x00007f818f47eb01 in ?? () from /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#9  0x00007f818f40dc4a in ?? () from /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#10 0x00007f818f40dc7e in ?? () from /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#11 0x00007f818f40dd29 in ?? () from /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#12 0x00007f818f37a742 in ?? () from /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#13 0x00007f818f524d7d in ?? () from /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#14 0x00007f818f6ec959 in ?? () from /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#15 0x00007f818f6eb8e3 in ?? () from /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#16 0x000055ce5a80ff69 in ?? ()
#17 0x000055ce5a80ed7b in ?? ()
#18 0x000055ce5a8d8912 in ?? ()
#19 0x000055ce5a813f39 in ?? ()
#20 0x000055ce5a8f8705 in ?? ()
#21 0x000055ce5a8b3f18 in ?? ()
#22 0x000055ce5a8b7f18 in ?? ()
#23 0x00007f81989f0b17 in __libc_start_main (main=0x55ce5a78b520, argc=12, argv=0x7ffed31bfd68, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>,
    stack_end=0x7ffed31bfd58) at ../csu/libc-start.c:310
#24 0x000055ce5a78b55a in _start ()
(gdb)

This would probably be useful if I knew how to install debug symbols but I do not.

I'm not sure where to go with this. I recognize it is a cost of running Testing. It seems to me that the information might be useful to someone, but I'm not sure where to provide that. Suggestions are appreciated.

Thanks!

Edit.1 I can confirm that the desktop does not crash under X11. There is also a startup timing difference. Under Wayland it takes longer (a second or two) before `code` detaches from the terminal. Under X11 it is almost instant.
HankB
 
Posts: 33
Joined: 2012-03-07 15:15

Re: VS Code crashes Wayland

Postby Head_on_a_Stick » 2018-08-19 19:49

HankB wrote:This would probably be useful if I knew how to install debug symbols but I do not.

Install the packages from the debian-debug repositories, they all have the debugging symbols enabled:

https://deb.debian.org/
User avatar
Head_on_a_Stick
 
Posts: 8004
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: VS Code crashes Wayland

Postby HankB » 2018-08-20 01:59

Thanks, I got the debug symbols installed and now see:
Code: Select all
hbarta@rocinante:~$ gdb /usr/bin/Xwayland  core
GNU gdb (Debian 8.1-4) 8.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/bin/Xwayland...Reading symbols from /usr/lib/debug/.build-id/fb/f459ae1cf7c4e68f3b4ba98d39573c98b3fd8b.debug...done.
done.
[New LWP 4161]
[New LWP 4166]
[New LWP 4168]
[New LWP 4169]
[New LWP 4167]
[New LWP 4172]
[New LWP 4170]
[New LWP 4173]
[New LWP 4162]
[New LWP 4171]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
bCore was generated by `/usr/bin/Xwayland :0 -rootless -terminate -accessx -core -listen 4 -listen 5 -d'.
Program terminated with signal SIGABRT, Aborted.
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51   ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
[Current thread is 1 (Thread 0x7f81182c9640 (LWP 4161))]
(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1  0x00007f811a1c52f1 in __GI_abort () at abort.c:79
#2  0x000055693b24fd4a in OsAbort () at ../../../../os/utils.c:1350
#3  0x000055693b2558e3 in AbortServer () at ../../../../os/log.c:877
#4  0x000055693b256705 in FatalError (f=f@entry=0x55693b279610 "Caught signal %d (%s). Server aborting\n") at ../../../../os/log.c:1015
#5  0x000055693b24cde3 in OsSigHandler (signo=11, sip=<optimized out>, unused=<optimized out>) at ../../../../os/osinit.c:156
#6  <signal handler called>
#7  0x00007f811539afe0 in st_renderbuffer_delete (ctx=0x55693cddc270, rb=0x55693d43c010) at ../../../src/mesa/state_tracker/st_cb_fbo.c:239
#8  0x00007f8115301b11 in _mesa_reference_renderbuffer_ (ptr=ptr@entry=0x55693d43bcd8, rb=rb@entry=0x0) at ../../../src/mesa/main/renderbuffer.c:212
#9  0x00007f8115290c5a in _mesa_reference_renderbuffer (rb=0x0, ptr=0x55693d43bcd8) at ../../../src/mesa/main/renderbuffer.h:72
#10 _mesa_free_framebuffer_data (fb=fb@entry=0x55693d43bb90) at ../../../src/mesa/main/framebuffer.c:223
#11 0x00007f8115290c8e in _mesa_destroy_framebuffer (fb=0x55693d43bb90) at ../../../src/mesa/main/framebuffer.c:199
#12 0x00007f8115290d39 in _mesa_reference_framebuffer_ (ptr=ptr@entry=0x55693d2b8180, fb=fb@entry=0x0) at ../../../src/mesa/main/framebuffer.c:256
#13 0x00007f81151fd752 in _mesa_reference_framebuffer (fb=0x0, ptr=0x55693d2b8180) at ../../../src/mesa/main/framebuffer.h:63
#14 _mesa_free_context_data (ctx=ctx@entry=0x55693d2b8070) at ../../../src/mesa/main/context.c:1320
#15 0x00007f81153a7d8d in st_destroy_context (st=0x55693d436060) at ../../../src/mesa/state_tracker/st_context.c:659
#16 0x00007f811556f999 in dri_destroy_context () at ../../../../../src/gallium/state_trackers/dri/dri_context.c:239
#17 0x00007f811556e923 in driDestroyContext (pcp=0x55693d239af0) at ../../../../../../src/mesa/drivers/dri/common/dri_util.c:532
#18 0x000055693b172f69 in __glXDRIcontextDestroy (baseContext=0x55693d239a20) at ../../../../glx/glxdriswrast.c:132
#19 0x000055693b171d7b in __glXFreeContext (cx=0x55693d239a20) at ../../../../glx/glxext.c:190
#20 ContextGone (cx=0x55693d239a20, id=<optimized out>) at ../../../../glx/glxext.c:82
#21 0x000055693b23b912 in doFreeResource (res=0x55693d43bb50, skip=skip@entry=0) at ../../../../dix/resource.c:880
#22 0x000055693b23c606 in FreeResourceByType (id=<optimized out>, type=<optimized out>, skipFree=skipFree@entry=0) at ../../../../dix/resource.c:941
#23 0x000055693b176f39 in __glXDisp_DestroyContext (cl=<optimized out>, pc=0x55693d23a970 "\227\004\002") at ../../../../glx/glxcmds.c:437
#24 0x000055693b25b705 in dispatch_DestroyContext (client=0x55693d25e910) at ../../../../glx/vnd_dispatch_stubs.c:82
#25 0x000055693b216f18 in Dispatch () at ../../../../dix/dispatch.c:478
#26 0x000055693b21af18 in dix_main (argc=12, argv=0x7ffdb65c2468, envp=<optimized out>) at ../../../../dix/main.c:276
#27 0x00007f811a1b0b17 in __libc_start_main (main=0x55693b0ee520 <main>, argc=12, argv=0x7ffdb65c2468, init=<optimized out>, fini=<optimized out>,
    rtld_fini=<optimized out>, stack_end=0x7ffdb65c2458) at ../csu/libc-start.c:310
#28 0x000055693b0ee55a in _start ()
(gdb)


Where can I put this where it will be useful to someone developing Wayland (or Mesa.)

Thanks again.
HankB
 
Posts: 33
Joined: 2012-03-07 15:15

Re: VS Code crashes Wayland

Postby pylkko » 2018-08-20 03:38

User avatar
pylkko
 
Posts: 1335
Joined: 2014-11-06 19:02

Re: VS Code crashes Wayland

Postby Head_on_a_Stick » 2018-08-20 04:58

Debian has a reportbug package that helps formalise the process.
User avatar
Head_on_a_Stick
 
Posts: 8004
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: VS Code crashes Wayland

Postby HankB » 2018-08-20 11:03

Thank you both. I'll be studying all of those links to see if I can figure out the most effective way to proceed.

Thanks!
HankB
 
Posts: 33
Joined: 2012-03-07 15:15

Re: VS Code crashes Wayland

Postby Wheelerof4te » 2018-08-20 14:47

Well, since you already got your answers, I'll provide the following simple, but true equation:
Code: Select all
foo crashes wayland

where foo equals *anything*.
User avatar
Wheelerof4te
 
Posts: 1134
Joined: 2015-08-30 20:14


Return to Desktop & Multimedia

Who is online

Users browsing this forum: Fluke667 and 2 guests

fashionable