Cinnamon segfault in `_cogl_pipeline_free` from `_cogl_journal_discard` during `cogl_onscreen_swap_buffers_with_damage`
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 18/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- c, linux
- Área
- computer-graphics, desktop-dev
Línea de trabajo
The crash is in _cogl_pipeline_free in cogl/cogl/cogl-pipeline.c (around lines 375 and 390), reached through _cogl_journal_discard in cogl-journal.c during cogl_flush from cogl_onscreen_swap_buffers_with_damage. Start by finding where a pipeline's last reference is dropped while it is still held by a journal entry, and by reviewing the journal ref counting. Done means the double free or use-after-free is identified and fixed, and a reproducer or test covers it. Coordinate with maintainers first, since the reproduction is unknown.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Distribution: Linux Mint 22.3 (zena), kernel 7.0.0-38-generic, X11 session
Package version: Cinnamon 6.6.9, Muffin 6.6.3+zena
Graphics hardware in use: NVIDIA GeForce RTX 4090 (single GPU), driver 580.178.04 (open kernel module); 3 monitors over DisplayPort (3072x1728 + 2560x1440 + 3072x1728)
Frequency: Only occasionally (twice in ~20 hours: 2026-11-11 12:46 and 2026-11-12 09:05)
Bug description
Cinnamon segfaults while redrawing the stage, and cinnamon-launcher falls back to metacity. Both crashes have the same stack trace. Nothing is logged in the minutes before either crash.
Kernel line from the latest crash:
cinnamon[6328]: segfault at 187 ip 000074f2bdc73b83 sp 00007ffcf04d8110 error 4 in libmuffin-cogl-0.so.0.0.0[2eb83,74f2bdc57000+4d000]
Backtrace with muffin-dbg installed (2026-11-12 crash):
#0 _cogl_pipeline_free (pipeline=0x59eaba0b6820) at ../cogl/cogl/cogl-pipeline.c:375
#1 _cogl_object_pipeline_indirect_free (obj=0x59eaba0b6820) at ../cogl/cogl/cogl-pipeline.c:69
#2 _cogl_pipeline_journal_unref (pipeline=<optimized out>) at ../cogl/cogl/cogl-pipeline.c:2329
#3 _cogl_journal_discard (journal=<optimized out>) at ../cogl/cogl/cogl-journal.c:1261
#4 _cogl_journal_discard (journal=0x59eab8bd2220) at ../cogl/cogl/cogl-journal.c:1250
#5 _cogl_journal_flush (journal=0x59eab8bd2220) at ../cogl/cogl/cogl-journal.c:1477
#6 _cogl_journal_flush (journal=0x59eab8bd2220) at ../cogl/cogl/cogl.c:154
#7 _cogl_framebuffer_flush_journal (framebuffer=<optimized out>) at ../cogl/cogl/cogl-framebuffer.c:577
#8 cogl_flush () at ../cogl/cogl/cogl.c:155
#9 cogl_onscreen_swap_buffers_with_damage (n_rectangles=6, ...) at ../cogl/cogl/cogl-onscreen.c:309
#10 cogl_onscreen_swap_buffers_with_damage (...) at ../cogl/cogl/cogl-onscreen.c:294
#11 swap_framebuffer.isra.0 (..., swap_with_damage=1, ...) at ../clutter/clutter/cogl/clutter-stage-cogl.c:445
#12 clutter_stage_cogl_redraw_view (...) at ../clutter/clutter/cogl/clutter-stage-cogl.c:976
#13 clutter_stage_cogl_redraw (...) at ../clutter/clutter/cogl/clutter-stage-cogl.c:1023
#14 _clutter_stage_window_redraw (...) at ../clutter/clutter/clutter-stage-window.c:219
#15 clutter_stage_do_redraw (...) at ../clutter/clutter/clutter-stage.c:1450
... g_main_loop_run -> meta_run -> main
The 2026-11-11 crash has the same frames #1–#15. Frame #0 is in the same function, at cogl-pipeline.c:390 instead of 375.
What the pipeline looks like at the crash
Line 375 is the _cogl_bitmask_popcount (&uniforms_state->override_mask) read in the COGL_PIPELINE_STATE_UNIFORMS branch. big_state is 0xff, so uniforms_state resolves to 0x187, which is the faulting address. *pipeline at frame #0:
ref_count = 0, journal_ref_count = 0, parent = 0x0, has_parent_reference = 1,
differences = 2, has_big_state = 0, big_state = 0xff, n_layers = 1,
destroy_callback = 0x4100000000000000, destroy_data = 0x3f80000000000000,
color = {red = 234, green = 89, blue = 0, alpha = 0,
padding0 = 3142241680, padding1 = 23018, padding2 = 3139531408}
In the 11-11 crash, big_state = 0xeded0b4261786000 and destroy_callback = 0x40a00000. destroy_callback and destroy_data hold float-like bit patterns (8.0f/5.0f and 1.0f), big_state is garbage while has_big_state = 0, and color holds heap-pointer fragments. This looks like the pipeline's memory was freed and reused while a journal entry still referred to it. Something seems to drop the last reference to a pipeline that is still queued in the framebuffer journal, or frees it outside the refcount, and _cogl_journal_discard then frees it again.
Steps to reproduce
I don't have a reliable reproducer. The crashes happen during normal desktop use (browser, terminals, IDE) on a 3-monitor NVIDIA setup. There's no clear trigger, and nothing is logged by Cinnamon, applets or Xorg beforehand.
Expected behavior
Cinnamon shouldn't crash while flushing the journal during a buffer swap.
Additional information
- Core dumps for both crashes are available and I can run more gdb commands on request.
- A different Muffin crash on 2026-11-03 (in
window_may_be_covered_by_above) is probably unrelated.
- Lenguaje dominante
- C
- Estrellas
- 249
- Forks
- 133
- Merge medio
- 17 min
- PR fusionados (30 d)
- 1
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de linuxmint/muffin
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 43/100
-
X11: every keyboard layout switch freezes the compositor for up to ~1 s (reload_keybindings regrabs per-window keybindings on every window)Posiblemente ocupada @KAMI911 la tomó hace 7 días. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 30/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
Todos los issues de linuxmint/muffin
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
389ds/389-ds-base#8152 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
isolation2 lockmodes fails on cassert builds: extra AccessShareLock on partition rootPosiblemente ocupada @tuhaihe la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
apache/cloudberry#2356 ·
Los mantenedores suelen responder en 2 días
-
windows-artifacts: the win-arm64 job uses a Visual Studio generator missing from windows-11-armAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 86/100
-
documentation
Dificultad 1/5 Menos de una hora Aptitud para principiantes 91/100