swaywm / wlroots

A modular Wayland compositor library
https://gitlab.freedesktop.org/wlroots/wlroots/
MIT License
2.15k stars 342 forks source link

Freeze when pasting from keepassxc into Firefox (Xwayland) #1651

Open YaLTeR opened 5 years ago

YaLTeR commented 5 years ago

This is a relatively rare freeze which sometimes occurs when pasting a password from keepassxc to Firefox (both Xwayland clients). This time I managed to switch to a different VT via SysRq, attach GDB and get a backtrace and a core dump.

(gdb) bt full
#0  0x00007f31e763c204 in wl_list_length () at /usr/lib/libwayland-server.so.0
#1  0x00007f31e75ab0fd in xwm_selection_send_data (mime_type=0x55635c35f270 "text/plain;charset=utf-8", req=0x55635be8cfd0, selection=0x55635c0dfe30) at ../xwayland/selection/outgoing.c:309
        mime_types = <optimized out>
        found = true
        mime_type_ptr = <optimized out>
        transfer = 0x55635e4fd420
        p = {548726, 548727}
        mime_type = 0x55635c35f270 "text/plain;charset=utf-8"
        selection = 0x55635c0dfe30
#2  0x00007f31e75ab0fd in xwm_handle_selection_request (xwm=<optimized out>, req=0x55635be8cfd0) at ../xwayland/selection/outgoing.c:416
        mime_type = 0x55635c35f270 "text/plain;charset=utf-8"
        selection = 0x55635c0dfe30
#3  0x00007f31e75ab9a6 in xwm_handle_selection_event (xwm=xwm@entry=0x55635c0dfcf0, event=event@entry=0x55635be8cfd0) at ../xwayland/selection/selection.c:130
#4  0x00007f31e75ae7c7 in x11_event_handler (fd=<optimized out>, mask=<optimized out>, data=0x55635c0dfcf0) at ../xwayland/xwm.c:1310
        count = 53206
        event = 0x55635be8cfd0
        xwm = 0x55635c0dfcf0
