-
Notifications
You must be signed in to change notification settings - Fork 108
Description
Distribution
Linux Mint 22.2 Zara
Package version
Cinnamon 6.4.8+xia, libmuffin 6.4.1+xia
Graphics hardware in use
Intel Alder Lake-P Integrated Graphics, driver: i915, CPU 12th Gen Intel Core i5-1240P
Frequency
Quite often
Bug description
Cinnamon crashes in libmuffin-clutter-0.so.0.0.0. From kern.log:
cinnamon[62228]: segfault at 20 ip 0000790da361369b sp 00007ffc3022aa20 error 4 in libmuffin-clutter-0.so.0.0.0[790da35f5000+a4000] likely on CPU 9 (core 17, socket 0)
gdb info see below.
Steps to reproduce
The crash happens only when a new window is expected to appear. The Cinnamon crash popup appears and I can confirm the restart of cinnamon which again works as normal after a few seconds (and the new window can be seen and used).
It does not always happen for new windows but maybe about 5% of the time a new window is expected to appear.
Such windows can be libre office document windows, firefox windows, nemo windows etc.
Expected behavior
No crash.
Additional information
I do have about 17 core dumps from the last 14 days. The problem happens for me since a few years, so not directly related to Mint, Cinnamon or Muffin version. Although I can not be sure, that the root cause was always the same.
It happens with kernel 6.8 and kernel 6.14.
gdb info: all crashes show it happening in:
_clutter_actor_queue_only_relayout (self=0x0) at ../clutter/clutter/clutter-actor.c:9304
From "threads apply all bt full" in gdb:
Thread 1 (Thread 0x790d9c2a9680 (LWP 62228)):
#0 _clutter_actor_queue_only_relayout (self=0x0) at ../clutter/clutter/clutter-actor.c:9304
priv = <optimized out>
#1 clutter_actor_add_child_internal (data=<optimized out>, add_func=<optimized out>, flags=<optimized out>, child=0x5ba87c2b8940, self=0x5ba8795ae320) at ../clutter/clutter/clutter-actor.c:13275
emit_parent_set = <optimized out>
emit_actor_added = <optimized out>
text_dir = <optimized out>
create_meta = <optimized out>
notify_first_last = 1
show_on_set_parent = <optimized out>
old_first_child = 0x0
obj = 0x5ba8795ae320
check_state = <optimized out>
old_last_child = <optimized out>
text_dir = <optimized out>
create_meta = <optimized out>
emit_parent_set = <optimized out>
emit_actor_added = <optimized out>
check_state = <optimized out>
notify_first_last = <optimized out>
show_on_set_parent = <optimized out>
old_first_child = <optimized out>
old_last_child = <optimized out>
obj = <optimized out>
__func__ = {<optimized out> <repeats 33 times>}
_g_boolean_var_137 = <optimized out>
#2 clutter_actor_add_child_internal (self=0x5ba8795ae320, child=0x5ba87c2b8940, flags=<optimized out>, add_func=<optimized out>, data=<optimized out>) at ../clutter/clutter/clutter-actor.c:13084
text_dir = <optimized out>
create_meta = <optimized out>
emit_parent_set = <optimized out>
emit_actor_added = <optimized out>
check_state = <optimized out>
notify_first_last = <optimized out>
show_on_set_parent = <optimized out>
old_first_child = <optimized out>
old_last_child = <optimized out>
obj = <optimized out>
__func__ = "clutter_actor_add_child_internal"
_g_boolean_var_137 = <optimized out>
Code in question (line 9304):
9301 void
9302 _clutter_actor_queue_only_relayout (ClutterActor *self)
9303 {
9304 ClutterActorPrivate *priv = self->priv;
9305
called from line 13275:
13083 static inline void
13084 clutter_actor_add_child_internal (ClutterActor *self,
13085 ClutterActor *child,
13086 ClutterActorAddChildFlags flags,
13087 ClutterActorAddChildFunc add_func,
13088 gpointer data)
13089 {
...
13187 g_object_ref_sink (child);
13188 child->priv->parent = NULL;
13189 child->priv->next_sibling = NULL;
13190 child->priv->prev_sibling = NULL;
13191
13192 /* delegate the actual insertion */
13193 add_func (self, child, data);
13194
13195 g_assert (child->priv->parent == self);
...
13271 /* we only queue a relayout here, because any possible
13272 * redraw has already been queued either by show() or
13273 * by our call to queue_redraw() above
13274 */
13275 _clutter_actor_queue_only_relayout (child->priv->parent);
Somehow child->priv->parent gets corrupted (NULL). I assume, although it is explicitly set to NULL in line 13188 it probably gets set to non-null in 13193, though I am not sure whether the g:assert() in 13195 is enabled.
I could try to add a NULL check at the beginning of _clutter_actor_queue_only_relayout() (returning from the function if self is NULL) and recompile the lib to see whether that helps. If you think that workaround is viable the result would be helpful, let me know. Of course it would be better to find out, why the pointer is NULL in the first place.