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

gnome.mutter42: 42.7 → 42.9 #222374

Closed
wants to merge 2 commits into from

Conversation

bobby285271
Copy link
Member

@bobby285271 bobby285271 commented Mar 21, 2023

https://gitlab.gnome.org/GNOME/mutter/-/compare/42.7...42.9

Description of changes

This is the last mutter42 release, this is now EOL.

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.05 Release Notes (or backporting 22.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@github-actions github-actions bot added the 6.topic: GNOME GNOME desktop environment and its underlying platform label Mar 21, 2023
@ofborg ofborg bot requested a review from davidak March 21, 2023 16:44
@bobby285271 bobby285271 marked this pull request as ready for review March 22, 2023 00:47
@bobby285271
Copy link
Member Author

bobby285271 commented Mar 22, 2023

I want a backport for https://gitlab.gnome.org/GNOME/mutter/-/issues/2566 as well, I managed to reproduce the log spam when testing GNOME 44 PR (the log is available in the upstream issue) 😓

(For cinnamon there is a new muffin release to address that - #222449)

@bobby285271 bobby285271 marked this pull request as draft March 22, 2023 01:01
@bobby285271
Copy link
Member Author

@ofborg test pantheon

@bobby285271
Copy link
Member Author

[GNOME 44 PR] Crash when dragging window to another workspace in multitasking view 💦

#0  clutter_actor_run_actions (self=0x143c960, phase=CLUTTER_PHASE_BUBBLE, event=0x2e26390) at ../clutter/clutter/clutter-actor.c:12318
#1  clutter_actor_event (actor=actor@entry=0x143c960, event=event@entry=0x2e26390, capture=capture@entry=0) at ../clutter/clutter/clutter-actor.c:12365
#2  0x00007f4fb6b3fc06 in _clutter_actor_handle_event (self=self@entry=0x97b5c0, root=0x143c960, event=event@entry=0x2e26390) at ../clutter/clutter/clutter-actor.c:19172
#3  0x00007f4fb6b73f69 in emit_event_chain (event=0x2e26390, target=0x97b5c0) 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=0x7b2500, event=0x2e26390, stage=0x9a81b0) at ../clutter/clutter/clutter-main.c:899
#6  _clutter_process_event (event=event@entry=0x2e26390) at ../clutter/clutter/clutter-main.c:989
#7  0x00007f4fb6b8e910 in _clutter_stage_queue_event (stage=0x9a81b0, event=0x2e26390, copy_event=1) at ../clutter/clutter/clutter-stage.c:623
#8  0x00007f4fb6b73d8e in clutter_do_event (event=<optimized out>) at ../clutter/clutter/clutter-main.c:829
#9  0x00007f4fb6ca0ac8 in meta_x11_handle_event (backend=backend@entry=0x693760, xevent=xevent@entry=0x7fff75a301a0) at ../src/backends/x11/meta-event-x11.c:106
#10 0x00007f4fb6c9f015 in handle_host_xevent (event=0x7fff75a301a0, backend=0x693760) 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 0x00007f4fb7cc4dad in g_main_dispatch (context=0x692040) at ../glib/gmain.c:3460
#13 g_main_context_dispatch (context=context@entry=0x692040) at ../glib/gmain.c:4200
#14 0x00007f4fb7cc5058 in g_main_context_iterate (context=0x692040, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4276
#15 0x00007f4fb7cc530f in g_main_loop_run (loop=0x14ea7d0) at ../glib/gmain.c:4479
#16 0x00007f4fb6cde875 in meta_context_run_main_loop (context=<optimized out>, error=error@entry=0x7fff75a303e8) 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 0x00007f4fb662924e in __libc_start_call_main (main=main@entry=0x4219f0 <main>, argc=argc@entry=1, argv=argv@entry=0x7fff75a30828) at ../sysdeps/nptl/libc_start_call_main.h:58
#19 0x00007f4fb6629309 in __libc_start_main_impl (main=0x4219f0 <main>, argc=1, argv=0x7fff75a30828, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, 
    stack_end=0x7fff75a30818) at ../csu/libc-start.c:389
#20 0x0000000000421a25 in _start ()

@bobby285271
Copy link
Member Author

bobby285271 commented Mar 22, 2023

@bobby285271
Copy link
Member Author

bobby285271 commented Mar 22, 2023

Looks like clutter_actor_run_actions is gone in GNOME 44 with some gestures change? Trying to visit the git history

@bobby285271
Copy link
Member Author

Forwarded to elementary/gala#1580 for now 🙃

@bobby285271
Copy link
Member Author

Actually making a i-don't-know-what-this-might-break-but-this-fixes-the-original-problem fix looks easy 🤡

substituteInPlace clutter/clutter/clutter-actor.c --replace \
  "actions = _clutter_meta_group_peek_metas (priv->actions);" \
  "actions = g_list_copy ((GList *)_clutter_meta_group_peek_metas (priv->actions));"

@jtojnar
Copy link
Member

jtojnar commented Mar 23, 2023

That does not sound like it should fix anything. g_list_copy just makes a shallow copy of the (linked) list so if it crashes in https://gitlab.gnome.org/GNOME/mutter/-/blob/42.9/clutter/clutter/clutter-actor.c#L12318, it should crash when copying the list. The dereferencing would need to occur for shallow copy as well.

Edit: yeah, it does https://gitlab.gnome.org/GNOME/glib/-/blob/bd63436fadf5f36001fa5223d3f4e6dc0a7d56cc/glib/glist.c#L766

@bobby285271
Copy link
Member Author

🙃 Ugh, I actually started trying this since the backtrace also reminds me of the openbox crash (patch) Trying to learn how to use valgrind right now (sorry)

@jtojnar
Copy link
Member

jtojnar commented Mar 23, 2023

Ah, reading the Xfce commit explains it. Presumably some of the functions in the loop modify the actions list: https://gitlab.xfce.org/xfce/xfce4-session/-/commit/321ca64377eb8ddf5572f260e78f119c9e87dd8b

@bobby285271
Copy link
Member Author

Inspired by #222696, this seems to work too ??? 🙃 Comparing to my last patch this does not seem to mess up some of my programs

(I am on nixos-unstable branch right now but have environment.sessionVariables."G_SLICE" = "always-malloc" set, hopefully this is a okay way to test things, will switch back to gnome branch when I finished some of my $work)

diff --git a/clutter/clutter/clutter-actor.c b/clutter/clutter/clutter-actor.c
index d34c8f59f..8835a6a33 100644
--- a/clutter/clutter/clutter-actor.c
+++ b/clutter/clutter/clutter-actor.c
@@ -12304,7 +12304,7 @@ clutter_actor_run_actions (ClutterActor       *self,
                            ClutterEventPhase   phase)
 {
   ClutterActorPrivate *priv;
-  const GList *actions, *l;
+  const GList *actions, *l, *next;
   gboolean retval = CLUTTER_EVENT_PROPAGATE;
 
   priv = self->priv;
@@ -12313,9 +12313,10 @@ clutter_actor_run_actions (ClutterActor       *self,
 
   actions = _clutter_meta_group_peek_metas (priv->actions);
 
-  for (l = actions; l; l = l->next)
+  for (l = actions; l; l = next)
     {
       ClutterAction *action = l->data;
+      next = l->next;
       ClutterEventPhase action_phase;
 
       action_phase = clutter_action_get_phase (action);

@bobby285271
Copy link
Member Author

Replaced by #222752 (which is manually pushed to gnome branch)

@bobby285271 bobby285271 deleted the upd/gnome.mutter42 branch March 25, 2023 08:34
@bobby285271
Copy link
Member Author

Gala has some very early WIP support for mutter 44 now. From my testing so far I cannot reproduce the crash with mutter 44.

@bobby285271 bobby285271 mentioned this pull request Apr 26, 2023
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants