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

SIGSEGV on interrupt when running with xwayland #408

Open
sdumetz opened this issue Feb 25, 2025 · 0 comments
Open

SIGSEGV on interrupt when running with xwayland #408

sdumetz opened this issue Feb 25, 2025 · 0 comments

Comments

@sdumetz
Copy link

sdumetz commented Feb 25, 2025

I'm getting segfaults when I run cage from a terminal and stop it using SIGINT or SIGTERM. I'm not 100% sure it's a bug and it might be from my environment but I couldn't find where. It happens when running cage glxgears from a terminal but other clients were causing it too.

Tested it on v0.2.0 and master branch.

For some reason when view_unmap is called, scene_node_get_root does end up with an invalid parent pointer.

Full stack trace
#0  0x00005555555cb006 in scene_node_get_root (node=0x5555559848a0)
    at ../subprojects/wlroots-0.18.1/types/scene/wlr_scene.c:51
#1  0x00005555555cb134 in wlr_scene_node_destroy (node=0x5555559848a0)
    at ../subprojects/wlroots-0.18.1/types/scene/wlr_scene.c:102
#2  0x000055555558273c in view_unmap (view=0x555555b14680) at ../view.c:118
#3  0x0000555555583831 in handle_xwayland_surface_unmap (listener=0x555555b14710, data=0x0)
    at ../xwayland.c:119
#4  0x00005555555879f6 in wl_signal_emit_mutable (signal=0x555555b27778, data=0x0)
    at ../subprojects/wayland-1.23.1/src/wayland-server.c:2314
#5  0x00005555555df244 in wlr_surface_unmap (surface=0x555555b27480)
    at ../subprojects/wlroots-0.18.1/types/wlr_compositor.c:839
#6  0x0000555555601fd6 in xwayland_surface_dissociate (xsurface=0x555555b27030)
    at ../subprojects/wlroots-0.18.1/xwayland/xwm.c:460
#7  0x000055555560332a in xwayland_surface_handle_addon_destroy (addon=0x555555b27088)
    at ../subprojects/wlroots-0.18.1/xwayland/xwm.c:912
#8  0x00005555555fafc7 in wlr_addon_set_finish (set=0x555555b277b8)
    at ../subprojects/wlroots-0.18.1/util/addon.c:18
#9  0x00005555555decc6 in surface_handle_resource_destroy (resource=0x555555984250)
    at ../subprojects/wlroots-0.18.1/types/wlr_compositor.c:731
#10 0x00005555555858aa in remove_and_destroy_resource (element=0x555555984250, data=0x0, flags=0)
    at ../subprojects/wayland-1.23.1/src/wayland-server.c:757
#11 0x000055555558454f in for_each_helper (entries=0x5555559cccd0, 
    func=0x55555558581a <remove_and_destroy_resource>, data=0x0)
    at ../subprojects/wayland-1.23.1/src/wayland-util.c:430
#12 0x000055555558459e in wl_map_for_each (map=0x5555559cccd0, 
--Type <RET> for more, q to quit, c to continue without paging--
    func=0x55555558581a <remove_and_destroy_resource>, data=0x0)
    at ../subprojects/wayland-1.23.1/src/wayland-util.c:444
#13 0x0000555555585cd2 in wl_client_destroy (client=0x5555559ccca0)
    at ../subprojects/wayland-1.23.1/src/wayland-server.c:961
#14 0x0000555555621e0a in server_finish_process (server=0x555555940a70)
    at ../subprojects/wlroots-0.18.1/xwayland/server.c:153
#15 0x0000555555622a21 in wlr_xwayland_server_destroy (server=0x555555940a70)
    at ../subprojects/wlroots-0.18.1/xwayland/server.c:445
#16 0x0000555555600cd6 in wlr_xwayland_destroy (xwayland=0x555555940b60)
    at ../subprojects/wlroots-0.18.1/xwayland/xwayland.c:90
#17 0x000055555557ea5a in main (argc=2, argv=0x7fffffffd788) at ../cage.c:599

I'm running cage from a terminal under a wayland dektop. For some reason when debug is enabled, the wayland backend keeps complaining about Unsupported buffer format, not sure if that's linked.

It doesn't seem to happen when running under a tty over the DRM backend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant