Skip to content
This repository was archived by the owner on Jan 26, 2024. It is now read-only.

disabling monitor outputs don't work that well #289

Closed
DarioTD opened this issue Aug 13, 2022 · 31 comments · Fixed by #294
Closed

disabling monitor outputs don't work that well #289

DarioTD opened this issue Aug 13, 2022 · 31 comments · Fixed by #294
Labels
A: bug Something isn't working

Comments

@DarioTD
Copy link

DarioTD commented Aug 13, 2022

Info

dwl's commit: 0.3.1-74-g7a343b9-dirty
wlroots version: 0.15.1-6

Description

Hello I have 2 monitor LVDS-1 and HDMI-1
I've noticed that when I disable the LVDS-1 monitor with "wdisplays" or typing wlr-randr --output LVDS-1 --off it disables the monitor but the clients don't move to the active HDMI-1 monitor they stay in the disabled LVDS-1 monitor.
The mouse pointer doesn't stay contained in the HDMI-1 monitor it goes through that disabled monitor.

Opinion

Maybe the culprit is in the cleanupmon() function or the closemon() function.
I don't know how to use gdb to debug dwl so I might be wrong.

@DarioTD DarioTD added the A: bug Something isn't working label Aug 13, 2022
This was referenced Aug 14, 2022
@sevz17
Copy link
Collaborator

sevz17 commented Aug 14, 2022

Hello @DarioTD, can you check which one works better?

@DarioTD
Copy link
Author

DarioTD commented Aug 14, 2022

@sevz17 Both work great 👍 but when I disable a monitor the position of the active one stays the same ex: 1920x 0y
Maybe it should be set to 0x 0y? taking the disabled one previous position 0x 0y
And when I reenable it the position goes to ex: 3000x 0y because it goes to the right which is good
A hack I did is to disable every monitor posible then up arrow to the previous wlr-randr --output HDMI-A-1 --on which sets the position to 0x 0y and reenabling LVDS-1 sets it to the right like 1920x 0y which is good

@DarioTD
Copy link
Author

DarioTD commented Aug 14, 2022

I've discovered a bug from these fixes dwl gives me a segfault that I backtraced with gdb it seems to have problems with the dirtomon() function.
The bug is that when I disable the laptop screen LVDS-1 and the HDMI cable is disconnected for 5s~ and I reconnect it back dwl gives the segfault
Maybe because there aren't monitors available and the clients don't know where to go? idk

@sevz17
Copy link
Collaborator

sevz17 commented Aug 16, 2022

I pushed some changes, can you try again?

@DarioTD
Copy link
Author

DarioTD commented Aug 17, 2022

I pushed some changes, can you try again?

Yes I have tried again and now dwl doesn't crash anymore.
The only thing I don't like is that the clients ( when I disconnect and reconnect the HDMI cable while LVDS is disabled ) are hidden away ( I did Mod+0 and the clients were running but not in the HDMI monitor nor the LVDS one ) maybe they are in NULL
I think the clients can stay "floating" in the last known active monitor or moved back again from NULL to the new detected monitor.

@sevz17
Copy link
Collaborator

sevz17 commented Aug 18, 2022

I think I fixed it in #294, the clients will have the same tags that they have in the previous monitor

@DarioTD
Copy link
Author

DarioTD commented Aug 19, 2022

I've discovered a bug from these fixes dwl gives me a segfault that I backtraced with gdb it seems to have problems with the dirtomon() function. The bug is that when I disable the laptop screen LVDS-1 and the HDMI cable is disconnected for 5s~ and I reconnect it back dwl gives the segfault Maybe because there aren't monitors available and the clients don't know where to go? idk

@sevz17 segfaults again.
Here is the backtrace:

Thread 1 "dwl" received signal SIGSEGV, Segmentation fault.
0x00007fe08853d590 in ?? () from /usr/lib/libwlroots.so.10
(gdb) bt
#0  0x00007fe08853d590 in  () at /usr/lib/libwlroots.so.10
#1  0x00005600103d6a62 in dirtomon ()
#2  0x00005600103d8cfb in focusmon ()
#3  0x00005600103d93f7 in updatemons ()
#4  0x00007fe08854cc5e in wlr_signal_emit_safe () at /usr/lib/libwlroots.so.10
#5  0x00007fe08853ceb6 in wlr_output_layout_add_auto () at /usr/lib/libwlroots.so.10
#6  0x00005600103d796d in createmon ()
#7  0x00007fe08854cc5e in wlr_signal_emit_safe () at /usr/lib/libwlroots.so.10
#8  0x00007fe08854cc5e in wlr_signal_emit_safe () at /usr/lib/libwlroots.so.10
#9  0x00007fe0885043ab in  () at /usr/lib/libwlroots.so.10
#10 0x00007fe08854cc5e in wlr_signal_emit_safe () at /usr/lib/libwlroots.so.10
#11 0x00007fe088516589 in  () at /usr/lib/libwlroots.so.10
#12 0x00007fe0884ba9e2 in wl_event_loop_dispatch () at /usr/lib/libwayland-server.so.0
#13 0x00007fe0884bb197 in wl_display_run () at /usr/lib/libwayland-server.so.0
#14 0x00005600103dab2d in main ()

@sevz17
Copy link
Collaborator

sevz17 commented Aug 19, 2022

Can you give me the output of bt full?

@DarioTD
Copy link
Author

DarioTD commented Aug 19, 2022

bt full gave me the same output.
But reading a bit I learned that I have to compile with the -g flag and that gave me the following:

Attaching to process 11634
[New LWP 11637]
[New LWP 11638]
[New LWP 11639]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
0x00007f5ed97edd06 in epoll_wait () from /usr/lib/libc.so.6
Continuing.

Thread 1 "dwl" received signal SIGSEGV, Segmentation fault.
0x00007f5ed99f5590 in ?? () from /usr/lib/libwlroots.so.10
#0  0x00007f5ed99f5590 in  () at /usr/lib/libwlroots.so.10
#1  0x0000561747804668 in dirtomon (dir=WLR_DIRECTION_RIGHT) at dwl.c:1096
        next = 0x56174780c740 <layout_change>
#2  0x0000561747804a4b in focusmon (arg=0x7ffdd83c7f40) at dwl.c:1197
        m = 0x56174a1968f0
