Compositor crashes when an auxiliary buffer can't be allocated (NVIDIA GBM: gbm_bo_create failed: Invalid argument)
I maintainer di solito rispondono entro 3 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 52/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- cpp
- Ambito
- computer-graphics, desktop-dev
Direzione di ricerca
Start by reviewing the attached patch and the allocation call sites in src/view/view-3d.cpp, plugins/blur/blur-base.cpp, plugins/blur/blur.cpp, src/view/view.cpp, and the listed workspace, grid, and cube files. Build Wayfire with the proposed transformer changes, then verify that allocation failure skips the affected frame without crashing the session; the remaining callers should either handle failure similarly or be explicitly assessed.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
When wf::auxilliary_buffer_t::allocate() fails, several callers ignore the FAILED result and render into the empty buffer anyway. Wayfire then crashes and the whole session ends (every client loses its connection).
On my machine this happens with the NVIDIA card as the primary renderer. The GBM allocation fails now and then, for ordinary window-sized buffers:
EE [render/allocator/gbm.c:89] gbm_bo_create failed: Invalid argument
EE [render/allocator/gbm.c:89] gbm_bo_create failed: Invalid argument
EE [src/render.cpp:465] Failed to allocate auxilliary buffer! Size 876x448 format 875713089
(EE) failed to read Wayland events: Broken pipe
I had four crashes in about an hour, and three of them logged the failed allocation. Two of those failed on a view's transformer buffer (876x448, 960x494) and one on the blur during Alt+Tab (1920x1080). During at least two crashes, an Electron app (GitHub Desktop, Flatpak) was in a loop: its GPU process kept failing eglCreateImage (0x3009) on imported dmabufs and restarting. That may be what pushed the NVIDIA driver into refusing allocations. With the integrated GPU as the primary renderer (WLR_DRM_DEVICES=/dev/dri/card0:/dev/dri/card1), I have had no crashes since.
System
Wayfire 0.12.0 master (d181484, Sep 26 2026), wlroots 0.20.2
ASUS TUF A15: Ryzen 7 7735HS (Radeon 680M, amdgpu) and RTX 4060 Laptop (NVIDIA proprietary 615.71.09, nvidia_drm.modeset=1)
MUX in dGPU mode, so wlroots picks the NVIDIA card (card1) by default
Two outputs: eDP-1 1920x1080@144 and HDMI-A-1 1920x1080@180
Plugins: blur, animate, pixdecor, a transformer-based plugin (rounded corners)
Where the result is ignored
allocate() returns buffer_reallocation_result_t::FAILED, but these callers continue as if it succeeded:
transformer_base_node_t::get_updated_contents() (src/view/view-3d.cpp): runs a render pass into inner_content and returns texture_t::from_aux(). This path is used by every transformer (2D/3D views, blur, plugins).
plugins/blur/blur-base.cpp: render_iteration() (out.allocate) and copy_region() (result.allocate)
plugins/blur/blur.cpp: saved_pixels->pixels.allocate(target.get_size())
src/view/view.cpp: take_snapshot()
plugins/common/workspace-wall.cpp, plugins/grid/.../crossfade.hpp, plugins/cube/cube.cpp
Proposed fix (attached patch)
The patch covers the transformer path, which caused most of the crashes:
get_updated_contents() returns nullptr when the allocation fails. It keeps the damage, so the next frame redraws everything.
transformer_render_instance_t::get_texture() passes the nullptr on.
Its callers in view-3d.cpp (2D and 3D, GLES and Vulkan) and blur.cpp skip drawing for that frame.
A window then misses a frame instead of taking down the session. The blur passes and the other callers listed above could follow the same pattern: check the result, then skip or degrade. I'm happy to extend the patch if this approach is acceptable.
The patch is against d181484. I wrote it while debugging and haven't built Wayfire with it yet.
- Lingua principale
- C++
- Stelle
- 3.1k
- Fork
- 249
- Merge medio
- 7g 13h
- PR unite (30g)
- 5
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di WayfireWM/wayfire
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 3 giorni
-
touchpad_scroll_speed is ignored for touchpads (get_scroll_speed checks for TABLET_PAD)Forse già presa @italopaesano l’ha presa 16 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
WayfireWM/wayfire#3148 · 1 commento ·
I maintainer di solito rispondono entro 3 giorni
-
easy enhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
WayfireWM/wayfire#3005 · 14 commenti ·
I maintainer di solito rispondono entro 3 giorni
-
Invisible windowsApertabug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 42/100
WayfireWM/wayfire#3187 · 1 commento ·
I maintainer di solito rispondono entro 3 giorni
-
bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
I maintainer di solito rispondono entro 3 giorni
Tutte le issue di WayfireWM/wayfire
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
-
Malformed mark-up in translationsForse già presa Una pull request collegata a questa issue è aperta o già unita. ApertaBug Translations
Difficoltà 1/5 1-3 ore Idoneità per principianti 82/100
wesnoth/wesnoth#11728 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
rpm-software-management/dnf5#3043 ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
tile-ai/tilelang-mlir-ascend#227 ·
I maintainer di solito rispondono entro 1 giorno
-
test(tools): two testkit cache tests fail unless GOCACHE and GOMODCACHE are in the environmentApertabacklog
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
EchoTools/nevr-runtime#2385 ·
I maintainer di solito rispondono entro 1 giorno