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

crash on resuming from suspend since update to wlroots 0.12 #5825

Closed
mvdan opened this issue Nov 18, 2020 · 8 comments
Closed

crash on resuming from suspend since update to wlroots 0.12 #5825

mvdan opened this issue Nov 18, 2020 · 8 comments
Labels
bug Not working as intended

Comments

@mvdan
Copy link

mvdan commented Nov 18, 2020

Please fill out the following:

  • Sway Version: sway version 1.5.1

  • Debug Log:

Attaching the big debug log that ends at the crash.
sway-previous.log

It ends with:

sway: types/wlr_output_management_v1.c:693: head_send_state: Assertion `head->state.mode != NULL || wl_list_empty(&head->state.output->modes)' failed.
Got sleep lock: 12
XIO:  fatal IO error 13 (Permission denied) on X server ":0"^M
      after 16 requests (16 known processed) with 0 events remaining.^M
Gdk-Message: 10:28:25.633: Error reading events from display: Broken pipe
Gdk-Message: 10:28:25.633: Error reading events from display: Broken pipe
Gdk-Message: 10:28:25.633: Error reading events from display: Broken pipe
Gdk-Message: 10:28:25.633: Error reading events from display: Broken pipe
Gdk-Message: 10:28:25.633: Error reading events from display: Broken pipe
Gdk-Message: 10:28:25.634: Error reading events from display: Broken pipe
Gdk-Message: 10:28:25.633: Error reading events from display: Broken pipe
Gdk-Message: 10:28:25.634: Error reading events from display: Broken pipe
Gdk-Message: 10:28:25.634: Error reading events from display: Broken pipe
Gdk-Message: 10:28:25.634: Error reading events from display: Broken pipe
Gdk-Message: 10:28:25.634: Error reading events from display: Broken pipe
00:00:00.000 [common/ipc-client.c:67] Unable to connect to /run/user/1000/sway-ipc.1000.1981.sock
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Sandbox: Unexpected EOF, op 2 flags 00 path /etc/localtime
Exiting due to channel error.
00:00:00.000 [common/ipc-client.c:67] Unable to connect to /run/user/1000/sway-ipc.1000.1981.sock
00:00:00.000 [common/ipc-client.c:67] Unable to connect to /run/user/1000/sway-ipc.1000.1981.sock
  • Configuration File:

https://github.com/mvdan/dotfiles/blob/1b5af4e620dd866b90f785eec4b0e00350d4a19c/.config/sway/config

  • Stack Trace:
(gdb) bt full
#0  0x00007ff636c77615 in raise () at /usr/lib/libc.so.6
#1  0x00007ff636c60862 in abort () at /usr/lib/libc.so.6
#2  0x00007ff636c60747 in _nl_load_domain.cold () at /usr/lib/libc.so.6
#3  0x00007ff636c6fbf6 in  () at /usr/lib/libc.so.6
#4  0x00007ff636edb028 in  () at /usr/lib/libwlroots.so.7
#5  0x00007ff636edd4f6 in wlr_output_manager_v1_set_configuration () at /usr/lib/libwlroots.so.7
#6  0x00007ff636ef070e in  () at /usr/lib/libwlroots.so.7
#7  0x00007ff636edd963 in wlr_output_layout_add () at /usr/lib/libwlroots.so.7
#8  0x00005647ec0bc61a in apply_output_config (oc=oc@entry=0x5647ee9b4d40, output=output@entry=0x5647ee3e0f40) at ../sway-1.5.1/sway/config/output.c:456
        wlr_output = 0x5647ee3f32b0
        output_box = <optimized out>
#9  0x00005647ec0bd6ab in apply_output_config_to_outputs (oc=0x5647edfe7bb0) at ../sway-1.5.1/sway/config/output.c:626
        current = 0x5647ee9b4d40
        name = 0x5647ee3f32e0 "eDP-1"
        wildcard = true
        id = "Unknown 0x2336 0x00000000\000\070\062\063\000\000\000\003\000\000\000\000\000\000\000\003\000\000\000\000\000\000\000 \363\347\356GV\000\000\000VW\332\002\223\272\371(\363\347\356GV\000\000\001\000\000\000\000\000\000\000`\022\345\356GV\000\000\240y\020\354GV\000\000\006", '\000' <repeats 15 times>, "\021\000\000\000\000\000\000\000\063\242\t\354GV\000"
        sway_output = 0x5647ee3e0f40
        tmp = 0x5647edfcdf40
        seat = <optimized out>
#10 0x00005647ec0c85c6 in cmd_output (argv=0x5647eee7f328, argc=0) at ../sway-1.5.1/sway/commands/output.c:108
        error = <optimized out>
        output = <optimized out>
        background = false
        error = <optimized out>
#11 cmd_output (argc=<optimized out>, argv=<optimized out>) at ../sway-1.5.1/sway/commands/output.c:29
        error = <optimized out>
#12 0x00005647ec09c007 in execute_command (_exec=<optimized out>, seat=0x5647edfce8c0, con=0x0) at ../sway-1.5.1/sway/commands.c:286
        node = <optimized out>
        res = <optimized out>
        argc = 3
        argv = 0x5647eee7f310
        handler = 0x5647ec1072a0 <handlers+576>
        cmd = <optimized out>
        matched_delim = 0 '\000'
        containers = 0x0
        exec = 0x5647eeb1b7b0 "output * enable"
        head = 0x0
        res_list = <optimized out>
        __PRETTY_FUNCTION__ = "execute_command"
#13 0x00005647ec0beb4b in seat_execute_command (seat=0x5647edfce8c0, binding=0x5647eede34f0) at ../sway-1.5.1/sway/commands/bind.c:630
        con = <optimized out>
        res_list = <optimized out>
        success = <optimized out>
#14 0x00005647ec0bf1ba in execute_binding (sway_switch=<optimized out>) at ../sway-1.5.1/sway/input/switch.c:61
        dummy_binding = 0x5647eede34f0
        seat = 0x5647edfce8c0
--Type <RET> for more, q to quit, c to continue without paging--c
        input_inhibited = <optimized out>
        bindings = <optimized out>
        matched_binding = 0x5647ee013880
#15 0x00007ff636ef070e in  () at /usr/lib/libwlroots.so.7
#16 0x00007ff636eb964a in  () at /usr/lib/libwlroots.so.7
#17 0x00007ff636f3afaa in wl_event_loop_dispatch () at /usr/lib/libwayland-server.so.0
#18 0x00007ff636f394e7 in wl_display_run () at /usr/lib/libwayland-server.so.0
#19 0x00005647ec09582f in server_run (server=<optimized out>) at ../sway-1.5.1/sway/server.c:234
        config_path = 0x0
        usage = 0x5647ec0ebdb8 "Usage: sway [options] [command]\n\n  -h, --help", ' ' <repeats 13 times>, "Show help message and quit.\n  -c, --config <config>  Specify a config file.\n  -C, --validate         Check the validity of the config file, th"...
        c = <optimized out>
        long_options = {{name = 0x5647ec0eb408 "help", has_arg = 0, flag = 0x0, val = 104}, {name = 0x5647ec0ee6fd "config", has_arg = 1, flag = 0x0, val = 99}, {name = 0x5647ec0eb40d "validate", has_arg = 0, flag = 0x0, val = 67}, {name = 0x5647ec0eb416 "debug", has_arg = 0, flag = 0x0, val = 100}, {name = 0x5647ec0eb2d4 "version", has_arg = 0, flag = 0x0, val = 118}, {name = 0x5647ec0e99cd "verbose", has_arg = 0, flag = 0x0, val = 86}, {name = 0x5647ec0eb41c "get-socketpath", has_arg = 0, flag = 0x0, val = 112}, {name = 0x5647ec0eb42b "unsupported-gpu", has_arg = 0, flag = 0x0, val = 117}, {name = 0x5647ec0eb43b "my-next-gpu-wont-be-nvidia", has_arg = 0, flag = 0x0, val = 117}, {name = 0x0, has_arg = 0, flag = 0x0, val = 0}}
        validate = 0
        debug = 1
        allow_unsupported_gpu = 0
        verbose = 0