#3  0x0000561747807de1 in updatemons
    (listener=0x56174780c740 <layout_change>, data=0x561749fe00e0) at dwl.c:2380
        arg = {i = 8, ui = 8, f = 1.12103877e-44, v = 0x8}
        config = 0x56174a0b5230
        config_head = 0x56174a06ad20
        c = 0x12
        m = 0x56174a1968f0
#4  0x00007f5ed9a04c5e in wlr_signal_emit_safe () at /usr/lib/libwlroots.so.10
#5  0x00007f5ed99f4eb6 in wlr_output_layout_add_auto () at /usr/lib/libwlroots.so.10
#6  0x0000561747803f93 in createmon
    (listener=0x56174780c7a0 <new_output>, data=0x56174a196210) at dwl.c:946
        wlr_output = 0x56174a196210
        r = 0x56174780b420 <monrules>
        m = 0x56174a328ec0
#7  0x00007f5ed9a04c5e in wlr_signal_emit_safe () at /usr/lib/libwlroots.so.10
#8  0x00007f5ed9a04c5e in wlr_signal_emit_safe () at /usr/lib/libwlroots.so.10
#9  0x00007f5ed99bc3ab in  () at /usr/lib/libwlroots.so.10
#10 0x00007f5ed9a04c5e in wlr_signal_emit_safe () at /usr/lib/libwlroots.so.10
#11 0x00007f5ed99ce589 in  () at /usr/lib/libwlroots.so.10
#12 0x00007f5ed99729e2 in wl_event_loop_dispatch () at /usr/lib/libwayland-server.so.0
#13 0x00007f5ed9973197 in wl_display_run () at /usr/lib/libwayland-server.so.0
#14 0x0000561747806841 in run (startup_cmd=0x0) at dwl.c:1851
        socket = 0x561749fe1a09 "wayland-0"
#15 0x0000561747808692 in main (argc=1, argv=0x7ffdd83c8768) at dwl.c:2659
        startup_cmd = 0x0
        c = -1
Detaching from program: /usr/local/bin/dwl, process 11634
[Inferior 1 (process 11634) detached]

This time I used set logging enabled on in gdb instead of piping it's output to tee like in the previous comment I did.

@sevz17
Copy link
Collaborator

sevz17 commented Aug 23, 2022