#5  0x00007f31e76397f2 in wl_event_loop_dispatch () at /usr/lib/libwayland-server.so.0
#6  0x00007f31e763839c in wl_display_run () at /usr/lib/libwayland-server.so.0
#7  0x000055635abb9589 in server_run (server=0x55635ac1de60 <server>) at ../sway/sway/server.c:216
#8  0x000055635abb8aa0 in main (argc=1, argv=0x7ffc5cda3268) at ../sway/sway/main.c:398
        verbose = 0
        debug = 0
        validate = 0
        allow_unsupported_gpu = 0
        long_options =
            {{name = 0x55635ac03ed0 "help", has_arg = 0, flag = 0x0, val = 104}, {name = 0x55635ac03ed5 "config", has_arg = 1, flag = 0x0, val = 99}, {name = 0x55635ac03edc "validate", has_arg = 0, flag = 0x0, val = 67}, {name = 0x55635ac03ee5 "debug", has_arg = 0, flag = 0x0, val = 100}, {name = 0x55635ac03eeb "version", has_arg = 0, flag = 0x0, val = 118}, {name = 0x55635ac03ef3 "verbose", has_arg = 0, flag = 0x0, val = 86}, {name = 0x55635ac03efb "get-socketpath", has_arg = 0, flag = 0x0, val = 112}, {name = 0x55635ac03f0a "unsupported-gpu", has_arg = 0, flag = 0x0, val = 117}, {name = 0x55635ac03f1a "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 = 0x55635ac03998 "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 = -1
(gdb) frame
#1  0x00007f31e75ab0fd in xwm_selection_send_data (mime_type=0x55635c35f270 "text/plain;charset=utf-8", req=0x55635be8cfd0, selection=0x55635c0dfe30) at ../xwayland/selection/outgoing.c:309
309             if (wl_list_length(&selection->outgoing) == 1) {
(gdb) list
304             xwm_selection_source_send(selection, mime_type, p[1]);
305
306             wl_list_insert(&selection->outgoing, &transfer->outgoing_link);
307
308             // We can only handle one transfer at a time
309             if (wl_list_length(&selection->outgoing) == 1) {
310                     xwm_selection_transfer_start_outgoing(transfer);
311             }
312     }
313
(gdb) p *selection
$5 = {xwm = 0x55635c0dfcf0, atom = 274, window = 2097153, owner = 2097153, timestamp = 53026500, incoming = {selection = 0x55635c0dfe30, incr = false, flush_property_on_delete = false, property_set = false, source_data = {size = 0,
      alloc = 0, data = 0x0}, source_fd = 548727, source = 0x0, request = {response_type = 0 '\000', pad0 = 0 '\000', sequence = 0, time = 0, owner = 0, requestor = 0, selection = 0, target = 0, property = 0}, outgoing_link = {prev = 0x0,
      next = 0x0}, property_start = 226, property_reply = 0x0}, outgoing = {prev = 0x55635c346bd8, next = 0x55635e4fd478}}

It seems that it froze in that wl_list_length() call.

Please tell me if I should extract anything else from the core dump.


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

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

emersion commented 5 years ago

Hmm. Probably an infinite loop. Would be nice to have debug logs.

YaLTeR commented 5 years ago

Can I extract the necessary info from the core dump? This issue occurs extremely rarely, maybe once a month. Perhaps I should just always run sway in debug log mode in case of issues like this?

emersion commented 5 years ago

Hmm. No, you can't obtain this from the coredump.

Maybe there's a way to save the debug logs in memory in a ring buffer of e.g. 1MiB?

YaLTeR commented 5 years ago

That would definitely be useful for cases like this.

emersion commented 5 years ago

I mean, it could be an external program you pipe sway's output to. Does such a thing exist?

progandy commented 5 years ago

I don't think a ringbuffer exists, but an automatically rotated log is available: https://superuser.com/questions/291368/log-rotation-of-stdout/291397#291397

Some other maybe useful links:

YaLTeR commented 5 years ago

Managed to get a log for this issue. When sway is frozen this is being spammed into the log:

2019-05-11 12:33:40 - [xwayland/selection/outgoing.c:303] Sending Wayland selection 256 to Xwayland window with MIME type text/plain;charset=utf-8, target 256
2019-05-11 12:33:40 - [xwayland/selection/outgoing.c:369] XCB_SELECTION_REQUEST (time=0 owner=2097153, requestor=2097153 selection=274, target=256, property=275)

This is the log right before the spam starts:

2019-05-11 12:32:52 - [xwayland/xwm.c:967] XCB_PROPERTY_NOTIFY (35651590)
2019-05-11 12:32:52 - [xwayland/xwm.c:723] unhandled X11 property 328 (_NET_WM_USER_TIME) for window 35651590
2019-05-11 12:32:53 - [xwayland/xwm.c:967] XCB_PROPERTY_NOTIFY (35651590)
2019-05-11 12:32:53 - [xwayland/xwm.c:723] unhandled X11 property 328 (_NET_WM_USER_TIME) for window 35651590
2019-05-11 12:32:53 - [xwayland/xwm.c:967] XCB_PROPERTY_NOTIFY (35651590)
2019-05-11 12:32:53 - [xwayland/xwm.c:723] unhandled X11 property 328 (_NET_WM_USER_TIME) for window 35651590
2019-05-11 12:32:53 - [xwayland/xwm.c:1291] unhandled X11 event: SelectionClear (29)
2019-05-11 12:32:53 - [xwayland/selection/incoming.c:414] XCB_XFIXES_SELECTION_NOTIFY (selection=274, owner=35651588)
2019-05-11 12:32:53 - [xwayland/selection/incoming.c:414] XCB_XFIXES_SELECTION_NOTIFY (selection=1, owner=35651588)
2019-05-11 12:32:53 - [xwayland/xwm.c:1206] XCB_CLIENT_MESSAGE (35651590)
2019-05-11 12:32:53 - [xwayland/xwm.c:1221] unhandled x11 client message 431 (WM_CHANGE_STATE)
2019-05-11 12:32:53 - [xwayland/xwm.c:967] XCB_PROPERTY_NOTIFY (35651590)
2019-05-11 12:32:53 - [xwayland/xwm.c:555] WM_HINTS (9)
2019-05-11 12:32:53 - [xwayland/xwm.c:955] XCB_UNMAP_NOTIFY (35651590)
2019-05-11 12:32:53 - [sway/sway/ipc-server.c:334] Sending window::close event
2019-05-11 12:32:53 - [sway/sway/ipc-server.c:921] Added IPC reply of type 0x80000003 to client 112 queue: { "change": "close", "container": { "id": 52, "name": "passwords.kdbx - KeePassXC", "rect": { "x": 1280, "y": 60, "width": 1250, "height": 1350 }, "focused": true, "focus": [ ], "border": "pixel", "current_border_width": 2, "layout": "none", "orientation": "none", "percent": 0.48879040667361839, "window_rect": { "x": 2, "y": 2, "width": 1246, "height": 1346 }, "deco_rect": { "x": 0, "y": 0, "width": 0, "height": 0 }, "geometry": { "x": 0, "y": 0, "width": 1228, "height": 1398 }, "window": 35651590, "urgent": false, "floating_nodes": [ ], "sticky": false, "type": "con", "fullscreen_mode": 0, "pid": 3120, "app_id": null, "visible": true, "marks": [ ], "window_properties": { "class": "keepassxc", "instance": "keepassxc", "title": "passwords.kdbx - KeePassXC", "transient_for": null }, "nodes": [ ] } }
2019-05-11 12:32:53 - [sway/sway/ipc-server.c:921] Added IPC reply of type 0x80000003 to client 133 queue: { "change": "close", "container": { "id": 52, "name": "passwords.kdbx - KeePassXC", "rect": { "x": 1280, "y": 60, "width": 1250, "height": 1350 }, "focused": true, "focus": [ ], "border": "pixel", "current_border_width": 2, "layout": "none", "orientation": "none", "percent": 0.48879040667361839, "window_rect": { "x": 2, "y": 2, "width": 1246, "height": 1346 }, "deco_rect": { "x": 0, "y": 0, "width": 0, "height": 0 }, "geometry": { "x": 0, "y": 0, "width": 1228, "height": 1398 }, "window": 35651590, "urgent": false, "floating_nodes": [ ], "sticky": false, "type": "con", "fullscreen_mode": 0, "pid": 3120, "app_id": null, "visible": true, "marks": [ ], "window_properties": { "class": "keepassxc", "instance": "keepassxc", "title": "passwords.kdbx - KeePassXC", "transient_for": null }, "nodes": [ ] } }
2019-05-11 12:32:53 - [sway/sway/ipc-server.c:334] Sending window::focus event
2019-05-11 12:32:53 - [sway/sway/ipc-server.c:921] Added IPC reply of type 0x80000003 to client 112 queue: { "change": "focus", "container": { "id": 11, "name": "Курсы лаборатории компьютерной графики: Log in to the site - Mozilla Firefox", "rect": { "x": 30, "y": 60, "width": 1240, "height": 1350 }, "focused": true, "focus": [ ], "border": "pixel", "current_border_width": 2, "layout": "none", "orientation": "none", "percent": 0.48488008342022937, "window_rect": { "x": 2, "y": 2, "width": 1236, "height": 1346 }, "deco_rect": { "x": 0, "y": 0, "width": 0, "height": 0 }, "geometry": { "x": 0, "y": 0, "width": 2556, "height": 1406 }, "window": 12582928, "urgent": false, "floating_nodes": [ ], "sticky": false, "type": "con", "fullscreen_mode": 0, "pid": 1215, "app_id": null, "visible": true, "marks": [ ], "window_properties": { "class": "Firefox", "instance": "Navigator", "title": "Курсы лаборатории компьютерной графики: Log in to the site - Mozilla Firefox", "transient_for": null, "window_role": "browser" }, "nodes": [ ] } }
2019-05-11 12:32:53 - [sway/sway/ipc-server.c:921] Added IPC reply of type 0x80000003 to client 133 queue: { "change": "focus", "container": { "id": 11, "name": "Курсы лаборатории компьютерной графики: Log in to the site - Mozilla Firefox", "rect": { "x": 30, "y": 60, "width": 1240, "height": 1350 }, "focused": true, "focus": [ ], "border": "pixel", "current_border_width": 2, "layout": "none", "orientation": "none", "percent": 0.48488008342022937, "window_rect": { "x": 2, "y": 2, "width": 1236, "height": 1346 }, "deco_rect": { "x": 0, "y": 0, "width": 0, "height": 0 }, "geometry": { "x": 0, "y": 0, "width": 2556, "height": 1406 }, "window": 12582928, "urgent": false, "floating_nodes": [ ], "sticky": false, "type": "con", "fullscreen_mode": 0, "pid": 1215, "app_id": null, "visible": true, "marks": [ ], "window_properties": { "class": "Firefox", "instance": "Navigator", "title": "Курсы лаборатории компьютерной графики: Log in to the site - Mozilla Firefox", "transient_for": null, "window_role": "browser" }, "nodes": [ ] } }
2019-05-11 12:32:53 - [sway/sway/tree/arrange.c:190] Usable area for ws: 2560x1410@0,30
2019-05-11 12:32:53 - [sway/sway/tree/arrange.c:221] Arranging workspace '1 — browser' at 20.000000, 50.000000
2019-05-11 12:32:53 - [sway/sway/tree/arrange.c:38] Arranging 0x7fff5cb5b5d0 horizontally
2019-05-11 12:32:53 - [sway/sway/desktop/transaction.c:412] Transaction 0x55e2fc34b660 committing with 4 instructions
2019-05-11 12:32:53 - [xwayland/xwm.c:1291] unhandled X11 event: FocusOut (10)
2019-05-11 12:32:53 - [xwayland/xwm.c:955] XCB_UNMAP_NOTIFY (35651590)
2019-05-11 12:32:53 - [xwayland/xwm.c:967] XCB_PROPERTY_NOTIFY (927)
2019-05-11 12:32:53 - [xwayland/xwm.c:1291] unhandled X11 event: FocusOut (10)
2019-05-11 12:32:53 - [xwayland/selection/incoming.c:414] XCB_XFIXES_SELECTION_NOTIFY (selection=274, owner=2097153)
2019-05-11 12:32:53 - [xwayland/xwm.c:967] XCB_PROPERTY_NOTIFY (927)
2019-05-11 12:32:53 - [xwayland/xwm.c:1291] unhandled X11 event: FocusOut (10)
2019-05-11 12:32:53 - [xwayland/xwm.c:967] XCB_PROPERTY_NOTIFY (927)
2019-05-11 12:32:53 - [xwayland/selection/incoming.c:414] XCB_XFIXES_SELECTION_NOTIFY (selection=274, owner=2097153)
2019-05-11 12:32:53 - [sway/sway/input/cursor.c:570] denying request to set cursor from unfocused client
2019-05-11 12:32:53 - [sway/sway/ipc-server.c:509] Client 112 writable
2019-05-11 12:32:53 - [sway/sway/ipc-server.c:509] Client 133 writable
2019-05-11 12:32:53 - [xwayland/xwm.c:967] XCB_PROPERTY_NOTIFY (927)
2019-05-11 12:32:53 - [xwayland/xwm.c:967] XCB_PROPERTY_NOTIFY (35651590)
2019-05-11 12:32:53 - [xwayland/xwm.c:723] unhandled X11 property 273 (WM_STATE) for window 35651590
2019-05-11 12:32:53 - [xwayland/xwm.c:967] XCB_PROPERTY_NOTIFY (35651590)
2019-05-11 12:32:53 - [xwayland/xwm.c:723] unhandled X11 property 273 (WM_STATE) for window 35651590
2019-05-11 12:32:53 - [xwayland/xwm.c:830] XCB_CREATE_NOTIFY (35651919)
2019-05-11 12:32:53 - [sway/sway/desktop/xwayland.c:590] New xwayland surface title='(null)' class='(null)'
2019-05-11 12:32:53 - [xwayland/selection/incoming.c:386] XCB_SELECTION_NOTIFY (selection=274, property=275, target=276)
2019-05-11 12:32:53 - [xwayland/selection/incoming.c:386] XCB_SELECTION_NOTIFY (selection=1, property=275, target=276)
2019-05-11 12:32:53 - [xwayland/xwm.c:967] XCB_PROPERTY_NOTIFY (52428801)
2019-05-11 12:32:53 - [xwayland/xwm.c:723] unhandled X11 property 565 (SELECTION_DATA) for window 52428801
2019-05-11 12:32:53 - [xwayland/xwm.c:967] XCB_PROPERTY_NOTIFY (52428801)
2019-05-11 12:32:53 - [xwayland/xwm.c:723] unhandled X11 property 565 (SELECTION_DATA) for window 52428801
2019-05-11 12:32:53 - [sway/sway/input/cursor.c:570] denying request to set cursor from unfocused client
2019-05-11 12:32:53 - [sway/sway/desktop/transaction.c:489] Transaction 0x55e2fc34b660 is ready
2019-05-11 12:32:53 - [sway/sway/desktop/transaction.c:280] Applying transaction 0x55e2fc34b660
2019-05-11 12:32:53 - [xwayland/selection/outgoing.c:369] XCB_SELECTION_REQUEST (time=0 owner=2097153, requestor=52428801 selection=274, target=276, property=565)
2019-05-11 12:32:53 - [xwayland/selection/outgoing.c:28] SendEvent destination=52428801 SelectionNotify(31) time=0 requestor=52428801 selection=274 target=276 property=565
2019-05-11 12:32:53 - [xwayland/xwm.c:967] XCB_PROPERTY_NOTIFY (52428801)
2019-05-11 12:32:53 - [xwayland/xwm.c:723] unhandled X11 property 565 (SELECTION_DATA) for window 52428801
2019-05-11 12:32:53 - [xwayland/xwm.c:967] XCB_PROPERTY_NOTIFY (12582928)
2019-05-11 12:32:53 - [xwayland/xwm.c:555] WM_HINTS (9)
2019-05-11 12:32:53 - [xwayland/xwm.c:967] XCB_PROPERTY_NOTIFY (52428801)
2019-05-11 12:32:53 - [xwayland/xwm.c:723] unhandled X11 property 565 (SELECTION_DATA) for window 52428801
2019-05-11 12:32:53 - [xwayland/selection/outgoing.c:369] XCB_SELECTION_REQUEST (time=0 owner=2097153, requestor=52428801 selection=274, target=276, property=565)
2019-05-11 12:32:53 - [xwayland/selection/outgoing.c:28] SendEvent destination=52428801 SelectionNotify(31) time=0 requestor=52428801 selection=274 target=276 property=565
2019-05-11 12:32:53 - [xwayland/xwm.c:967] XCB_PROPERTY_NOTIFY (52428801)
2019-05-11 12:32:53 - [xwayland/xwm.c:723] unhandled X11 property 565 (SELECTION_DATA) for window 52428801
2019-05-11 12:32:53 - [xwayland/xwm.c:967] XCB_PROPERTY_NOTIFY (52428801)
2019-05-11 12:32:53 - [xwayland/xwm.c:723] unhandled X11 property 565 (SELECTION_DATA) for window 52428801
2019-05-11 12:32:53 - [xwayland/xwm.c:967] XCB_PROPERTY_NOTIFY (12582928)
2019-05-11 12:32:53 - [xwayland/xwm.c:555] WM_HINTS (9)
2019-05-11 12:32:54 - [xwayland/xwm.c:967] XCB_PROPERTY_NOTIFY (12582928)
2019-05-11 12:32:54 - [xwayland/xwm.c:723] unhandled X11 property 328 (_NET_WM_USER_TIME) for window 12582928
2019-05-11 12:32:54 - [xwayland/xwm.c:967] XCB_PROPERTY_NOTIFY (12582928)
2019-05-11 12:32:54 - [xwayland/xwm.c:723] unhandled X11 property 328 (_NET_WM_USER_TIME) for window 12582928
2019-05-11 12:32:54 - [xwayland/xwm.c:967] XCB_PROPERTY_NOTIFY (12582928)
2019-05-11 12:32:54 - [xwayland/xwm.c:723] unhandled X11 property 328 (_NET_WM_USER_TIME) for window 12582928
2019-05-11 12:32:54 - [xwayland/xwm.c:967] XCB_PROPERTY_NOTIFY (12583038)
2019-05-11 12:32:54 - [xwayland/xwm.c:723] unhandled X11 property 476 (GDK_TIMESTAMP_PROP) for window 12583038
2019-05-11 12:32:54 - [xwayland/selection/outgoing.c:369] XCB_SELECTION_REQUEST (time=9613468 owner=2097153, requestor=12583038 selection=274, target=276, property=331)
2019-05-11 12:32:54 - [xwayland/selection/outgoing.c:28] SendEvent destination=12583038 SelectionNotify(31) time=9613468 requestor=12583038 selection=274 target=276 property=331
2019-05-11 12:32:54 - [xwayland/xwm.c:967] XCB_PROPERTY_NOTIFY (12583038)
2019-05-11 12:32:54 - [xwayland/xwm.c:723] unhandled X11 property 331 (GDK_SELECTION) for window 12583038
2019-05-11 12:32:54 - [xwayland/xwm.c:967] XCB_PROPERTY_NOTIFY (12583038)
2019-05-11 12:32:54 - [xwayland/xwm.c:723] unhandled X11 property 331 (GDK_SELECTION) for window 12583038
2019-05-11 12:32:54 - [xwayland/xwm.c:967] XCB_PROPERTY_NOTIFY (12583038)
2019-05-11 12:32:54 - [xwayland/xwm.c:723] unhandled X11 property 476 (GDK_TIMESTAMP_PROP) for window 12583038
2019-05-11 12:32:54 - [xwayland/selection/outgoing.c:369] XCB_SELECTION_REQUEST (time=9613468 owner=2097153, requestor=12583038 selection=274, target=276, property=331)
2019-05-11 12:32:54 - [xwayland/selection/outgoing.c:28] SendEvent destination=12583038 SelectionNotify(31) time=9613468 requestor=12583038 selection=274 target=276 property=331
2019-05-11 12:32:54 - [xwayland/xwm.c:967] XCB_PROPERTY_NOTIFY (12583038)
2019-05-11 12:32:54 - [xwayland/xwm.c:723] unhandled X11 property 331 (GDK_SELECTION) for window 12583038
2019-05-11 12:32:54 - [xwayland/xwm.c:967] XCB_PROPERTY_NOTIFY (12583038)
2019-05-11 12:32:54 - [xwayland/xwm.c:723] unhandled X11 property 331 (GDK_SELECTION) for window 12583038
2019-05-11 12:32:54 - [xwayland/xwm.c:967] XCB_PROPERTY_NOTIFY (12583038)
2019-05-11 12:32:54 - [xwayland/xwm.c:723] unhandled X11 property 476 (GDK_TIMESTAMP_PROP) for window 12583038
2019-05-11 12:32:54 - [xwayland/selection/outgoing.c:369] XCB_SELECTION_REQUEST (time=9613469 owner=2097153, requestor=12583038 selection=274, target=276, property=331)
2019-05-11 12:32:54 - [xwayland/selection/outgoing.c:28] SendEvent destination=12583038 SelectionNotify(31) time=9613469 requestor=12583038 selection=274 target=276 property=331
2019-05-11 12:32:54 - [xwayland/xwm.c:967] XCB_PROPERTY_NOTIFY (12583038)
2019-05-11 12:32:54 - [xwayland/xwm.c:723] unhandled X11 property 331 (GDK_SELECTION) for window 12583038
2019-05-11 12:32:54 - [xwayland/xwm.c:967] XCB_PROPERTY_NOTIFY (12583038)
2019-05-11 12:32:54 - [xwayland/xwm.c:723] unhandled X11 property 331 (GDK_SELECTION) for window 12583038
2019-05-11 12:32:54 - [xwayland/xwm.c:967] XCB_PROPERTY_NOTIFY (12583038)
2019-05-11 12:32:54 - [xwayland/xwm.c:723] unhandled X11 property 476 (GDK_TIMESTAMP_PROP) for window 12583038
2019-05-11 12:32:54 - [xwayland/selection/outgoing.c:369] XCB_SELECTION_REQUEST (time=9613469 owner=2097153, requestor=12583038 selection=274, target=276, property=331)
2019-05-11 12:32:54 - [xwayland/selection/outgoing.c:28] SendEvent destination=12583038 SelectionNotify(31) time=9613469 requestor=12583038 selection=274 target=276 property=331
2019-05-11 12:32:54 - [xwayland/xwm.c:967] XCB_PROPERTY_NOTIFY (12583038)
2019-05-11 12:32:54 - [xwayland/xwm.c:723] unhandled X11 property 331 (GDK_SELECTION) for window 12583038
2019-05-11 12:32:54 - [xwayland/xwm.c:967] XCB_PROPERTY_NOTIFY (12583038)
2019-05-11 12:32:54 - [xwayland/xwm.c:723] unhandled X11 property 331 (GDK_SELECTION) for window 12583038
2019-05-11 12:32:54 - [xwayland/xwm.c:967] XCB_PROPERTY_NOTIFY (12583038)
2019-05-11 12:32:54 - [xwayland/xwm.c:723] unhandled X11 property 476 (GDK_TIMESTAMP_PROP) for window 12583038
2019-05-11 12:32:54 - [xwayland/selection/outgoing.c:369] XCB_SELECTION_REQUEST (time=9613470 owner=2097153, requestor=12583038 selection=274, target=276, property=331)
2019-05-11 12:32:54 - [xwayland/selection/outgoing.c:28] SendEvent destination=12583038 SelectionNotify(31) time=9613470 requestor=12583038 selection=274 target=276 property=331
2019-05-11 12:32:54 - [xwayland/xwm.c:967] XCB_PROPERTY_NOTIFY (12583038)
2019-05-11 12:32:54 - [xwayland/xwm.c:723] unhandled X11 property 331 (GDK_SELECTION) for window 12583038
2019-05-11 12:32:54 - [xwayland/xwm.c:967] XCB_PROPERTY_NOTIFY (12583038)
2019-05-11 12:32:54 - [xwayland/xwm.c:723] unhandled X11 property 331 (GDK_SELECTION) for window 12583038
2019-05-11 12:32:54 - [xwayland/xwm.c:967] XCB_PROPERTY_NOTIFY (12583038)
2019-05-11 12:32:54 - [xwayland/xwm.c:723] unhandled X11 property 476 (GDK_TIMESTAMP_PROP) for window 12583038
2019-05-11 12:32:54 - [xwayland/selection/outgoing.c:369] XCB_SELECTION_REQUEST (time=9613470 owner=2097153, requestor=12583038 selection=274, target=276, property=331)
2019-05-11 12:32:54 - [xwayland/selection/outgoing.c:28] SendEvent destination=12583038 SelectionNotify(31) time=9613470 requestor=12583038 selection=274 target=276 property=331
2019-05-11 12:32:54 - [xwayland/xwm.c:967] XCB_PROPERTY_NOTIFY (12583038)
2019-05-11 12:32:54 - [xwayland/xwm.c:723] unhandled X11 property 331 (GDK_SELECTION) for window 12583038
2019-05-11 12:32:54 - [xwayland/xwm.c:967] XCB_PROPERTY_NOTIFY (12583038)
2019-05-11 12:32:54 - [xwayland/xwm.c:723] unhandled X11 property 331 (GDK_SELECTION) for window 12583038
2019-05-11 12:32:54 - [xwayland/xwm.c:967] XCB_PROPERTY_NOTIFY (12583038)
2019-05-11 12:32:54 - [xwayland/xwm.c:723] unhandled X11 property 476 (GDK_TIMESTAMP_PROP) for window 12583038
2019-05-11 12:32:54 - [xwayland/selection/outgoing.c:369] XCB_SELECTION_REQUEST (time=9613470 owner=2097153, requestor=12583038 selection=274, target=276, property=331)
2019-05-11 12:32:54 - [xwayland/selection/outgoing.c:28] SendEvent destination=12583038 SelectionNotify(31) time=9613470 requestor=12583038 selection=274 target=276 property=331
2019-05-11 12:32:54 - [xwayland/xwm.c:967] XCB_PROPERTY_NOTIFY (12583038)
2019-05-11 12:32:54 - [xwayland/xwm.c:723] unhandled X11 property 331 (GDK_SELECTION) for window 12583038
2019-05-11 12:32:54 - [xwayland/xwm.c:967] XCB_PROPERTY_NOTIFY (12583038)
2019-05-11 12:32:54 - [xwayland/xwm.c:723] unhandled X11 property 331 (GDK_SELECTION) for window 12583038
2019-05-11 12:32:54 - [xwayland/xwm.c:967] XCB_PROPERTY_NOTIFY (12583038)
2019-05-11 12:32:54 - [xwayland/xwm.c:723] unhandled X11 property 476 (GDK_TIMESTAMP_PROP) for window 12583038
2019-05-11 12:32:54 - [xwayland/selection/outgoing.c:369] XCB_SELECTION_REQUEST (time=9613471 owner=2097153, requestor=12583038 selection=274, target=276, property=331)
2019-05-11 12:32:54 - [xwayland/selection/outgoing.c:28] SendEvent destination=12583038 SelectionNotify(31) time=9613471 requestor=12583038 selection=274 target=276 property=331
2019-05-11 12:32:54 - [xwayland/xwm.c:967] XCB_PROPERTY_NOTIFY (12583038)
2019-05-11 12:32:54 - [xwayland/xwm.c:723] unhandled X11 property 331 (GDK_SELECTION) for window 12583038
2019-05-11 12:32:54 - [xwayland/xwm.c:967] XCB_PROPERTY_NOTIFY (12583038)
2019-05-11 12:32:54 - [xwayland/xwm.c:723] unhandled X11 property 331 (GDK_SELECTION) for window 12583038
2019-05-11 12:32:54 - [xwayland/xwm.c:967] XCB_PROPERTY_NOTIFY (12583038)
2019-05-11 12:32:54 - [xwayland/xwm.c:723] unhandled X11 property 476 (GDK_TIMESTAMP_PROP) for window 12583038
YaLTeR commented 5 years ago

When I got the freeze today, I switched to a different VT and killed KeepassXC. This allowed me to switch back to sway and continue working, but I found that the whole Xwayland died.

jhimanka commented 5 years ago

I started seeing this today, but for me it happens when I'm selecting and pasting things in Emacs. The exact message that keeps repeating is

2019-11-11 11:02:09 - [xwayland/selection/outgoing.c:302] Sending Wayland selection 256 to Xwayland window with MIME type text/plain;charset=utf-8, target 256 2019-11-11 11:02:09 - [xwayland/selection/outgoing.c:366] XCB_SELECTION_REQUEST (time=0 owner=2097153, requestor=2097153 selection=274, target=256, property=275)

Sway 1.2, Xwayland 1.20, both standard binaries from Kubuntu 19.10. Emacs is 27.0.50, a daily snapshot. When I log in from another machine, I can see sway using 100% of the cpu.

YaLTeR commented 4 years ago

Got this again while pasting text into a wine/Qt application copied from the same application. Backtrace & stuff:

#0  0x00007ff733b29204 in wl_list_length () at /usr/lib/libwayland-server.so.0
#1  0x00007ff733a95fdf in xwm_selection_send_data (mime_type=0x55a0f344aa50 "text/plain", req=<optimized out>, selection=0x55a0f33f18b0) at ../xwayland/selection/outgoing.c:309
        mime_types = <optimized out>
        found = true
        mime_type_ptr = <optimized out>
        transfer = 0x55a0f40e15c0
        p = {188747, 188748}
        mime_type = 0x55a0f344aa50 "text/plain"
        selection = 0x55a0f33f18b0
#2  0x00007ff733a95fdf in xwm_handle_selection_request (xwm=<optimized out>, req=<optimized out>) at ../xwayland/selection/outgoing.c:416
        mime_type = 0x55a0f344aa50 "text/plain"
        selection = 0x55a0f33f18b0
#3  0x00007ff733a96806 in xwm_handle_selection_event (xwm=xwm@entry=0x55a0f33f1770, event=event@entry=0x55a0f35365f0) at ../xwayland/selection/selection.c:130
#4  0x00007ff733a99488 in x11_event_handler (fd=<optimized out>, mask=<optimized out>, data=0x55a0f33f1770) at ../xwayland/xwm.c:1311
        count = 83639
        event = 0x55a0f35365f0
        xwm = 0x55a0f33f1770
#5  0x00007ff733b267f2 in wl_event_loop_dispatch () at /usr/lib/libwayland-server.so.0
#6  0x00007ff733b2539c in wl_display_run () at /usr/lib/libwayland-server.so.0
#7  0x000055a0f07b658c in main (argc=2, argv=0x7ffd34fa29e8) at ../sway/sway/main.c:403
        verbose = 0
        debug = 0
        validate = 0
        allow_unsupported_gpu = 1
        long_options = 
            {{name = 0x55a0f07ff47b "help", has_arg = 0, flag = 0x0, val = 104}, {name = 0x55a0f08026d1 "config", has_arg = 1, flag = 0x0, val = 99}, {name = 0x55a0f07ff480 "validate", has_arg = 0, flag = 0x0, val = 67}, {name = 0x55a0f07ff489 "debug", has_arg = 0, flag = 0x0, val = 100}, {name = 0x55a0f07ff3df "version", has_arg = 0, flag = 0x0, val = 118}, {name = 0x55a0f07fe57c "verbose", has_arg = 0, flag = 0x0, val = 86}, {name = 0x55a0f07ff48f "get-socketpath", has_arg = 0, flag = 0x0, val = 112}, {name = 0x55a0f07ff49e "unsupported-gpu", has_arg = 0, flag = 0x0, val = 117}, {name = 0x55a0f07ff4ae "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 = 0x55a0f07ff7e0 "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>
#1  0x00007ff733a95fdf in xwm_selection_send_data (mime_type=0x55a0f344aa50 "text/plain", req=<optimized out>, selection=0x55a0f33f18b0) at ../xwayland/selection/outgoing.c:309
309     if (wl_list_length(&selection->outgoing) == 1) {
304     xwm_selection_source_send(selection, mime_type, p[1]);
305 
306     wl_list_insert(&selection->outgoing, &transfer->outgoing_link);
307 
308     // We can only handle one transfer at a time
309     if (wl_list_length(&selection->outgoing) == 1) {
310         xwm_selection_transfer_start_outgoing(transfer);
311     }
312 }
313 
#2  xwm_handle_selection_request (xwm=<optimized out>, req=<optimized out>) at ../xwayland/selection/outgoing.c:416
416         xwm_selection_send_data(selection, req, mime_type);
411             wlr_log(WLR_ERROR, "ignoring selection request: unknown atom %u",
412                 req->target);
413             xwm_selection_send_notify(xwm, req, false);
414             return;
415         }
416         xwm_selection_send_data(selection, req, mime_type);
417         free(mime_type);
418     }
419 }
#3  0x00007ff733a96806 in xwm_handle_selection_event (xwm=xwm@entry=0x55a0f33f1770, event=event@entry=0x55a0f35365f0) at ../xwayland/selection/selection.c:130
130         xwm_handle_selection_request(xwm,
125         return 1;
126     case XCB_PROPERTY_NOTIFY:
127         return xwm_handle_selection_property_notify(xwm,
128             (xcb_property_notify_event_t *)event);
129     case XCB_SELECTION_REQUEST:
130         xwm_handle_selection_request(xwm,
131             (xcb_selection_request_event_t *)event);
132         return 1;
133     }
134