swaywm / sway

i3-compatible Wayland compositor
https://swaywm.org
MIT License
14.74k stars 1.11k forks source link

Sway coredump in wl_event_loop_dispatch #6505

Open sochotnicky opened 3 years ago

sochotnicky commented 3 years ago

Please fill out the following:

#0  0x00007fc80fda79e0 in wl_event_loop_dispatch (loop=0x55aa4ccbb5d0, timeout=timeout@entry=-1) at ../wayland-1.19.0/src/event-loop.c:1027
1027                source->interface->dispatch(source, &ep[i]);
[Current thread is 1 (Thread 0x7fc80ed829c0 (LWP 1890))]
(gdb) bt full
#0  0x00007fc80fda79e0 in wl_event_loop_dispatch (loop=0x55aa4ccbb5d0, timeout=timeout@entry=-1) at ../wayland-1.19.0/src/event-loop.c:1027
        ep = 
              {{events = 1, data = {ptr = 0x55aa4d647ee0, fd = 1298431712, u32 = 1298431712, u64 = 94189931232992}}, {events = 17, data = {ptr = 0x55aa4dfcaf50, fd = 1308405584, u32 = 1308405584, u64 = 94189941206864}}, {events = 956358912, data = {ptr = 0x55aa7f7f33b8, fd = 2139042744, u32 = 2139042744, u64 = 94190771844024}}, {events = 1, data = {ptr = 0x55aa4e5bd2b0, fd = 1314640560, u32 = 1314640560, u64 = 94189947441840}}, {events = 37108032, data = {ptr = 0x2000007ffe, fd = 32766, u32 = 32766, u64 = 137438986238}}, {events = 0, data = {ptr = 0x55aa4e5c02c8, fd = 1314652872, u32 = 1314652872, u64 = 94189947454152}}, {events = 1314644664, data = {ptr = 0x2363980000055aa, fd = 21930, u32 = 21930, u64 = 159378058736850346}}, {events = 32766, data = {ptr = 0x7fc80fda8047 <wl_connection_flush+295>, fd = 265977927, u32 = 265977927, u64 = 140497236164679}}, {events = 1, data = {ptr = 0x204e436990, fd = 1313040784, u32 = 1313040784, u64 = 138751994256}}, {events = 0, data = {ptr = 0x7ffe023639a0, fd = 37108128, u32 = 37108128, u64 = 140728935528864}}, {events = 1, data = {ptr = 0x78a534, fd = 7906612, u32 = 7906612, u64 = 7906612}}, {events = 0, data = {ptr = 0x55aa00000000, fd = 0, u32 = 0, u64 = 94188632801280}}, {events = 37108096, data = {ptr = 0x100007ffe, fd = 32766, u32 = 32766, u64 = 4295000062}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 1, data = {ptr = 0x55aa4e69e8c0, fd = 1315563712, u32 = 1315563712, u64 = 94189948364992}}, {events = 1314645996, data = {ptr = 0x20000055aa, fd = 21930, u32 = 21930, u64 = 137438975402}}, {events = 0, data = {ptr = 0x55aa4e5be2b8, fd = 1314644664, u32 = 1314644664, u64 = 94189947445944}}, {events = 740, data = {ptr = 0x1400000000, fd = 0, u32 = 0, u64 = 85899345920}}, {events = 0, data = {ptr = 0x100000001, fd = 1, u32 = 1, u64 = 4294967297}}, {events = 94, data = {ptr = 0xc400000096, fd = 150, u32 = 150, u64 = 841813590166}}, {events = 223, data = {ptr = 0xfd000000ee, fd = 238, u32 = 238, u64 = 1086626726126}}, {events = 268, data = {ptr = 0x12a0000011b, fd = 283, u32 = 283, u64 = 1279900254491}}, {events = 313, data = {ptr = 0x1560000005e, fd = 94, u32 = 94, u64 = 1468878815326}}, {events = 357, data = {ptr = 0x18300000174, fd = 372, u32 = 372, u64 = 1662152343924}}, {events = 191, data = {ptr = 0x19400000137, fd = 311, u32 = 311, u64 = 1735166787895}}, {events = 419, data = {ptr = 0x55aa000001b2, fd = 434, u32 = 434, u64 = 94188632801714}}, {events = 1, data = {ptr = 0x55aa4e448990, fd = 1313114512, u32 = 1313114512, u64 = 94189945915792}}, {events = 1, data = {ptr = 0x55aa4e4d0200, fd = 1313669632, u32 = 1313669632, u64 = 94189946470912}}, {events = 1, data = {ptr = 0x55aa4e69e8c0, fd = 1315563712, u32 = 1315563712, u64 = 94189948364992}}, {events = 956358912, data = {ptr = 0x55aa7f7f33b8, fd = 2139042744, u32 = 2139042744, u64 = 94190771844024}}, {events = 1, data = {ptr = 0x55aa4e53dce0, fd = 1314118880, u32 = 1314118880, u64 = 94189946920160}}}
        source = 0x55aa4dfcaf50
        i = 1
        count = <optimized out>
        has_timers = <optimized out>
#1  0x00007fc80fda53e5 in wl_display_run (display=0x55aa4ccc1c90) at ../wayland-1.19.0/src/wayland-server.c:1351
#2  0x000055aa4c35a690 in server_run (server=server@entry=0x55aa4c3c2360 <server>) at ../sway-1.6.1/sway/server.c:254
#3  0x000055aa4c34eaf1 in main (argc=2, argv=0x7ffe02363c18) at ../sway-1.6.1/sway/main.c:433
        verbose = 0
        debug = 0
        validate = 0
        allow_unsupported_gpu = 1
        long_options = 
            {{name = 0x55aa4c3a2423 "help", has_arg = 0, flag = 0x0, val = 104}, {name = 0x55aa4c3a5d09 "config", has_arg = 1, flag = 0x0, val = 99}, {name = 0x55aa4c3a2428 "validate", has_arg = 0, flag = 0x0, val = 67}, {name = 0x55aa4c3a2431 "debug", has_arg = 0, flag = 0x0, val = 100}, {name = 0x55aa4c3a2387 "version", has_arg = 0, flag = 0x0, val = 118}, {name = 0x55aa4c3a14f7 "verbose", has_arg = 0, flag = 0x0, val = 86}, {name = 0x55aa4c3a2437 "get-socketpath", has_arg = 0, flag = 0x0, val = 112}, {name = 0x55aa4c3a2446 "unsupported-gpu", has_arg = 0, flag = 0x0, val = 117}, {name = 0x55aa4c3a2456 "my-next-gpu-wont-be-nvidia", has_arg = 0, flag = 0x0, val = 117}, {name = 0x0, has_arg = 0, flag = 0x0, val = 0}}
        config_path = 0x0
        usage = 0x55aa4c3a27c8 "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>
sochotnicky commented 3 years ago

sway.stderr.log.ERROR.gz

I captured the logs so attaching the last part (basically the log starts with wlsunset lowering temperature over a fairly long time - and I think what happens next is that some notifications arrive and layer shell surface appears to display them. And that's when all hell breaks loose? At that point I am pretty sure the monitors were turned off and swaylock was running etc.

Later on I will try to reproduce by locking/turning off displays and spamming a few notifications over ssh to see if I can crash things that way?

sochotnicky commented 3 years ago

Actually - I can reproduce the coredump situation if I kill Xwayland. So I think this might be 2 separate issues - one that causes XWayland to crash for whatever reason, and the second - that when XWayland crashes sway goes down too?

I think this is going to be similar (or perhaps even duplicate of): https://github.com/swaywm/sway/issues/6247 (and few other XWayland related issues).

For completeness - I am running Xwayland 21.1.2

sochotnicky commented 3 years ago

I am attaching a different log (complete with no trimming) where I did following:

sway-full-error-30s.log.gz

sochotnicky commented 3 years ago

Duh, it seems like this problem is back: https://github.com/swaywm/sway/issues/5836 - best I can tell it looks the same. Of course normally I don't go around killing Xwayland but obviously it sometimes happens (and with disasterous consequences)

RobinMcCorkell commented 3 years ago

I'm also seeing crashes when killing Xwayland on Sway 1.6: sway-coredump.txt