@DarioTD, I think I fixed the segfault. (the problem was that we tried to get the adjacent output from an output that wasn't in the layout)

@DarioTD
Copy link
Author

DarioTD commented Aug 24, 2022

@sevz17 It stopped giving segfaults but the previously spawned clients stay on the disabled monitor instead of going back in the reattached active head.

My workaround when I don't see the previously spawned clients in the only active monitor (being the reattached HDMI head) is

This is the command I run before disconnecting the HDMI cable:

wlr-randr --output LVDS-1 --off --output HDMI-A-1 --preferred --pos 0,0 && Disable LVDS making HDMI the active one then I disconnect (unattach the HDMI head) and reconnect it (reattach the HDMI head) doing this I don't see the previously spawned clients.

The following is when I reconnect the HDMI cable again:

wlr-randr --output LVDS-1 --on && Then I re-enable LVDS seeing that the clients fallback to that head? (even though it was disabled but maybe this avoids segfault).

wlr-randr --output LVDS-1 --off and disabling LVDS again so the clients go back to the HDMI monitor.

@sevz17
Copy link
Collaborator

sevz17 commented Aug 25, 2022

Please try again, I think this time it will work as expected

@DarioTD
Copy link
Author

DarioTD commented Aug 26, 2022

sadly for me it didn't work and sometimes I use sway and in sway it works

@sevz17
Copy link
Collaborator

sevz17 commented Aug 27, 2022

Mmm, this time what was the result and what is the expected result?

@DarioTD
Copy link
Author

DarioTD commented Aug 28, 2022

When I reconnect the HDMI it defaults it's position to 0,0 (before disconnection it was set to 1920,0) maybe because LVDS is taking that same 0,0 coordinates at the same time that the clients go to the disabled monitor? idk

I have 2 similar backtraces that got trigerred when I disconnected the only monitor (HDMI) available while using an Xwayland client but I think is not related to this issue. What do you think?

1st_gdb.txt

Thread 1 "dwl" received signal SIGSEGV, Segmentation fault.
0x0000563297f44b75 in applybounds (c=0x5632998c8ba0, bbox=0x60) at dwl.c:414
414		if (c->geom.x >= bbox->x + bbox->width)
#0  0x0000563297f44b75 in applybounds (c=0x5632998c8ba0, bbox=0x60) at dwl.c:414
#1  0x0000563297f48e25 in resize (c=0x5632998c8ba0, geo=..., interact=0) at dwl.c:1822
        bbox = 0x60
#2  0x0000563297f45f00 in closemon (m=0x56329966ef40) at dwl.c:802
        c = 0x5632998c8ba0
#3  0x0000563297f4a92c in updatemons
    (listener=0x563297f50840 <layout_change>, data=0x5632994aa0f0) at dwl.c:2439
        nmons = 22066
        i = 0
        config = 0x563299812a90
        c = 0x3
        config_head = 0x5632998c72c0
        m = 0x56329966ef40
#4  0x00007f46f2967c5e in wlr_signal_emit_safe () at /usr/lib/libwlroots.so.10
#5  0x0000563297f48600 in outputmgrapplyortest (config=0x563299518f10, test=0)
    at dwl.c:1638
        wlr_output = 0x56329966e860
        config_head = 0x5632998c7080
        ok = 1
#6  0x0000563297f48533 in outputmgrapply
    (listener=0x563297f50900 <output_mgr_apply>, data=0x563299518f10) at dwl.c:1609
        config = 0x563299518f10
#7  0x00007f46f2967c5e in wlr_signal_emit_safe () at /usr/lib/libwlroots.so.10
#8  0x00007f46f22f40e6 in  () at /usr/lib/libffi.so.8
#9  0x00007f46f22f3497 in  () at /usr/lib/libffi.so.8
#10 0x00007f46f28d2ada in  () at /usr/lib/libwayland-server.so.0
#11 0x00007f46f28d7010 in  () at /usr/lib/libwayland-server.so.0
#12 0x00007f46f28d59e2 in wl_event_loop_dispatch () at /usr/lib/libwayland-server.so.0
#13 0x00007f46f28d6197 in wl_display_run () at /usr/lib/libwayland-server.so.0
#14 0x0000563297f49215 in run (startup_cmd=0x0) at dwl.c:1892
        socket = 0x5632994abca9 "wayland-0"
#15 0x0000563297f4b74f in main (argc=1, argv=0x7ffd4e85c928) at dwl.c:2713
        startup_cmd = 0x0
        c = -1

2nd_gdb.txt

Thread 1 "dwl" received signal SIGSEGV, Segmentation fault.
0x000055e39d873376 in applybounds (c=0x6130003e2040, bbox=0x60) at dwl.c:398
398		if (c->geom.x >= bbox->x + bbox->width)
#0  0x000055e39d873376 in applybounds (c=0x6130003e2040, bbox=0x60) at dwl.c:398
#1  0x000055e39d87e017 in resize (c=0x6130003e2040, geo=..., interact=0) at dwl.c:1756
        bbox = 0x60
#2  0x000055e39d876a5e in closemon (m=0x6110000d18c0) at dwl.c:753
        c = 0x6130003e2040
#3  0x000055e39d881b3f in updatemons
    (listener=0x55e39d88a9a0 <layout_change>, data=0x60700002e310) at dwl.c:2360
        nmons = 32514
        i = 0
        config = 0x604000429e10
        c = 0x7fff4b5dcba0
        config_head = 0x60b00047b5e0
        m = 0x6110000d18c0
#4  0x00007f0296f3ec5e in wlr_signal_emit_safe () at /usr/lib/libwlroots.so.10
#5  0x000055e39d8766e5 in cleanupmon (listener=0x611001941078, data=0x618000028480)
    at dwl.c:732
        wlr_output = 0x618000028480
        m = 0x611001941040
        nmons = 32514
        i = 0
#6  0x00007f0296f3ec5e in wlr_signal_emit_safe () at /usr/lib/libwlroots.so.10
#7  0x00007f0296f0c849 in wlr_output_destroy () at /usr/lib/libwlroots.so.10
#8  0x00007f0296ef61e7 in  () at /usr/lib/libwlroots.so.10
#9  0x00007f0296f3ec5e in wlr_signal_emit_safe () at /usr/lib/libwlroots.so.10
#10 0x00007f0296f08589 in  () at /usr/lib/libwlroots.so.10
#11 0x00007f0296eac9e2 in wl_event_loop_dispatch () at /usr/lib/libwayland-server.so.0
#12 0x00007f0296ead197 in wl_display_run () at /usr/lib/libwayland-server.so.0
#13 0x000055e39d87ec0f in run (startup_cmd=0x0) at dwl.c:1825
        socket = 0x6120000109d9 "wayland-0"
#14 0x000055e39d8841b1 in main (argc=1, argv=0x7fff4b5dd378) at dwl.c:2634
        startup_cmd = 0x0
        c = -1

I got other 2 (rare?) backtraces. They are different but because I patched dwl.c with #294 I am gonna put it here

3rd_gdb.txt

Thread 1 "dwl" received signal SIGSEGV, Segmentation fault.
0x00005574d48b35c1 in view (arg=0x5574d48ba658 <keys+568>) at dwl.c:2420
2420		if ((arg->ui & TAGMASK) == selmon->tagset[selmon->seltags])
#0  0x00005574d48b35c1 in view (arg=0x5574d48ba658 <keys+568>) at dwl.c:2420
#1  0x00005574d48ab7ed in keybinding (mods=64, sym=49) at dwl.c:1292
        handled = 0
        k = 0x5574d48ba648 <keys+552>
#2  0x00005574d48abb47 in keypress (listener=0x608000228b50, data=0x7ffc096cad60)
    at dwl.c:1324
        i = 0
        kb = 0x608000228b20
        event = 0x7ffc096cad60
        keycode = 10
        syms = 0x60c0003e4658
        nsyms = 1
        handled = 0
        mods = 64
#3  0x00007fdd37ffac5e in wlr_signal_emit_safe () at /usr/lib/libwlroots.so.10
#4  0x00007fdd37fdd955 in wlr_keyboard_notify_key () at /usr/lib/libwlroots.so.10
#5  0x00007fdd37fb9596 in  () at /usr/lib/libwlroots.so.10
#6  0x00007fdd37f689e2 in wl_event_loop_dispatch () at /usr/lib/libwayland-server.so.0
#7  0x00007fdd37f69197 in wl_display_run () at /usr/lib/libwayland-server.so.0
#8  0x00005574d48afc0f in run (startup_cmd=0x0) at dwl.c:1825
        socket = 0x6120000109d9 "wayland-0"
#9  0x00005574d48b51b1 in main (argc=1, argv=0x7ffc096cb1f8) at dwl.c:2634
        startup_cmd = 0x0
        c = -1

4th_gdb.txt

Thread 1 "dwl" received signal SIGSEGV, Segmentation fault.
0x0000557541688977 in createlayersurface (listener=0x55754169bae0 <new_layer_shell_surface>, data=0x612000039940) at dwl.c:852
852			wlr_layer_surface->output = selmon->wlr_output;
#0  0x0000557541688977 in createlayersurface
    (listener=0x55754169bae0 <new_layer_shell_surface>, data=0x612000039940) at dwl.c:852
        wlr_layer_surface = 0x612000039940
        layersurface = 0x7ffe48071420

                  old_state = {committed = 0, anchor = 0, exclusive_zone = 1920, margin = {top = 1080, right = 4180713184, bottom = 32654, left = 3095221248}, keyboard_interactive = (ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_EXCLUSIVE | unknown: 0x42f63394), desired_width = 4493056, desired_height = 24768, layer = ZWLR_LAYER_SHELL_V1_LAYER_TOP, configure_serial = 0, actual_width = 387200, actual_height = 24960}
#1  0x00007f8ef9316c5e in wlr_signal_emit_safe () at /usr/lib/libwlroots.so.10
#2  0x00007f8ef93118f8 in  () at /usr/lib/libwlroots.so.10
#3  0x00007f8ef8a4a0e6 in  () at /usr/lib/libffi.so.8
#4  0x00007f8ef8a49497 in  () at /usr/lib/libffi.so.8
#5  0x00007f8ef9281ada in  () at /usr/lib/libwayland-server.so.0
#6  0x00007f8ef9286010 in  () at /usr/lib/libwayland-server.so.0
#7  0x00007f8ef92849e2 in wl_event_loop_dispatch () at /usr/lib/libwayland-server.so.0
#8  0x00007f8ef9285197 in wl_display_run () at /usr/lib/libwayland-server.so.0
#9  0x000055754168fc0f in run (startup_cmd=0x0) at dwl.c:1825
        socket = 0x6120000109d9 "wayland-0"
#10 0x00005575416951b1 in main (argc=1, argv=0x7ffe48071d18) at dwl.c:2634
        startup_cmd = 0x0
        c = -1

@sevz17
Copy link
Collaborator

sevz17 commented Aug 29, 2022

When I reconnect the HDMI it defaults it's position to 0,0 (before disconnection it was set to 1920,0) maybe because LVDS is taking that same 0,0 coordinates at the same time that the clients go to the disabled monitor? idk

Fixed

I have 2 similar backtraces that got trigerred when I disconnected the only monitor (HDMI) available while using an Xwayland client but I think is not related to this issue. What do you think?

These two aren't of #294, right?

1st_gdb.txt

...

2nd_gdb.txt

...

I got other 2 (rare?) backtraces. They are different but because I patched dwl.c with #294 I am gonna put it here

dwl needs at least one monitor in order to work properly. (I have doubts if dwl will ever work properly w/o monitor), however I pushed a change that may fix the crash if the monitor is just disabled.

@DarioTD
Copy link
Author

DarioTD commented Aug 29, 2022

These two aren't of #294, right?
Yes I got those 2 (1st_gdb.txt and 2nd_gdb.txt) while having dwl.c patched with #294.
What I wanted to say is that maybe those bugs might be related to the "main" branch too though I am not sure.

@sevz17
Copy link
Collaborator

sevz17 commented Aug 30, 2022

Oh, then, can you try in the main branch?

If you are able to reproduce that crashes (either on main branch or #294), can you send me the backtraces without modifying dwl.c (to see the lines in which the functions are called)

@DarioTD
Copy link
Author

DarioTD commented Aug 30, 2022

@sevz17 I had to git checkout main~ because #279 is giving me this backtrace without modifying dwl.c
Just by reconnecting an HDMI monitor and maybe? having a client fullscreen.
It doesn't matter if it's a wayland client or a X11 server client or having LVDS disabled or enabled or if I use main or patch dwl.c with #294

dwl_gdb.txt

Thread 1 "dwl" received signal SIGSEGV, Segmentation fault.
0x0000558e70b5bff3 in arrangelayer (m=0x558e734873c0, list=0x558e73487460, usable_area=0x7fff6f1bc140, exclusive=1) at dwl.c:513
513			struct wlr_layer_surface_v1 *wlr_layer_surface = layersurface->layer_surface;
#0  0x0000558e70b5bff3 in arrangelayer
    (m=0x558e734873c0, list=0x558e73487460, usable_area=0x7fff6f1bc140, exclusive=1)
    at dwl.c:513
        wlr_layer_surface = 0x0
        state = 0x0
        box = {x = 11, y = 0, width = -1845890048, height = 628121615}
        both_horiz = 1864089904
        both_vert = 32767
        bounds = {x = 0, y = 0, width = -128, height = -1}
        layersurface = 0xffffffffffffffd8
        full_area = {x = 0, y = 0, width = 0, height = 0}
#1  0x0000558e70b5c3d9 in arrangelayers (m=0x558e734873c0) at dwl.c:597
        i = 3
        usable_area = {x = 0, y = 0, width = 0, height = 0}
        layers_above_shell = {3, 2}
        layersurface = 0x1
#2  0x0000558e70b5db8a in destroylayersurfacenotify
    (listener=0x558e73488f58, data=0x558e73495b90) at dwl.c:1076
        layersurface = 0x558e73488f10
#3  0x00007fc1d2c23c5e in wlr_signal_emit_safe () at /usr/lib/libwlroots.so.10
#4  0x00007fc1d2c0bd40 in  () at /usr/lib/libwlroots.so.10
#5  0x00007fc1d2b918ba in  () at /usr/lib/libwayland-server.so.0
#6  0x00007fc1d2b93689 in wl_resource_destroy () at /usr/lib/libwayland-server.so.0
#7  0x00007fc1d25b00e6 in  () at /usr/lib/libffi.so.8
#8  0x00007fc1d25af497 in  () at /usr/lib/libffi.so.8
#9  0x00007fc1d2b8eada in  () at /usr/lib/libwayland-server.so.0
#10 0x00007fc1d2b93010 in  () at /usr/lib/libwayland-server.so.0
#11 0x00007fc1d2b919e2 in wl_event_loop_dispatch () at /usr/lib/libwayland-server.so.0
#12 0x00007fc1d2b92197 in wl_display_run () at /usr/lib/libwayland-server.so.0
#13 0x0000558e70b5fd44 in run (startup_cmd=0x0) at dwl.c:1836
        socket = 0x558e7312cb99 "wayland-0"
#14 0x0000558e70b62250 in main (argc=1, argv=0x7fff6f1bcad8) at dwl.c:2648
        startup_cmd = 0x0
        c = -1

dwl_asan.txt

=================================================================
==18358==ERROR: AddressSanitizer: heap-use-after-free on address 0x6110000df3d0 at pc 0x55f41a894944 bp 0x7fffef7ac1e0 sp 0x7fffef7ac1d0
READ of size 16 at 0x6110000df3d0 thread T0
    #0 0x55f41a894943 in arrangelayers dwl.c:588
    #1 0x55f41a8986a6 in destroylayersurfacenotify dwl.c:1077
    #2 0x7f3008627c5d in wlr_signal_emit_safe (/usr/lib/libwlroots.so.10+0x87c5d)
    #3 0x7f300860fd3f  (/usr/lib/libwlroots.so.10+0x6fd3f)
    #4 0x7f30085958b9  (/usr/lib/libwayland-server.so.0+0xb8b9)
    #5 0x7f3008597688 in wl_resource_destroy (/usr/lib/libwayland-server.so.0+0xd688)
    #6 0x7f3007d5b0e5  (/usr/lib/libffi.so.8+0x70e5)
    #7 0x7f3007d5a496  (/usr/lib/libffi.so.8+0x6496)
    #8 0x7f3008592ad9  (/usr/lib/libwayland-server.so.0+0x8ad9)
    #9 0x7f300859700f  (/usr/lib/libwayland-server.so.0+0xd00f)
    #10 0x7f30085959e1 in wl_event_loop_dispatch (/usr/lib/libwayland-server.so.0+0xb9e1)
    #11 0x7f3008596196 in wl_display_run (/usr/lib/libwayland-server.so.0+0xc196)
    #12 0x55f41a89dd49 in run dwl.c:1848
    #13 0x55f41a8a1f5a in main dwl.c:2634
    #14 0x7f300832c2cf  (/usr/lib/libc.so.6+0x232cf)
    #15 0x7f300832c389 in __libc_start_main (/usr/lib/libc.so.6+0x23389)
    #16 0x55f41a890dc4 in _start ../sysdeps/x86_64/start.S:115

0x6110000df3d0 is located 80 bytes inside of 224-byte region [0x6110000df380,0x6110000df460)
freed by thread T0 here:
    #0 0x7f3008732672 in __interceptor_free /usr/src/debug/gcc/libsanitizer/asan/asan_malloc_linux.cpp:52
    #1 0x55f41a895b02 in cleanupmon dwl.c:762
    #2 0x7f3008627c5d in wlr_signal_emit_safe (/usr/lib/libwlroots.so.10+0x87c5d)
    #3 0x61200000d2c7  (<unknown module>)

previously allocated by thread T0 here:
    #0 0x7f3008733411 in __interceptor_calloc /usr/src/debug/gcc/libsanitizer/asan/asan_malloc_linux.cpp:77
    #1 0x55f41a8a2011 in ecalloc util.c:14
    #2 0x55f41a89739b in createmon dwl.c:912
    #3 0x7f3008627c5d in wlr_signal_emit_safe (/usr/lib/libwlroots.so.10+0x87c5d)
    #4 0x7fffef7ac7ff  ([stack]+0x1e7ff)

SUMMARY: AddressSanitizer: heap-use-after-free dwl.c:588 in arrangelayers
Shadow bytes around the buggy address:
  0x0c2280013e20: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c2280013e30: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c2280013e40: fa fa fa fa fa fa fa fa fd fd fd fd fd fd fd fd
  0x0c2280013e50: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c2280013e60: fd fd fd fd fa fa fa fa fa fa fa fa fa fa fa fa
=>0x0c2280013e70: fd fd fd fd fd fd fd fd fd fd[fd]fd fd fd fd fd
  0x0c2280013e80: fd fd fd fd fd fd fd fd fd fd fd fd fa fa fa fa
  0x0c2280013e90: fa fa fa fa fa fa fa fa fd fd fd fd fd fd fd fd
  0x0c2280013ea0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c2280013eb0: fd fd fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c2280013ec0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
==18358==ABORTING

sevz17 added a commit that referenced this issue Aug 31, 2022
@sevz17
Copy link
Collaborator

sevz17 commented Aug 31, 2022

I revert that commit can you check again please?

@DarioTD
Copy link
Author

DarioTD commented Sep 1, 2022

Yeah it's been working great since I reverted the commit in my local git repo no crashes not even the Xwayland clients (they freeze when unfocused and don't go fullscreen cuz I can see the top and left client border but that's another issue unrelated to this one)

The only thing regarding this isssue which I have a workaround so I can bring the clients from LVDS (even though it is disabled) back to my HDMI monitor, by enabling LVDS and disabling it again

@sevz17
Copy link
Collaborator

sevz17 commented Sep 2, 2022

Yeah it's been working great since I reverted the commit in my local git repo no crashes not even the Xwayland clients (they freeze when unfocused and don't go fullscreen cuz I can see the top and left client border but that's another issue unrelated to this one)

Yeah, can you open a issue for it?

The only thing regarding this isssue which I have a workaround so I can bring the clients from LVDS (even though it is disabled) back to my HDMI monitor, by enabling LVDS and disabling it again

This should be fixed with the latest changes

@DarioTD
Copy link
Author

DarioTD commented Sep 2, 2022

The only thing regarding this isssue which I have a workaround so I can bring the clients from LVDS (even though it is disabled) back to my HDMI monitor, by enabling LVDS and disabling it again

This should be fixed with the latest changes

Yes, now clients don't go to LVDS anymore but only the clients that are tiled.
The clients that are floating (doesn't matter if they are focused or unfocused) are still affected. Instead of going to LVDS, now they are nowhere to be found.

And I got a segfault when I fullscreen a client with Mod+e and I reconnect the HDMI monitor while LVDS is disabled.

Thread 1 "dwl" received signal SIGSEGV, Segmentation fault.
0x00007f44c21e0ba8 in wl_list_insert () from /usr/lib/libwayland-server.so.0
#0  0x00007f44c21e0ba8 in wl_list_insert () at /usr/lib/libwayland-server.so.0
#1  0x00007f44c2274c1e in wlr_signal_emit_safe () at /usr/lib/libwlroots.so.10
#2  0x00007f44c223f46e in wlr_output_schedule_frame () at /usr/lib/libwlroots.so.10
#3  0x00007f44c2244ab0 in  () at /usr/lib/libwlroots.so.10
#4  0x00007f44c2274c5e in wlr_signal_emit_safe () at /usr/lib/libwlroots.so.10
#5  0x00007f44c1c010e6 in  () at /usr/lib/libffi.so.8
#6  0x00007f44c1c00497 in  () at /usr/lib/libffi.so.8
#7  0x00007f44c21dfada in  () at /usr/lib/libwayland-server.so.0
#8  0x00007f44c21e4010 in  () at /usr/lib/libwayland-server.so.0
#9  0x00007f44c21e29e2 in wl_event_loop_dispatch () at /usr/lib/libwayland-server.so.0
#10 0x00007f44c21e3197 in wl_display_run () at /usr/lib/libwayland-server.so.0
#11 0x0000559ea9269de6 in run (startup_cmd=0x0) at dwl.c:1846
        socket = 0x559eaa6afb89 "wayland-0"
#12 0x0000559ea926c2a8 in main (argc=1, argv=0x7ffc9c722608) at dwl.c:2655
        startup_cmd = 0x0
        c = -1

@sevz17
Copy link
Collaborator

sevz17 commented Sep 2, 2022

Can you try again, I did several changes that may solve that segfault, however if it persists I need you to compile wlroots with debug symbols and send me the backtrace (as you can see it doesn't say too much)

@DarioTD
Copy link
Author

DarioTD commented Sep 3, 2022

Can you try again, I did several changes that may solve that segfault, however if it persists I need you to compile wlroots with debug symbols and send me the backtrace (as you can see it doesn't say too much)

It persisted but now I installed wlroots-debug and wayland-debug which gave me this backtrace:

Thread 1 "dwl" received signal SIGSEGV, Segmentation fault.
0x00007f55c2f18ba8 in wl_list_insert (list=list@entry=0x55b8e07b8cb0, elm=elm@entry=0x7ffc16e2f200) at ../wayland-1.21.0/src/wayland-util.c:50
50		elm->next->prev = elm;

#0  0x00007f55c2f18ba8 in wl_list_insert
    (list=list@entry=0x55b8e07b8cb0, elm=elm@entry=0x7ffc16e2f200)
    at ../wayland-1.21.0/src/wayland-util.c:50
#1  0x00007f55c2facc1e in wlr_signal_emit_safe
    (signal=0x55b8e07b8cb0, data=0x55b8e07b8b10) at ../wlroots-0.15.1/util/signal.c:17
        cursor = {link = {prev = 0x55b8e07b8cb0, next = 0x0}, notify = 0x0}
        end = {link = {prev = 0x0, next = 0x0}, notify = 0x43800000780}
#2  0x00007f55c2f7746e in wlr_output_schedule_frame (output=0x55b8e07b8b10)
    at ../wlroots-0.15.1/types/output/output.c:804
#3  0x00007f55c2f7cab0 in scene_surface_handle_surface_commit
    (listener=0x55b8e096f4f8, data=<optimized out>)
    at ../wlroots-0.15.1/types/scene/wlr_scene.c:261
        scene_surface = 0x55b8e096f470
        surface = 0x55b8e09699f0
        scene = 0x55b8dfe3e640
        lx = 0
        ly = 0
        enabled = true
        scene_output = <optimized out>
#4  0x00007f55c2facc5e in wlr_signal_emit_safe
    (signal=<optimized out>, data=0x55b8e09699f0) at ../wlroots-0.15.1/util/signal.c:29
        pos = 0x55b8e096f4f8
        l = 0x55b8e096f4f8

                  cursor = {link = {prev = 0x55b8e096f4f8, next = 0x55b8e065cc28}, notify = 0x7f55c2f9fee0 <handle_noop.lto_priv>}

                  end = {link = {prev = 0x55b8e081be50, next = 0x55b8e0969ca0}, notify = 0x7f55c2f9fee0 <handle_noop.lto_priv>}
#5  0x00007f55c29390e6 in  () at /usr/lib/libffi.so.8
#6  0x00007f55c2938497 in  () at /usr/lib/libffi.so.8
#7  0x00007f55c2f17ada in wl_closure_invoke
    (closure=closure@entry=0x55b8e07eb500, target=<optimized out>, 
    target@entry=0x55b8e078c8b0, opcode=opcode@entry=6, data=<optimized out>, 
    data@entry=0x55b8e096fff0, flags=2) at ../wayland-1.21.0/src/connection.c:1025
        count = <optimized out>

                  cif = {abi = FFI_UNIX64, nargs = 2, arg_types = 0x7ffc16e2f490, rtype = 0x7f55c293a180 <ffi_type_void>, bytes = 0, flags = 0}

                  ffi_types = {0x7f55c293a060 <ffi_type_pointer>, 0x7f55c293a060 <ffi_type_pointer>, 0x7f55c293a0c0 <ffi_type_sint32>, 0x7f55c293a0c0 <ffi_type_sint32>, 0x7f55c293a0c0 <ffi_type_sint32>, 0x7f55c293a0c0 <ffi_type_sint32>, 0x7f55c2fef240 <xdg_toplevel_events.lto_priv>, 0x7f55c2cf9a33 <free+115>, 0x2, 0xc, 0xe, 0x7f55c2f16555 <wl_closure_close_fds+69>, 0x61, 0x7f55c2f19471 <log_closure+81>, 0x55b8e0a46380, 0xf3784831127b9f00, 0x7f55c2fc44af, 0xffffffffffffff80, 0x2, 0x55b8e062a510, 0x0, 0x3}

                  ffi_args = {0x7ffc16e2f450, 0x7ffc16e2f458, 0x55b8e07ec808, 0x55b8e07ec810, 0x1, 0xc, 0xe, 0xf3784831127b9f00, 0x55b8e07eb500, 0x7f55c2f19471 <log_closure+81>, 0x55b8e0a46380, 0x55b8dfe27010, 0x7f55c2e3bba0, 0x0, 0x7f55c2f23410 <wl_surface_requests+48>, 0x7f55c2cfa2a6 <calloc+214>, 0x16e2f680, 0xf3784831127b9f00, 0x2, 0x7f55c2f1e42d, 0x7f55c2f23470 <wl_surface_requests+144>, 0x0}
        implementation = <optimized out>
#8  0x00007f55c2f1c010 in wl_client_connection_data
    (fd=<optimized out>, mask=<optimized out>, data=<optimized out>)
    at ../wayland-1.21.0/src/wayland-server.c:437
        connection = <optimized out>
        resource = 0x55b8e078c8b0
        object = 0x55b8e078c8b0
        closure = <optimized out>
        message = 0x7f55c2f23470 <wl_surface_requests+144>
        p = {13, 524294}
        resource_flags = 0
        opcode = 6
        size = <optimized out>
        since = <optimized out>
        len = <optimized out>
#9  0x00007f55c2f1a9e2 in wl_event_loop_dispatch
    (loop=0x55b8dfe27100, timeout=timeout@entry=-1)
    at ../wayland-1.21.0/src/event-loop.c:1027

                      ep = {{events = 1, data = {ptr = 0x55b8e094fe80, fd = -527106432, u32 = 3767860864, u64 = 94252530204288}}, {events = 1, data = {ptr = 0x55b8e094fe80, fd = -527106432, u32 = 3767860864, u64 = 94252530204288}}, {events = 1, data = {ptr = 0x55b8e0651ae0, fd = -530244896, u32 = 3764722400, u64 = 94252527065824}}, {events = 1, data = {ptr = 0x55b8e094ce40, fd = -527118784, u32 = 3767848512, u64 = 94252530191936}}, {events = 3768654992, data = {ptr = 0x16e2f8c0000055b8, fd = 21944, u32 = 21944, u64 = 1649153917088454072}}, {events = 32764, data = {ptr = 0x55b8e0a14ca8, fd = -526299992, u32 = 3768667304, u64 = 94252531010728}}, {events = 3768659096, data = {ptr = 0x16e2f900000055b8, fd = 21944, u32 = 21944, u64 = 1649154191966361016}}, {events = 32764, data = {ptr = 0x7f55c2f17500 <wl_connection_flush+304>, fd = -1024363264, u32 = 3270604032, u64 = 140006319551744}}, {events = 1065353216, data = {ptr = 0x13000000000, fd = 0, u32 = 0, u64 = 1305670057984}}, {events = 0, data = {ptr = 0x7ffc16e2f920, fd = 383973664, u32 = 383973664, u64 = 140720692459808}}, {events = 0, data = {ptr = 0x36a4, fd = 13988, u32 = 13988, u64 = 13988}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 3768660796, data = {ptr = 0x130000055b8, fd = 21944, u32 = 21944, u64 = 1305670079928}}, {events = 0, data = {ptr = 0x55b8e0a12c98, fd = -526308200, u32 = 3768659096, u64 = 94252531002520}}, {events = 52, data = {ptr = 0x4000000000, fd = 0, u32 = 0, u64 = 274877906944}}, {events = 0, data = {ptr = 0x100000001, fd = 1, u32 = 1, u64 = 4294967297}}, {events = 29, data = {ptr = 0x2c00000029, fd = 41, u32 = 41, u64 = 188978561065}}, {events = 67, data = {ptr = 0x4800000046, fd = 70, u32 = 70, u64 = 309237645382}}, {events = 75, data = {ptr = 0x500000004d, fd = 77, u32 = 77, u64 = 343597383757}}, {events = 82, data = {ptr = 0x5700000055, fd = 85, u32 = 85, u64 = 373662154837}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 310091520, data = {ptr = 0xf3784831, fd = -210221007, u32 = 4084746289, u64 = 4084746289}}, {events = 0, data = {ptr = 0x55b8e096fff0, fd = -526974992, u32 = 3767992304, u64 = 94252530335728}}}
        source = <optimized out>
        i = 0
        count = <optimized out>
        has_timers = <optimized out>
#10 0x00007f55c2f1b197 in wl_display_run (display=0x55b8dfe27010)
    at ../wayland-1.21.0/src/wayland-server.c:1431
#11 0x000055b8ddea7d9b in run (startup_cmd=0x0) at dwl.c:1837
        socket = 0x55b8e0602c49 "wayland-0"
#12 0x000055b8ddeaa2bf in main (argc=1, argv=0x7ffc16e2fb98) at dwl.c:2651
        startup_cmd = 0x0
        c = -1

@sevz17
Copy link
Collaborator

sevz17 commented Sep 18, 2022

Sorry for the late reply, I've pushed some changes, can you try again please, but with this patch added on top of #294?

diff --git a/dwl.c b/dwl.c
index c8364e9..f21fb32 100644
--- a/dwl.c
+++ b/dwl.c
@@ -2666,6 +2666,7 @@ main(int argc, char *argv[])
 	/* Wayland requires XDG_RUNTIME_DIR for creating its communications socket */
 	if (!getenv("XDG_RUNTIME_DIR"))
 		die("XDG_RUNTIME_DIR must be set");
+	wlr_log_init(WLR_DEBUG, NULL);
 	setup();
 	run(startup_cmd);
 	cleanup();

@sevz17
Copy link
Collaborator

sevz17 commented Sep 23, 2022

@DarioTD?

@DarioTD
Copy link
Author

DarioTD commented Sep 24, 2022

Sorry for the late reply, I've pushed some changes, can you try again please, but with this patch added on top of #294?

Continuing.
[Detaching after fork from child process 30483]
[Detaching after fork from child process 30678]
[Detaching after fork from child process 30704]
[Detaching after fork from child process 30712]
[Detaching after fork from child process 30887]
[Detaching after fork from child process 30916]
[Detaching after fork from child process 30924]
[Detaching after fork from child process 30967]
[Detaching after fork from child process 31168]
[Detaching after fork from child process 31342]
[Detaching after fork from child process 31515]

Thread 1 "dwl" received signal SIGSEGV, Segmentation fault.
0x00007f80439daba8 in wl_list_insert (list=list@entry=0x558ac48310e0, elm=elm@entry=0x7ffd9a233e00) at ../wayland-1.21.0/src/wayland-util.c:50
50		elm->next->prev = elm;
#0  0x00007f80439daba8 in wl_list_insert
    (list=list@entry=0x558ac48310e0, elm=elm@entry=0x7ffd9a233e00)
    at ../wayland-1.21.0/src/wayland-util.c:50
#1  0x00007f8043a6ec1e in wlr_signal_emit_safe
    (signal=0x558ac48310e0, data=0x558ac4830f40) at ../wlroots-0.15.1/util/signal.c:17
        cursor = {link = {prev = 0x558ac48310e0, next = 0x0}, notify = 0x0}
        end = {link = {prev = 0x0, next = 0x0}, notify = 0x43800000780}
#2  0x00007f8043a3946e in wlr_output_schedule_frame (output=0x558ac4830f40)
    at ../wlroots-0.15.1/types/output/output.c:804
#3  0x00007f8043a3eab0 in scene_surface_handle_surface_commit
    (listener=0x558ac49c0f58, data=<optimized out>)
    at ../wlroots-0.15.1/types/scene/wlr_scene.c:261
        scene_surface = 0x558ac49c0ed0
        surface = 0x558ac49c3960
        scene = 0x558ac3eac9e0
        lx = 0
        ly = 0
        enabled = true
        scene_output = <optimized out>
#4  0x00007f8043a6ec5e in wlr_signal_emit_safe
    (signal=<optimized out>, data=0x558ac49c3960) at ../wlroots-0.15.1/util/signal.c:29
        pos = 0x558ac49c0f58
        l = 0x558ac49c0f58

                  cursor = {link = {prev = 0x558ac49c0f58, next = 0x558ac4a52d78}, notify = 0x7f8043a61ee0 <handle_noop.lto_priv>}

                  end = {link = {prev = 0x558ac4a9f750, next = 0x558ac49c3c10}, notify = 0x7f8043a61ee0 <handle_noop.lto_priv>}
#5  0x00007f80433fd0e6 in  () at /usr/lib/libffi.so.8
#6  0x00007f80433fc497 in  () at /usr/lib/libffi.so.8
#7  0x00007f80439d9ada in wl_closure_invoke
    (closure=closure@entry=0x558ac47f1920, target=<optimized out>, 
    target@entry=0x558ac48475b0, opcode=opcode@entry=6, data=<optimized out>, 
    data@entry=0x558ac482c280, flags=2) at ../wayland-1.21.0/src/connection.c:1025
        count = <optimized out>

                  cif = {abi = FFI_UNIX64, nargs = 2, arg_types = 0x7ffd9a234090, rtype = 0x7f80433fe180 <ffi_type_void>, bytes = 0, flags = 0}

                  ffi_types = {0x7f80433fe060 <ffi_type_pointer>, 0x7f80433fe060 <ffi_type_pointer>, 0x7f80433fe0c0 <ffi_type_sint32>, 0x7f80433fe0c0 <ffi_type_sint32>, 0x7f80433fe0c0 <ffi_type_sint32>, 0x7f80433fe0c0 <ffi_type_sint32>, 0x7f8043ab1240 <xdg_toplevel_events.lto_priv>, 0x7f80437bb9f3 <free+115>, 0x558ac47e51b0, 0x7f80439d8d06 <ring_buffer_put+70>, 0x0, 0x7f80439d8555 <wl_closure_close_fds+69>, 0x61, 0x7f80439db471 <log_closure+81>, 0x558ac4ac89e0, 0x6228b6e2ea858e00, 0x7f8043a864af, 0xffffffffffffff80, 0x2, 0x558ac4836390, 0x0, 0x3}

                  ffi_args = {0x7ffd9a234050, 0x7ffd9a234058, 0x558ac49c7768, 0x558ac49c7770, 0x0, 0xc, 0xe, 0x6228b6e2ea858e00, 0x558ac47d80a0, 0x7f80439db471 <log_closure+81>, 0x558ac4ac89e0, 0x558ac3e95410, 0x7f80438fdba0, 0x0, 0x7f80439e5410 <wl_surface_requests+48>, 0x7f80437bc266 <calloc+214>, 0x9a234280, 0x6228b6e2ea858e00, 0x2, 0x7f80439e042d, 0x7f80439e5470 <wl_surface_requests+144>, 0x0}
        implementation = <optimized out>
#8  0x00007f80439de010 in wl_client_connection_data
    (fd=<optimized out>, mask=<optimized out>, data=<optimized out>)
    at ../wayland-1.21.0/src/wayland-server.c:437
        connection = <optimized out>
        resource = 0x558ac48475b0
        object = 0x558ac48475b0
        closure = <optimized out>
        message = 0x7f80439e5470 <wl_surface_requests+144>
        p = {13, 524294}
        resource_flags = 0
        opcode = 6
        size = <optimized out>
        since = <optimized out>
        len = <optimized out>
#9  0x00007f80439dc9e2 in wl_event_loop_dispatch
    (loop=0x558ac3e95500, timeout=timeout@entry=-1)
    at ../wayland-1.21.0/src/event-loop.c:1027

                      ep = {{events = 1, data = {ptr = 0x558ac4abf870, fd = -995362704, u32 = 3299604592, u64 = 94054493452400}}, {events = 1, data = {ptr = 0x558ac4abf870, fd = -995362704, u32 = 3299604592, u64 = 94054493452400}}, {events = 1, data = {ptr = 0x558ac49c1f30, fd = -996401360, u32 = 3298565936, u64 = 94054492413744}}, {events = 1, data = {ptr = 0x98, fd = 152, u32 = 152, u64 = 152}}, {events = 3299449856, data = {ptr = 0x9a2344c00000558a, fd = 21898, u32 = 21898, u64 = 11106796697450206602}}, {events = 32765, data = {ptr = 0x558ac4a9cc18, fd = -995505128, u32 = 3299462168, u64 = 94054493309976}}, {events = 3299453960, data = {ptr = 0x9a2345000000558a, fd = 21898, u32 = 21898, u64 = 11106796972328113546}}, {events = 32765, data = {ptr = 0x7f80439d9500 <wl_connection_flush+304>, fd = 1134400768, u32 = 1134400768, u64 = 140188866942208}}, {events = 1065353216, data = {ptr = 0x9800000000, fd = 0, u32 = 0, u64 = 652835028992}}, {events = 0, data = {ptr = 0x7ffd9a234520, fd = -1708964576, u32 = 2586002720, u64 = 140727189456160}}, {events = 0, data = {ptr = 0x29c0, fd = 10688, u32 = 10688, u64 = 10688}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 3299456456, data = {ptr = 0x980000558a, fd = 21898, u32 = 21898, u64 = 652835050890}}, {events = 0, data = {ptr = 0x558ac4a9ac08, fd = -995513336, u32 = 3299453960, u64 = 94054493301768}}, {events = 4, data = {ptr = 0x1800000000, fd = 0, u32 = 0, u64 = 103079215104}}, {events = 0, data = {ptr = 0x100000001, fd = 1, u32 = 1, u64 = 4294967297}}, {events = 45, data = {ptr = 0x3d00000038, fd = 56, u32 = 56, u64 = 261993005112}}, {events = 64, data = {ptr = 0x4600000043, fd = 67, u32 = 67, u64 = 300647710787}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 3934621184, data = {ptr = 0x6228b6e2, fd = 1646835426, u32 = 1646835426, u64 = 1646835426}}, {events = 0, data = {ptr = 0x558ac482c280, fd = -998063488, u32 = 3296903808, u64 = 94054490751616}}}
        source = <optimized out>
        i = 0
        count = <optimized out>
        has_timers = <optimized out>
#10 0x00007f80439dd197 in wl_display_run (display=0x558ac3e95410)
    at ../wayland-1.21.0/src/wayland-server.c:1431
#11 0x0000558ac1f63e43 in run (startup_cmd=0x0) at dwl.c:1859
        socket = 0x558ac4671af9 "wayland-0"
#12 0x0000558ac1f6633a in main (argc=1, argv=0x7ffd9a234798) at dwl.c:2670
        startup_cmd = 0x0
        c = -1
Continuing.
Couldn't get registers: No such process.
[Thread 0x7f803765a6c0 (LWP 30219) exited]
[Thread 0x7f8037e8f6c0 (LWP 30218) exited]
[Thread 0x7f8036cd66c0 (LWP 30220) exited]

Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.

@sevz17
Copy link
Collaborator

sevz17 commented Sep 29, 2022

Ah, my bad, can you send me the output of dwl (e.g dwl 2> dwl.log)

The backtrace it's unclear about what we are calling to make it crash

@sevz17
Copy link
Collaborator

sevz17 commented Oct 11, 2022

@DarioTD, I fix something similar to the backtrace you post (#314), now it's in #294, please can you try again?

@sevz17
Copy link
Collaborator

sevz17 commented Oct 23, 2022

@DarioTD?

@sevz17 sevz17 mentioned this issue Nov 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants