Compositor crashes when an auxiliary buffer can't be allocated (NVIDIA GBM: gbm_bo_create failed: Invalid argument)
メンテナーはふだん 3 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 52/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- cpp
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- C++
- スター
- 3.1k
- フォーク
- 249
- 平均マージ
- 7日 13時間
- マージ済み PR(30日)
- 5
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
WayfireWM/wayfire のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 3 日以内に返信
-
touchpad_scroll_speed is ignored for touchpads (get_scroll_speed checks for TABLET_PAD)対応中かも @italopaesano が 16 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
WayfireWM/wayfire#3148 · コメント 1 件 ·
メンテナーはふだん 3 日以内に返信
-
easy enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
WayfireWM/wayfire#3005 · コメント 14 件 ·
メンテナーはふだん 3 日以内に返信
-
Invisible windowsオープンbug
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
WayfireWM/wayfire#3187 · コメント 1 件 ·
メンテナーはふだん 3 日以内に返信
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
メンテナーはふだん 3 日以内に返信
WayfireWM/wayfire の issue をすべて見る
似ている issue
-
Bug Translations
難易度 1/5 1〜3時間 初心者へのやさしさ 82/100
wesnoth/wesnoth#11728 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
rpm-software-management/dnf5#3043 ·
メンテナーはふだん 3 日以内に返信
-
backlog
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
EchoTools/nevr-runtime#2385 ·
メンテナーはふだん 1 日以内に返信
-
needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
AustinKelsay/dnd-diceroll#200 ·
メンテナーはふだん 1 日以内に返信
-
type:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
tensorflow/tflite-micro#3995 ·
メンテナーはふだん 1 日以内に返信