wlroots icon indicating copy to clipboard operation
wlroots copied to clipboard

SEGFAULT on launch of sway: SEGV (/usr/lib/libgbm.so.1+0x3962)

Open Tormen opened this issue 5 years ago • 2 comments

When I currently start sway now, no matter what version, it always segfaults right away.

I believe this bug will go away when I restart my machine. I'll hold off for now on doing that, but will have to reboot the machine in 24h from now.

  • sway version: sway version 1.1-rc1-34-g5b1a8d62 (Jun 9 2019, branch 'master')
  • wlroots version (aur package wlroots-git): 0.6.0.r34.gd201fc35-1
  • coredump of sway with bt-full: http://sprunge.us/WpYSSQ
  • sway.log of sway -d -c /etc/sway/config: http://sprunge.us/cIRVRx
  • /etc/sway/config: http://sprunge.us/DeGrCO

wlroots has migrated to gitlab.freedesktop.org. This issue has been moved to:

https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/1718

Tormen avatar Jun 09 '19 20:06 Tormen

coredump of sway with bt-full

Red herring. When an executable is compiled with ASan (meson build -Db_sanitize=address) it won't produce coredumps (stack traces will be included in the log instead). So this stack trace is from a previous crash.

So the interesting part is sway.log. libinput fails to initialize because it doesn't find any input devices, but then destroying the DRM backend segfaults:

2019-06-09 21:18:15 - [backend/libinput/backend.c:55] Initializing libinput
2019-06-09 21:18:16 - [backend/libinput/backend.c:84] libinput initialization failed, no input devices
2019-06-09 21:18:16 - [backend/libinput/backend.c:85] Set WLR_LIBINPUT_NO_DEVICES=1 to suppress this check
2019-06-09 21:18:16 - [backend/multi/backend.c:32] Failed to initialize backend.
2019-06-09 21:18:16 - [sway/server.c:192] Failed to start backend
2019-06-09 21:18:16 - [sway/tree/output.c:258] Disabling output 'eDP-1'
2019-06-09 21:18:16 - [sway/tree/workspace.c:161] Destroying workspace '1'
2019-06-09 21:18:16 - [sway/desktop/transaction.c:412] Transaction 0x604000046890 committing with 2 instructions
2019-06-09 21:18:16 - [sway/desktop/transaction.c:280] Applying transaction 0x604000046890
2019-06-09 21:18:16 - [sway/tree/output.c:278] Destroying output 'eDP-1'
2019-06-09 21:18:16 - [sway/desktop/transaction.c:412] Transaction 0x6040000468d0 committing with 1 instructions
2019-06-09 21:18:16 - [sway/desktop/transaction.c:280] Applying transaction 0x6040000468d0
2019-06-09 21:18:16 - [backend/drm/drm.c:1591] Emitting destruction signal for 'eDP-1'
2019-06-09 21:18:16 - [backend/drm/drm.c:1007] De-allocating CRTC 0 for output 'eDP-1'
2019-06-09 21:18:16 - [backend/drm/atomic.c:38] Atomic test failed: Permission denied
2019-06-09 21:18:16 - [backend/drm/atomic.c:55] eDP-1: Atomic commit failed (modeset): Permission denied
AddressSanitizer:DEADLYSIGNAL
=================================================================
==19060==ERROR: AddressSanitizer: SEGV on unknown address 0x61603f000217 (pc 0x7f5ab5793963 bp 0x606000020720 sp 0x7ffe32b118c8 T0)
==19060==The signal is caused by a READ memory access.
    #0 0x7f5ab5793962  (/usr/lib/libgbm.so.1+0x3962)
    #1 0x7f5aabd01d82  (/usr/lib/dri/i965_dri.so+0x1a0d82)
    #2 0x7f5aabd01dec  (/usr/lib/dri/i965_dri.so+0x1a0dec)
    #3 0x7f5aad032a3e  (/usr/lib/../lib/libEGL_mesa.so.0+0x1ca3e)
    #4 0x7f5aad021488 in eglMakeCurrent (/usr/lib/../lib/libEGL_mesa.so.0+0xb488)
    #5 0x7f5ab57ce6c0  (/usr/lib/libEGL.so.1+0x36c0)
    #6 0x7f5ab664d1f0 in wlr_egl_make_current ../render/egl.c:333
    #7 0x7f5ab664e3f0 in gles2_destroy ../render/gles2/renderer.c:367
    #8 0x7f5ab663e1d1 in finish_drm_renderer ../backend/drm/renderer.c:57
    #9 0x7f5ab6639b1d in backend_destroy ../backend/drm/backend.c:51
    #10 0x7f5ab6643a7f in multi_backend_destroy ../backend/multi/backend.c:54
    #11 0x56165e806a7c in server_start ../sway/server.c:193
    #12 0x56165e805275 in main ../sway/main.c:384
    #13 0x7f5ab63eace2 in __libc_start_main (/usr/lib/libc.so.6+0x23ce2)
    #14 0x56165e7e612d in _start (/data/appData/archlinux/sway-git/src/sway/build/sway/sway+0x3912d)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (/usr/lib/libgbm.so.1+0x3962) 
==19060==ABORTING
2019-06-09 21:18:16 - [swaybg/main.c:521] Missing a required Wayland interface

emersion avatar Jun 09 '19 20:06 emersion

Red herring. When an executable is compiled with ASan (meson build -Db_sanitize=address) it won't produce coredumps

OK, thanks! :))

FYI: After going to standby (systemctl suspend) and coming back from it, the problem was gone.

Tormen avatar Jun 10 '19 09:06 Tormen