GHOST: Wayland: buildtime shader compilation option with Libdecor failling #102306

Closed
opened 2022-11-06 13:28:03 +01:00 by Clément Foucault · 8 comments

System: 5.15.76-1-MANJARO Linux

When using the cmake option WITH_GPU_BUILDTIME_SHADER_COMPILATION, the executable for checking shader compilation (bin/shader_builder) fails to exit properly and lead to incomplete blender compilation. It seems to be a problem with LibDecor unloading.

Terminal output when built with asan.

ndof: spacenavd not found
Shader Test compilation result: 482 / 482 passed
AddressSanitizer:DEADLYSIGNAL
=================================================================
==133204==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000018 (pc 0x7ffff5e0d58d bp 0x60e0000006b0 sp 0x7fffffffde70 T0)
==133204==The signal is caused by a READ memory access.
==133204==Hint: address points to the zero page.
    - 0 0x7ffff5e0d58d in wl_proxy_destroy (/usr/lib/../lib/libwayland-client.so.0+0x858d)
    - 1 0x7ffff53a7649  (/usr/lib/libdecor/plugins-1/libdecor-cairo.so+0x4649)
    - 2 0x7ffff53d16a3 in libdecor_unref (/usr/lib/../lib/libdecor-0.so.0+0x56a3)
    - 3 0x9f7d9f in gwl_libdecor_system_destroy /mnt/data/Blender/blender/intern/ghost/intern/GHOST_SystemWayland.cpp:564
    - 4 0x9f8e48 in gwl_display_destroy /mnt/data/Blender/blender/intern/ghost/intern/GHOST_SystemWayland.cpp:856
    - 5 0xa2f677 in GHOST_SystemWayland::~GHOST_SystemWayland() /mnt/data/Blender/blender/intern/ghost/intern/GHOST_SystemWayland.cpp:5073
    - 6 0xa2f795 in GHOST_SystemWayland::~GHOST_SystemWayland() /mnt/data/Blender/blender/intern/ghost/intern/GHOST_SystemWayland.cpp:5074
    - 7 0x93a82b in GHOST_ISystem::disposeSystem() /mnt/data/Blender/blender/intern/ghost/intern/GHOST_ISystem.cpp:185
    - 8 0x924d46 in GHOST_DisposeSystem /mnt/data/Blender/blender/intern/ghost/intern/GHOST_C-api.cpp:52
    - 9 0x42384c in blender::gpu::shader_builder::ShaderBuilder::exit() /mnt/data/Blender/blender/source/blender/gpu/intern/gpu_shader_builder.cc:77
    - 10 0x423d7a in main /mnt/data/Blender/blender/source/blender/gpu/intern/gpu_shader_builder.cc:117
    - 11 0x7ffff73b828f  (/usr/lib/libc.so.6+0x2328f)
    - 12 0x7ffff73b8349 in __libc_start_main (/usr/lib/libc.so.6+0x23349)
    - 13 0x423194 in _start ../sysdeps/x86_64/start.S:115

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (/usr/lib/../lib/libwayland-client.so.0+0x858d) in wl_proxy_destroy
==133204==ABORTING

Steps to reproduce:

  • Enable WITH_GPU_BUILDTIME_SHADER_COMPILATION option.
  • Make sure you are building with wayland and libdecor enabled.
  • Try building blender

I am unsure if this is something on our side because WITH_GPU_BUILDTIME_SHADER_COMPILATION is quite special as it does not draw anything.
Note that this might also apply to draw manager unit tests but this was not tested.

System: 5.15.76-1-MANJARO Linux When using the cmake option `WITH_GPU_BUILDTIME_SHADER_COMPILATION`, the executable for checking shader compilation (`bin/shader_builder`) fails to exit properly and lead to incomplete blender compilation. It seems to be a problem with LibDecor unloading. Terminal output when built with asan. ``` ndof: spacenavd not found Shader Test compilation result: 482 / 482 passed AddressSanitizer:DEADLYSIGNAL ================================================================= ==133204==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000018 (pc 0x7ffff5e0d58d bp 0x60e0000006b0 sp 0x7fffffffde70 T0) ==133204==The signal is caused by a READ memory access. ==133204==Hint: address points to the zero page. - 0 0x7ffff5e0d58d in wl_proxy_destroy (/usr/lib/../lib/libwayland-client.so.0+0x858d) - 1 0x7ffff53a7649 (/usr/lib/libdecor/plugins-1/libdecor-cairo.so+0x4649) - 2 0x7ffff53d16a3 in libdecor_unref (/usr/lib/../lib/libdecor-0.so.0+0x56a3) - 3 0x9f7d9f in gwl_libdecor_system_destroy /mnt/data/Blender/blender/intern/ghost/intern/GHOST_SystemWayland.cpp:564 - 4 0x9f8e48 in gwl_display_destroy /mnt/data/Blender/blender/intern/ghost/intern/GHOST_SystemWayland.cpp:856 - 5 0xa2f677 in GHOST_SystemWayland::~GHOST_SystemWayland() /mnt/data/Blender/blender/intern/ghost/intern/GHOST_SystemWayland.cpp:5073 - 6 0xa2f795 in GHOST_SystemWayland::~GHOST_SystemWayland() /mnt/data/Blender/blender/intern/ghost/intern/GHOST_SystemWayland.cpp:5074 - 7 0x93a82b in GHOST_ISystem::disposeSystem() /mnt/data/Blender/blender/intern/ghost/intern/GHOST_ISystem.cpp:185 - 8 0x924d46 in GHOST_DisposeSystem /mnt/data/Blender/blender/intern/ghost/intern/GHOST_C-api.cpp:52 - 9 0x42384c in blender::gpu::shader_builder::ShaderBuilder::exit() /mnt/data/Blender/blender/source/blender/gpu/intern/gpu_shader_builder.cc:77 - 10 0x423d7a in main /mnt/data/Blender/blender/source/blender/gpu/intern/gpu_shader_builder.cc:117 - 11 0x7ffff73b828f (/usr/lib/libc.so.6+0x2328f) - 12 0x7ffff73b8349 in __libc_start_main (/usr/lib/libc.so.6+0x23349) - 13 0x423194 in _start ../sysdeps/x86_64/start.S:115 AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV (/usr/lib/../lib/libwayland-client.so.0+0x858d) in wl_proxy_destroy ==133204==ABORTING ``` Steps to reproduce: - Enable `WITH_GPU_BUILDTIME_SHADER_COMPILATION` option. - Make sure you are building with wayland and libdecor enabled. - Try building blender I am unsure if this is something on our side because `WITH_GPU_BUILDTIME_SHADER_COMPILATION` is quite special as it does not draw anything. Note that this might also apply to draw manager unit tests but this was not tested.
Author
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Author
Member

Added subscriber: @fclem

Added subscriber: @fclem
Clément Foucault changed title from GHOST: Wayland: buildtime shader compilation option with Libdecor to GHOST: Wayland: buildtime shader compilation option with Libdecor failling 2022-11-06 13:30:18 +01:00
Campbell Barton self-assigned this 2022-11-08 10:41:23 +01:00

@fclem using GHOST_CreateSystemBackground()avoids using libdecor and resolves the issue in my tests, any problems with this patch P3294 ?

@fclem using `GHOST_CreateSystemBackground()`avoids using libdecor and resolves the issue in my tests, any problems with this patch [P3294](https://archive.blender.org/developer/P3294.txt) ?
Author
Member

@ideasman42 yes it solves the issue!

@ideasman42 yes it solves the issue!

This issue was referenced by baee7ce4a5

This issue was referenced by baee7ce4a5be105a2e98dc8e4fcdc4f8b5f5e673

This issue was referenced by 6fa05e2c29

This issue was referenced by 6fa05e2c29a28475799fab4a9ce51bd0bc53ca92

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'

This issue was referenced by 801db0d429

This issue was referenced by 801db0d429a279d1084d2f61c00088917547407e
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser Project (Legacy)
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#102306
No description provided.