#20 main (argc=<optimized out>, argv=<optimized out>) at ../sway-1.5.1/sway/main.c:410
        config_path = 0x0
        usage = 0x5647ec0ebdb8 "Usage: sway [options] [command]\n\n  -h, --help", ' ' <repeats 13 times>, "Show help message and quit.\n  -c, --config <config>  Specify a config file.\n  -C, --validate         Check the validity of the config file, th"...
        c = <optimized out>
        long_options = {{name = 0x5647ec0eb408 "help", has_arg = 0, flag = 0x0, val = 104}, {name = 0x5647ec0ee6fd "config", has_arg = 1, flag = 0x0, val = 99}, {name = 0x5647ec0eb40d "validate", has_arg = 0, flag = 0x0, val = 67}, {name = 0x5647ec0eb416 "debug", has_arg = 0, flag = 0x0, val = 100}, {name = 0x5647ec0eb2d4 "version", has_arg = 0, flag = 0x0, val = 118}, {name = 0x5647ec0e99cd "verbose", has_arg = 0, flag = 0x0, val = 86}, {name = 0x5647ec0eb41c "get-socketpath", has_arg = 0, flag = 0x0, val = 112}, {name = 0x5647ec0eb42b "unsupported-gpu", has_arg = 0, flag = 0x0, val = 117}, {name = 0x5647ec0eb43b "my-next-gpu-wont-be-nvidia", has_arg = 0, flag = 0x0, val = 117}, {name = 0x0, has_arg = 0, flag = 0x0, val = 0}}
        validate = 0
        debug = 1
        allow_unsupported_gpu = 0
        verbose = 0
  • Description:

I closed the laptop lid, which suspends it and triggers swayidle. When opening the lid again to awake it, sway opens an entirely new session, seemingly because it crashed.

Note that I use kanshi too, which might be related. But in general, this started happening in the past few days, which aligns with Arch Linux upgrading to wlroots 0.12.0.

This issue might be a duplicate of #5198 and perhaps #4862 too, but the stack trace doesn't look exactly the same.

@mvdan mvdan added the bug Not working as intended label Nov 18, 2020
@emersion
Copy link
Member

The backtrace you provided doesn't contain debug symbols. This most likely happens because the Sway binary you're using doesn't have debug information bundled.

Can you try again with a manually compiled Sway binary? See https://github.com/swaywm/sway/wiki/Development-Setup#compiling-as-a-subproject

@mvdan
Copy link
Author

mvdan commented Nov 18, 2020

Thanks, I'll try. I wondered if that was the case, but the instructions mentioned question marks and I saw none. You can tell I'm not used to gdb :)

@mvdan
Copy link
Author

mvdan commented Nov 18, 2020

I've built with debug symbols and enabled debug logging, so at the next crash I'll edit the original post to include the extra information. It might be tomorrow as it's getting late.

Edit: suspended a handful of times today, and no crashes. Hm.

@mvdan
Copy link
Author

mvdan commented Nov 21, 2020

Okay, it finally happened again, after an overnight suspend. I think it only triggers when a significant amount of time has passed. Over the past few days I did multiple suspends under an hour and I didn't see crashes.

I'm updating the original post with the debug details, FYI @emersion.

@emersion
Copy link
Member

Maybe related to swaywm/wlroots#2199

@mvdan
Copy link
Author

mvdan commented Nov 23, 2020

Perhaps - I do run both swayidle and kanshi. Though I've only started seeing the crash very recently.

@mvdan
Copy link
Author

mvdan commented Mar 27, 2021

I've been running wlroots+sway master for a couple of days, resuming three times so far, and for now I haven't seen any crashes. It's too early to tell if the issue is fixed though, as sometimes I would go entire weeks without getting a crash. If I don't see another crash in a couple of weeks, I'll close this issue as having been fixed at some point since the last release :)

@mvdan
Copy link
Author

mvdan commented Apr 5, 2021

It's been another ten days and still no crashes, so I'm closing this as fixed. Thanks again!

I think the fix for swaywm/wlroots#2199 also fixed this issue.

@mvdan mvdan closed this as completed Apr 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Not working as intended
Development

No branches or pull requests

2 participants