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

GLib 2.76, Mutter 42/43: Dragging window between workspace in multitasking view crashes gala #1580

Closed
bobby285271 opened this issue Mar 22, 2023 · 6 comments

Comments

@bobby285271
Copy link
Member

bobby285271 commented Mar 22, 2023

What Happened?

The backtrace is mostly about mutter, I wonder if this issue will just become a mutter issue tracker 🙃


I am testing Gala 7.0.1 + mutter 42.9 (with GNOME/mutter@cff631c backported due to a log spam) + GSD 42.2 + everything else GNOME 44 (i.e. GLib 2.76.0 which has slice allocator removed) on NixOS and noticed the issue mentioned on the title (edit: same is happening with mutter 43.4 built with glib 2.76).

When crashes it shows a oh no something went wrong screen and you have to re-login.

#0  clutter_actor_run_actions (self=0x4e857a0, phase=CLUTTER_PHASE_BUBBLE, event=0x62f74b0) at ../clutter/clutter/clutter-actor.c:12318
#1  clutter_actor_event (actor=actor@entry=0x4e857a0, event=event@entry=0x62f74b0, capture=capture@entry=0) at ../clutter/clutter/clutter-actor.c:12365
#2  0x00007fdb6853fc06 in _clutter_actor_handle_event (self=self@entry=0x1f53150, root=0x4e857a0, event=event@entry=0x62f74b0) at ../clutter/clutter/clutter-actor.c:19172
#3  0x00007fdb68573f69 in emit_event_chain (event=0x62f74b0, target=0x1f53150) at ../clutter/clutter/clutter-main.c:681
#4  emit_event (event=<optimized out>, target=<optimized out>) at ../clutter/clutter/clutter-main.c:699
#5  _clutter_process_event_details (context=0x1d753c0, event=0x62f74b0, stage=0x1f71980) at ../clutter/clutter/clutter-main.c:899
#6  _clutter_process_event (event=event@entry=0x62f74b0) at ../clutter/clutter/clutter-main.c:989
#7  0x00007fdb6858e910 in _clutter_stage_queue_event (stage=0x1f71980, event=0x62f74b0, copy_event=1) at ../clutter/clutter/clutter-stage.c:623
#8  0x00007fdb68573d8e in clutter_do_event (event=<optimized out>) at ../clutter/clutter/clutter-main.c:829
#9  0x00007fdb686a0ac8 in meta_x11_handle_event (backend=backend@entry=0x1c56760, xevent=xevent@entry=0x7ffc050c11a0) at ../src/backends/x11/meta-event-x11.c:106
#10 0x00007fdb6869f015 in handle_host_xevent (event=0x7ffc050c11a0, backend=0x1c56760) at ../src/backends/x11/meta-backend-x11.c:405
#11 x_event_source_dispatch (source=<optimized out>, callback=<optimized out>, user_data=<optimized out>) at ../src/backends/x11/meta-backend-x11.c:458
#12 0x00007fdb696bfdad in g_main_dispatch (context=0x1c55040) at ../glib/gmain.c:3460
#13 g_main_context_dispatch (context=context@entry=0x1c55040) at ../glib/gmain.c:4200
#14 0x00007fdb696c0058 in g_main_context_iterate (context=0x1c55040, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4276
#15 0x00007fdb696c030f in g_main_loop_run (loop=0x2814060) at ../glib/gmain.c:4479
#16 0x00007fdb686de875 in meta_context_run_main_loop (context=<optimized out>, error=error@entry=0x7ffc050c13e8) at ../src/core/meta-context.c:437
#17 0x000000000042d7f4 in gala_main (args=<optimized out>, args_length1=<optimized out>) at ../src/Main.vala:85
#18 0x00007fdb6802924e in __libc_start_call_main (main=main@entry=0x4219f0 <main>, argc=argc@entry=1, argv=argv@entry=0x7ffc050c1828) at ../sysdeps/nptl/libc_start_call_main.h:58
#19 0x00007fdb68029309 in __libc_start_main_impl (main=0x4219f0 <main>, argc=1, argv=0x7ffc050c1828, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, 
    stack_end=0x7ffc050c1818) at ../csu/libc-start.c:389
#20 0x0000000000421a25 in _start ()

I am seeing similar backtrace in https://gitlab.gnome.org/GNOME/mutter/-/issues/2495.

Steps to Reproduce

Not likely will happen on elementary OS 7 I assume.

  1. Go to multitasking view
  2. Open some windows
  3. Drag one of the window to another workspace
  4. Saw the oh no sth went wrong screen

Expected Behavior

No crash.

OS Version

Other Linux

Software Version

Latest release (I have run all updates)

Log Output

No response

Hardware Info

No response

@bobby285271
Copy link
Member Author

bobby285271 commented Mar 22, 2023

I managed to reproduce this issue on a mutter 42.9 + GSD 42.2 + everything else GNOME 43 (GLib 2.74.5) system with G_SLICE=always-malloc so I guess this will be the way to reproduce on elementary OS and since unsetting the environment variable this works fine I guess this is some memory management issue 🙃

@tintou
Copy link
Member

tintou commented Mar 22, 2023

Have you tried using mutter directly instead of Gala and see if it happens?

@bobby285271
Copy link
Member Author

bobby285271 commented Mar 23, 2023

Not sure how to trigger the crash when using mutter --replace 😿

(P.s.: We just did some other attempt in the Nixpkgs PR)
(P.P.s.: Another attempt here)

@bobby285271 bobby285271 changed the title NixOS: Dragging window between workspace in multitasking view crashes gala GLib 2.76: Dragging window between workspace in multitasking view crashes gala Mar 23, 2023
@bobby285271
Copy link
Member Author

bobby285271 commented Mar 24, 2023

We worked around the crash with this patch (I pasted the patch in the mutter issue as well).

P.s.: We also noticed the windows are not placed in correct location with glib 2.76 + mutter 42 in multitasking view, so far we are giving mutter 43 a try (screenshots here and I guess I probably want to try gala HEAD commit as well, I will probably create an new issue if I failed to manage this.


I assume when the fix commit hits the master branch of nixpkgs this issue should auto closed - though it can take some days/weeks.

bobby285271 added a commit to NixOS/nixpkgs that referenced this issue Mar 25, 2023
This is a downstream patch because the code path is gone in mutter 44.
We should give mutter 44 some try once gala supports it.

Fixes elementary/gala#1580
@bobby285271 bobby285271 changed the title GLib 2.76: Dragging window between workspace in multitasking view crashes gala GLib 2.76, Mutter 42/43: Dragging window between workspace in multitasking view crashes gala Mar 27, 2023
@bobby285271
Copy link
Member Author

I gave 46e2791 + mutter 44.0 a try, so far I cannot reproduce the crash, I will see if we should default to 44 when ready 🙈

jtojnar pushed a commit to NixOS/nixpkgs that referenced this issue Apr 5, 2023
This is a downstream patch because the code path is gone in mutter 44.
We should give mutter 44 some try once gala supports it.

Fixes elementary/gala#1580
@bobby285271
Copy link
Member Author

For the record for mutter 43 we now have https://gitlab.gnome.org/GNOME/mutter/-/commit/951b2a98b5c18c258aecbb9c1f853367d0463748. I still need to do some testing but I think it is doing what I think 🙈

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

2 participants