Adding subdivision surface modifier to default cube causes silent crash. #97330

Closed
opened 2022-04-14 18:17:07 +02:00 by Jason · 31 comments

System Information

Operating system: Debian (Linux)
Graphics card: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] (rev e7)
AMD RENOIR (DRM 3.41.0, 5.13.0-40-generic, LLVM 12.0.0) (integrated into AMD Ryzen 5 5500U)
AMD FirePro W7100 (TONGA, DRM 3.35.0, 5.4.0-109-generic, LLVM 10.0.0) X.Org 4.6 (Core Profile) Mesa 20.0.5

Blender Version
Broken: 3.1.2 Linux 64
(example: 2.79b release)
(example: 2.80, edbf15d3c0, blender2.8, 2018-11-28, as found on the splash screen)
Worked: 2.93.5

Blender closes abruptly when I add a subdivision surface modifier to the default cube.

Exact steps for others to reproduce the error
Download and unpack blender 3.1.2.
Launch blender.
Under "New File" on the splash screen, choose "General."
The default cube is already selected.
Using the interface on the right, choose the wrench-labeled "Modifier Properties" tab, select "Subdivision Surface" from the "Generate" column in the "Add Modifier" dropdown.
Blender crashes.

I launched blender from a command line to capture this output:

Read prefs: /home/jason/.config/blender/3.1/config/userpref.blend
ERROR (gpu.shader): subdiv patch evaluation Linking: 
      | Error: Too many compute shader storage blocks (9/8)

Writing: /tmp/blender.crash.txt
Segmentation fault

The content of /tmp/blender.crash.txt follows:

# Blender 3.1.2, Commit date: 2022-03-31 17:40, Hash cc66d1020c3b
bpy.context.space_data.context = 'PARTICLES'  # Property
bpy.context.space_data.context = 'MODIFIER'  # Property
bpy.ops.object.modifier_add(type='SUBSURF')  # Operator

# backtrace
./blender(BLI_system_backtrace+0x20) [0xb340860]
./blender() [0x113106d]
/lib/x86_64-linux-gnu/libc.so.6(+0x37840) [0x7f594d0b3840]
./blender(GPU_shader_bind+0x13) [0x9dd1d83]
./blender(draw_subdiv_extract_pos_nor+0x11e) [0x16fbc0e]
./blender() [0x175ff6b]
./blender(mesh_buffer_cache_create_requested_subdiv+0x43d) [0x17519fd]
./blender(DRW_create_subdivision+0x43e) [0x16fd2be]
./blender(DRW_mesh_batch_cache_create_requested+0xc6d) [0x176d84d]
./blender() [0x16fee78]
./blender(DRW_draw_render_loop_ex+0x40d) [0x170066d]
./blender(view3d_main_region_draw+0x8f) [0x21ebebf]
./blender(ED_region_do_draw+0x851) [0x1a6b441]
./blender(wm_draw_update+0x533) [0x156f873]
./blender(WM_main+0x30) [0x156cdc0]
./blender(main+0x31d) [0x101c4bd]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xeb) [0x7f594d0a009b]
./blender() [0x112d97c]

# Python backtrace

I saw, in an issue reported by a windows user, a suggestion to turn off GPU Subdivision under preferences. I have done this and it seems to be a successful work-around.

I just downloaded this version of blender and immediately had this problem after unpacking and launching. I had not turned on the GPU Subdivision preference or made any other preference changes before encountering the problem.

I reasoned this is not a duplicate issue of the one I saw from the windows user because the behaviour they saw was different (not a silent crash).

**System Information** |Operating system: |Debian (Linux) | -- | -- | |Graphics card: |Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] (rev e7) ||AMD RENOIR (DRM 3.41.0, 5.13.0-40-generic, LLVM 12.0.0) (integrated into `AMD Ryzen 5 5500U`) ||AMD FirePro W7100 (TONGA, DRM 3.35.0, 5.4.0-109-generic, LLVM 10.0.0) X.Org 4.6 (Core Profile) Mesa 20.0.5 **Blender Version** Broken: 3.1.2 Linux 64 (example: 2.79b release) (example: 2.80, edbf15d3c044, blender2.8, 2018-11-28, as found on the splash screen) Worked: 2.93.5 Blender closes abruptly when I add a subdivision surface modifier to the default cube. **Exact steps for others to reproduce the error** Download and unpack blender 3.1.2. Launch blender. Under "New File" on the splash screen, choose "General." The default cube is already selected. Using the interface on the right, choose the wrench-labeled "Modifier Properties" tab, select "Subdivision Surface" from the "Generate" column in the "Add Modifier" dropdown. Blender crashes. I launched blender from a command line to capture this output: ``` Read prefs: /home/jason/.config/blender/3.1/config/userpref.blend ERROR (gpu.shader): subdiv patch evaluation Linking: | Error: Too many compute shader storage blocks (9/8) Writing: /tmp/blender.crash.txt Segmentation fault ``` The content of /tmp/blender.crash.txt follows: ``` # Blender 3.1.2, Commit date: 2022-03-31 17:40, Hash cc66d1020c3b bpy.context.space_data.context = 'PARTICLES' # Property bpy.context.space_data.context = 'MODIFIER' # Property bpy.ops.object.modifier_add(type='SUBSURF') # Operator # backtrace ./blender(BLI_system_backtrace+0x20) [0xb340860] ./blender() [0x113106d] /lib/x86_64-linux-gnu/libc.so.6(+0x37840) [0x7f594d0b3840] ./blender(GPU_shader_bind+0x13) [0x9dd1d83] ./blender(draw_subdiv_extract_pos_nor+0x11e) [0x16fbc0e] ./blender() [0x175ff6b] ./blender(mesh_buffer_cache_create_requested_subdiv+0x43d) [0x17519fd] ./blender(DRW_create_subdivision+0x43e) [0x16fd2be] ./blender(DRW_mesh_batch_cache_create_requested+0xc6d) [0x176d84d] ./blender() [0x16fee78] ./blender(DRW_draw_render_loop_ex+0x40d) [0x170066d] ./blender(view3d_main_region_draw+0x8f) [0x21ebebf] ./blender(ED_region_do_draw+0x851) [0x1a6b441] ./blender(wm_draw_update+0x533) [0x156f873] ./blender(WM_main+0x30) [0x156cdc0] ./blender(main+0x31d) [0x101c4bd] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xeb) [0x7f594d0a009b] ./blender() [0x112d97c] # Python backtrace ``` I saw, in an issue reported by a windows user, a suggestion to turn off GPU Subdivision under preferences. I have done this and it seems to be a successful work-around. I just downloaded this version of blender and immediately had this problem after unpacking and launching. I had not turned on the GPU Subdivision preference or made any other preference changes before encountering the problem. I reasoned this is not a duplicate issue of the one I saw from the windows user because the behaviour they saw was different (not a silent crash).
Author

Added subscriber: @jason1

Added subscriber: @jason1

#97517 was marked as duplicate of this issue

#97517 was marked as duplicate of this issue

#97606 was marked as duplicate of this issue

#97606 was marked as duplicate of this issue
Author

Issue with advice to turn off GPU Subdivision
https://developer.blender.org/T97325

Issue with advice to turn off GPU Subdivision https://developer.blender.org/T97325
Author

I ran blender using the --debug-gpu switch and reproduced the issue. Output follows:

Read prefs: /home/jason/.config/blender/3.1/config/userpref.blend
INFO (gpu.debug): Notification : Successfully hooked OpenGL debug callback using OpenGL 4.3
INFO (gpu.debug): Notification : Successfully hooked OpenGL debug callback using OpenGL 4.3
INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 2 instructions in function
INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 5 instructions in function
INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 3 instructions in function
INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 30 instructions in function
INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 2 instructions in function
INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 24 instructions in function
INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 17 instructions in function
INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 2 instructions in function
INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 155 instructions in function
INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 10 instructions in function
INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 2 instructions in function
INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 4 instructions in function
INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 7 instructions in function
INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 8 instructions in function
INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 3 instructions in function
INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 8 instructions in function
INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 35 instructions in function
INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 20 instructions in function
INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 3 instructions in function
ERROR (gpu.debug):  : GL_INVALID_VALUE in glNamedBufferSubData(offset 0 + size 96 > buffer size 0)
./blender(BLI_system_backtrace+0x20) [0xb340860]
./blender() [0x9e0f0f2]
/usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x45aab5) [0x7f257248eab5]
/usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x44b47f) [0x7f257247f47f]
/usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x44bc7b) [0x7f257247fc7b]
/usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x451c6d) [0x7f2572485c6d]
./blender(BKE_subdiv_eval_refine_from_mesh+0x180) [0x1248ba0]
./blender(DRW_create_subdivision+0x10b) [0x16fcf8b]
./blender(DRW_mesh_batch_cache_create_requested+0xc6d) [0x176d84d]
./blender() [0x16fee78]
./blender(DRW_draw_render_loop_ex+0x40d) [0x170066d]
./blender(view3d_main_region_draw+0x8f) [0x21ebebf]
./blender(ED_region_do_draw+0x851) [0x1a6b441]
./blender(wm_draw_update+0x533) [0x156f873]
./blender(WM_main+0x30) [0x156cdc0]
./blender(main+0x31d) [0x101c4bd]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xeb) [0x7f259286009b]
./blender() [0x112d97c]

ERROR (gpu.debug):  : GL_INVALID_VALUE in glNamedBufferSubData(offset 0 + size 112 > buffer size 0)
./blender(BLI_system_backtrace+0x20) [0xb340860]
./blender() [0x9e0f0f2]
/usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x45aab5) [0x7f257248eab5]
/usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x44b47f) [0x7f257247f47f]
/usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x44bc7b) [0x7f257247fc7b]
/usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x451c6d) [0x7f2572485c6d]
./blender(BKE_subdiv_eval_refine_from_mesh+0x2a9) [0x1248cc9]
./blender(DRW_create_subdivision+0x10b) [0x16fcf8b]
./blender(DRW_mesh_batch_cache_create_requested+0xc6d) [0x176d84d]
./blender() [0x16fee78]
./blender(DRW_draw_render_loop_ex+0x40d) [0x170066d]
./blender(view3d_main_region_draw+0x8f) [0x21ebebf]
./blender(ED_region_do_draw+0x851) [0x1a6b441]
./blender(wm_draw_update+0x533) [0x156f873]
./blender(WM_main+0x30) [0x156cdc0]
./blender(main+0x31d) [0x101c4bd]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xeb) [0x7f259286009b]
./blender() [0x112d97c]

ERROR (gpu.debug):  : GL_INVALID_VALUE : Dispatch Compute
./blender(BLI_system_backtrace+0x20) [0xb340860]
./blender() [0x9e0f0f2]
./blender(_ZN7blender3gpu5debug14check_gl_errorEPKc+0x88) [0x9e0f578]
./blender() [0x16fabe7]
./blender(draw_subdiv_build_tris_buffer+0x95) [0x16fc415]
./blender(mesh_buffer_cache_create_requested_subdiv+0x43d) [0x17519fd]
./blender(DRW_create_subdivision+0x43e) [0x16fd2be]
./blender(DRW_mesh_batch_cache_create_requested+0xc6d) [0x176d84d]
./blender() [0x16fee78]
./blender(DRW_draw_render_loop_ex+0x40d) [0x170066d]
./blender(view3d_main_region_draw+0x8f) [0x21ebebf]
./blender(ED_region_do_draw+0x851) [0x1a6b441]
./blender(wm_draw_update+0x533) [0x156f873]
./blender(WM_main+0x30) [0x156cdc0]
./blender(main+0x31d) [0x101c4bd]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xeb) [0x7f259286009b]
./blender() [0x112d97c]

WARN (gpu.debug):  : 0:2587(17): warning: `vertex_data' used uninitialized
./blender(BLI_system_backtrace+0x20) [0xb340860]
./blender() [0x9e0f0f2]
/usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x45ad82) [0x7f257248ed82]
/usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x68cfe7) [0x7f25726c0fe7]
/usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x68e287) [0x7f25726c2287]
/usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x70db4d) [0x7f2572741b4d]
/usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x716d43) [0x7f257274ad43]
/usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x716d9f) [0x7f257274ad9f]
/usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x71f36e) [0x7f257275336e]
/usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x716d9f) [0x7f257274ad9f]
/usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x71d8a2) [0x7f25727518a2]
/usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x713cf0) [0x7f2572747cf0]
/usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x690758) [0x7f25726c4758]
/usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x568bd0) [0x7f257259cbd0]
./blender(_ZN7blender3gpu8GLShader19create_shader_stageEjNS_11MutableSpanIPKcEE+0x60) [0x9e14860]
./blender(_ZN7blender3gpu8GLShader24compute_shader_from_glslENS_11MutableSpanIPKcEE+0x14) [0x9e14aa4]
./blender(GPU_shader_create_ex+0x425) [0x9dd2525]
./blender(GPU_shader_create_compute+0x1f) [0x9dd29df]
./blender() [0x16faab7]
./blender(draw_subdiv_extract_pos_nor+0x113) [0x16fbc03]
./blender() [0x175ff6b]
./blender(mesh_buffer_cache_create_requested_subdiv+0x43d) [0x17519fd]
./blender(DRW_create_subdivision+0x43e) [0x16fd2be]
./blender(DRW_mesh_batch_cache_create_requested+0xc6d) [0x176d84d]
./blender() [0x16fee78]
./blender(DRW_draw_render_loop_ex+0x40d) [0x170066d]
./blender(view3d_main_region_draw+0x8f) [0x21ebebf]
./blender(ED_region_do_draw+0x851) [0x1a6b441]
./blender(wm_draw_update+0x533) [0x156f873]
./blender(WM_main+0x30) [0x156cdc0]
./blender(main+0x31d) [0x101c4bd]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xeb) [0x7f259286009b]
./blender() [0x112d97c]

WARN (gpu.shader): subdiv patch evaluation ComputeShader: 
      | 
 2587 |     set_vertex_pos(vertex_data, pos);
      |                  ^
      | `vertex_data' used uninitialized

ERROR (gpu.shader): subdiv patch evaluation Linking: 
      | Error: Too many compute shader storage blocks (9/8)

Writing: /tmp/blender.crash.txt
Segmentation fault
I ran blender using the --debug-gpu switch and reproduced the issue. Output follows: ``` Read prefs: /home/jason/.config/blender/3.1/config/userpref.blend INFO (gpu.debug): Notification : Successfully hooked OpenGL debug callback using OpenGL 4.3 INFO (gpu.debug): Notification : Successfully hooked OpenGL debug callback using OpenGL 4.3 INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 2 instructions in function INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 5 instructions in function INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 3 instructions in function INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 30 instructions in function INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 2 instructions in function INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 24 instructions in function INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 17 instructions in function INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 2 instructions in function INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 155 instructions in function INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 10 instructions in function INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 2 instructions in function INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 4 instructions in function INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 7 instructions in function INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 8 instructions in function INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 3 instructions in function INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 8 instructions in function INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 35 instructions in function INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 20 instructions in function INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 3 instructions in function ERROR (gpu.debug): : GL_INVALID_VALUE in glNamedBufferSubData(offset 0 + size 96 > buffer size 0) ./blender(BLI_system_backtrace+0x20) [0xb340860] ./blender() [0x9e0f0f2] /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x45aab5) [0x7f257248eab5] /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x44b47f) [0x7f257247f47f] /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x44bc7b) [0x7f257247fc7b] /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x451c6d) [0x7f2572485c6d] ./blender(BKE_subdiv_eval_refine_from_mesh+0x180) [0x1248ba0] ./blender(DRW_create_subdivision+0x10b) [0x16fcf8b] ./blender(DRW_mesh_batch_cache_create_requested+0xc6d) [0x176d84d] ./blender() [0x16fee78] ./blender(DRW_draw_render_loop_ex+0x40d) [0x170066d] ./blender(view3d_main_region_draw+0x8f) [0x21ebebf] ./blender(ED_region_do_draw+0x851) [0x1a6b441] ./blender(wm_draw_update+0x533) [0x156f873] ./blender(WM_main+0x30) [0x156cdc0] ./blender(main+0x31d) [0x101c4bd] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xeb) [0x7f259286009b] ./blender() [0x112d97c] ERROR (gpu.debug): : GL_INVALID_VALUE in glNamedBufferSubData(offset 0 + size 112 > buffer size 0) ./blender(BLI_system_backtrace+0x20) [0xb340860] ./blender() [0x9e0f0f2] /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x45aab5) [0x7f257248eab5] /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x44b47f) [0x7f257247f47f] /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x44bc7b) [0x7f257247fc7b] /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x451c6d) [0x7f2572485c6d] ./blender(BKE_subdiv_eval_refine_from_mesh+0x2a9) [0x1248cc9] ./blender(DRW_create_subdivision+0x10b) [0x16fcf8b] ./blender(DRW_mesh_batch_cache_create_requested+0xc6d) [0x176d84d] ./blender() [0x16fee78] ./blender(DRW_draw_render_loop_ex+0x40d) [0x170066d] ./blender(view3d_main_region_draw+0x8f) [0x21ebebf] ./blender(ED_region_do_draw+0x851) [0x1a6b441] ./blender(wm_draw_update+0x533) [0x156f873] ./blender(WM_main+0x30) [0x156cdc0] ./blender(main+0x31d) [0x101c4bd] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xeb) [0x7f259286009b] ./blender() [0x112d97c] ERROR (gpu.debug): : GL_INVALID_VALUE : Dispatch Compute ./blender(BLI_system_backtrace+0x20) [0xb340860] ./blender() [0x9e0f0f2] ./blender(_ZN7blender3gpu5debug14check_gl_errorEPKc+0x88) [0x9e0f578] ./blender() [0x16fabe7] ./blender(draw_subdiv_build_tris_buffer+0x95) [0x16fc415] ./blender(mesh_buffer_cache_create_requested_subdiv+0x43d) [0x17519fd] ./blender(DRW_create_subdivision+0x43e) [0x16fd2be] ./blender(DRW_mesh_batch_cache_create_requested+0xc6d) [0x176d84d] ./blender() [0x16fee78] ./blender(DRW_draw_render_loop_ex+0x40d) [0x170066d] ./blender(view3d_main_region_draw+0x8f) [0x21ebebf] ./blender(ED_region_do_draw+0x851) [0x1a6b441] ./blender(wm_draw_update+0x533) [0x156f873] ./blender(WM_main+0x30) [0x156cdc0] ./blender(main+0x31d) [0x101c4bd] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xeb) [0x7f259286009b] ./blender() [0x112d97c] WARN (gpu.debug): : 0:2587(17): warning: `vertex_data' used uninitialized ./blender(BLI_system_backtrace+0x20) [0xb340860] ./blender() [0x9e0f0f2] /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x45ad82) [0x7f257248ed82] /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x68cfe7) [0x7f25726c0fe7] /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x68e287) [0x7f25726c2287] /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x70db4d) [0x7f2572741b4d] /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x716d43) [0x7f257274ad43] /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x716d9f) [0x7f257274ad9f] /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x71f36e) [0x7f257275336e] /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x716d9f) [0x7f257274ad9f] /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x71d8a2) [0x7f25727518a2] /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x713cf0) [0x7f2572747cf0] /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x690758) [0x7f25726c4758] /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x568bd0) [0x7f257259cbd0] ./blender(_ZN7blender3gpu8GLShader19create_shader_stageEjNS_11MutableSpanIPKcEE+0x60) [0x9e14860] ./blender(_ZN7blender3gpu8GLShader24compute_shader_from_glslENS_11MutableSpanIPKcEE+0x14) [0x9e14aa4] ./blender(GPU_shader_create_ex+0x425) [0x9dd2525] ./blender(GPU_shader_create_compute+0x1f) [0x9dd29df] ./blender() [0x16faab7] ./blender(draw_subdiv_extract_pos_nor+0x113) [0x16fbc03] ./blender() [0x175ff6b] ./blender(mesh_buffer_cache_create_requested_subdiv+0x43d) [0x17519fd] ./blender(DRW_create_subdivision+0x43e) [0x16fd2be] ./blender(DRW_mesh_batch_cache_create_requested+0xc6d) [0x176d84d] ./blender() [0x16fee78] ./blender(DRW_draw_render_loop_ex+0x40d) [0x170066d] ./blender(view3d_main_region_draw+0x8f) [0x21ebebf] ./blender(ED_region_do_draw+0x851) [0x1a6b441] ./blender(wm_draw_update+0x533) [0x156f873] ./blender(WM_main+0x30) [0x156cdc0] ./blender(main+0x31d) [0x101c4bd] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xeb) [0x7f259286009b] ./blender() [0x112d97c] WARN (gpu.shader): subdiv patch evaluation ComputeShader: | 2587 | set_vertex_pos(vertex_data, pos); | ^ | `vertex_data' used uninitialized ERROR (gpu.shader): subdiv patch evaluation Linking: | Error: Too many compute shader storage blocks (9/8) Writing: /tmp/blender.crash.txt Segmentation fault ```

Added subscriber: @iss

Added subscriber: @iss

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'

Since this is issue related to GPU subdivision, please check if you can update GPU drivers and check if this issue happens with latest alpha build from https://builder.blender.org/download/daily/

Since this is issue related to GPU subdivision, please check if you can update GPU drivers and check if this issue happens with latest alpha build from https://builder.blender.org/download/daily/
Author

In #97330#1341298, @iss wrote:
Since this is issue related to GPU subdivision, please check if you can update GPU drivers and check if this issue happens with latest alpha build from https://builder.blender.org/download/daily/

The issue remains in the alpha build.

Read prefs: /home/jason/.config/blender/3.2/config/userpref.blend
INFO (gpu.debug): Notification : Successfully hooked OpenGL debug callback using OpenGL 4.3
INFO (gpu.debug): Notification : Successfully hooked OpenGL debug callback using OpenGL 4.3
INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 2 instructions in function
INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 5 instructions in function
INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 3 instructions in function
INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 30 instructions in function
INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 24 instructions in function
INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 17 instructions in function
INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 2 instructions in function
INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 2 instructions in function
INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 155 instructions in function
INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 10 instructions in function
INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 2 instructions in function
INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 4 instructions in function
INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 7 instructions in function
INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 8 instructions in function
INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 3 instructions in function
INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 8 instructions in function
INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 35 instructions in function
INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 20 instructions in function
INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 3 instructions in function
ERROR (gpu.debug):  : GL_INVALID_VALUE in glNamedBufferSubData(offset 0 + size 96 > buffer size 0)
./blender(BLI_system_backtrace+0x20) [0xb54cd10]
./blender() [0xa006c42]
/usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x45aab5) [0x7fd1cd48eab5]
/usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x44b47f) [0x7fd1cd47f47f]
/usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x44bc7b) [0x7fd1cd47fc7b]
/usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x451c6d) [0x7fd1cd485c6d]
./blender(BKE_subdiv_eval_refine_from_mesh+0x180) [0x128cfc0]
./blender(DRW_create_subdivision+0x10b) [0x17a915b]
./blender(DRW_mesh_batch_cache_create_requested+0xc6d) [0x1816ded]
./blender() [0x17ab058]
./blender(DRW_draw_render_loop_ex+0x425) [0x17ac875]
./blender(view3d_main_region_draw+0x8f) [0x2331e7f]
./blender(ED_region_do_draw+0x841) [0x1b15b81]
./blender(wm_draw_update+0x553) [0x161c383]
./blender(WM_main+0x30) [0x1619520]
./blender(main+0x322) [0x1046fb2]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xeb) [0x7fd1ed3b509b]
./blender() [0x115918c]

ERROR (gpu.debug):  : GL_INVALID_VALUE in glNamedBufferSubData(offset 0 + size 112 > buffer size 0)
./blender(BLI_system_backtrace+0x20) [0xb54cd10]
./blender() [0xa006c42]
/usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x45aab5) [0x7fd1cd48eab5]
/usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x44b47f) [0x7fd1cd47f47f]
/usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x44bc7b) [0x7fd1cd47fc7b]
/usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x451c6d) [0x7fd1cd485c6d]
./blender(BKE_subdiv_eval_refine_from_mesh+0x2a9) [0x128d0e9]
./blender(DRW_create_subdivision+0x10b) [0x17a915b]
./blender(DRW_mesh_batch_cache_create_requested+0xc6d) [0x1816ded]
./blender() [0x17ab058]
./blender(DRW_draw_render_loop_ex+0x425) [0x17ac875]
./blender(view3d_main_region_draw+0x8f) [0x2331e7f]
./blender(ED_region_do_draw+0x841) [0x1b15b81]
./blender(wm_draw_update+0x553) [0x161c383]
./blender(WM_main+0x30) [0x1619520]
./blender(main+0x322) [0x1046fb2]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xeb) [0x7fd1ed3b509b]
./blender() [0x115918c]

WARN (gpu.debug):  : 0:2589(17): warning: `vertex_data' used uninitialized
./blender(BLI_system_backtrace+0x20) [0xb54cd10]
./blender() [0xa006c42]
/usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x45ad82) [0x7fd1cd48ed82]
/usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x68cfe7) [0x7fd1cd6c0fe7]
/usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x68e287) [0x7fd1cd6c2287]
/usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x70db4d) [0x7fd1cd741b4d]
/usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x716d43) [0x7fd1cd74ad43]
/usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x716d9f) [0x7fd1cd74ad9f]
/usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x71f36e) [0x7fd1cd75336e]
/usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x716d9f) [0x7fd1cd74ad9f]
/usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x71d8a2) [0x7fd1cd7518a2]
/usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x713cf0) [0x7fd1cd747cf0]
/usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x690758) [0x7fd1cd6c4758]
/usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x568bd0) [0x7fd1cd59cbd0]
./blender(_ZN7blender3gpu8GLShader19create_shader_stageEjNS_11MutableSpanIPKcEE+0x60) [0xa00c690]
./blender(_ZN7blender3gpu8GLShader24compute_shader_from_glslENS_11MutableSpanIPKcEE+0x14) [0xa00c8d4]
./blender(GPU_shader_create_ex+0x425) [0x9fc4285]
./blender(GPU_shader_create_compute+0x1f) [0x9fc473f]
./blender() [0x17a6c87]
./blender(draw_subdiv_extract_pos_nor+0x113) [0x17a7dd3]
./blender() [0x180bb8b]
./blender(mesh_buffer_cache_create_requested_subdiv+0x43d) [0x17fd36d]
./blender(DRW_create_subdivision+0x43e) [0x17a948e]
./blender(DRW_mesh_batch_cache_create_requested+0xc6d) [0x1816ded]
./blender() [0x17ab058]
./blender(DRW_draw_render_loop_ex+0x425) [0x17ac875]
./blender(view3d_main_region_draw+0x8f) [0x2331e7f]
./blender(ED_region_do_draw+0x841) [0x1b15b81]
./blender(wm_draw_update+0x553) [0x161c383]
./blender(WM_main+0x30) [0x1619520]
./blender(main+0x322) [0x1046fb2]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xeb) [0x7fd1ed3b509b]
./blender() [0x115918c]

WARN (gpu.shader): subdiv patch evaluation ComputeShader: 
      | 
 2589 |     set_vertex_pos(vertex_data, pos);
      |                  ^
      | common_subdiv_patch_evaluation_comp.glsl:407:18: `vertex_data' used uninitialized

ERROR (gpu.shader): subdiv patch evaluation Linking: 
      | Error: Too many compute shader storage blocks (9/8)

Writing: /tmp/blender.crash.txt
Segmentation fault
> In #97330#1341298, @iss wrote: > Since this is issue related to GPU subdivision, please check if you can update GPU drivers and check if this issue happens with latest alpha build from https://builder.blender.org/download/daily/ The issue remains in the alpha build. ``` Read prefs: /home/jason/.config/blender/3.2/config/userpref.blend INFO (gpu.debug): Notification : Successfully hooked OpenGL debug callback using OpenGL 4.3 INFO (gpu.debug): Notification : Successfully hooked OpenGL debug callback using OpenGL 4.3 INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 2 instructions in function INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 5 instructions in function INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 3 instructions in function INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 30 instructions in function INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 24 instructions in function INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 17 instructions in function INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 2 instructions in function INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 2 instructions in function INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 155 instructions in function INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 10 instructions in function INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 2 instructions in function INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 4 instructions in function INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 7 instructions in function INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 8 instructions in function INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 3 instructions in function INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 8 instructions in function INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 35 instructions in function INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 20 instructions in function INFO (gpu.debug): Notification : LLVM diagnostic (remark): <unknown>:0:0: 3 instructions in function ERROR (gpu.debug): : GL_INVALID_VALUE in glNamedBufferSubData(offset 0 + size 96 > buffer size 0) ./blender(BLI_system_backtrace+0x20) [0xb54cd10] ./blender() [0xa006c42] /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x45aab5) [0x7fd1cd48eab5] /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x44b47f) [0x7fd1cd47f47f] /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x44bc7b) [0x7fd1cd47fc7b] /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x451c6d) [0x7fd1cd485c6d] ./blender(BKE_subdiv_eval_refine_from_mesh+0x180) [0x128cfc0] ./blender(DRW_create_subdivision+0x10b) [0x17a915b] ./blender(DRW_mesh_batch_cache_create_requested+0xc6d) [0x1816ded] ./blender() [0x17ab058] ./blender(DRW_draw_render_loop_ex+0x425) [0x17ac875] ./blender(view3d_main_region_draw+0x8f) [0x2331e7f] ./blender(ED_region_do_draw+0x841) [0x1b15b81] ./blender(wm_draw_update+0x553) [0x161c383] ./blender(WM_main+0x30) [0x1619520] ./blender(main+0x322) [0x1046fb2] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xeb) [0x7fd1ed3b509b] ./blender() [0x115918c] ERROR (gpu.debug): : GL_INVALID_VALUE in glNamedBufferSubData(offset 0 + size 112 > buffer size 0) ./blender(BLI_system_backtrace+0x20) [0xb54cd10] ./blender() [0xa006c42] /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x45aab5) [0x7fd1cd48eab5] /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x44b47f) [0x7fd1cd47f47f] /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x44bc7b) [0x7fd1cd47fc7b] /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x451c6d) [0x7fd1cd485c6d] ./blender(BKE_subdiv_eval_refine_from_mesh+0x2a9) [0x128d0e9] ./blender(DRW_create_subdivision+0x10b) [0x17a915b] ./blender(DRW_mesh_batch_cache_create_requested+0xc6d) [0x1816ded] ./blender() [0x17ab058] ./blender(DRW_draw_render_loop_ex+0x425) [0x17ac875] ./blender(view3d_main_region_draw+0x8f) [0x2331e7f] ./blender(ED_region_do_draw+0x841) [0x1b15b81] ./blender(wm_draw_update+0x553) [0x161c383] ./blender(WM_main+0x30) [0x1619520] ./blender(main+0x322) [0x1046fb2] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xeb) [0x7fd1ed3b509b] ./blender() [0x115918c] WARN (gpu.debug): : 0:2589(17): warning: `vertex_data' used uninitialized ./blender(BLI_system_backtrace+0x20) [0xb54cd10] ./blender() [0xa006c42] /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x45ad82) [0x7fd1cd48ed82] /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x68cfe7) [0x7fd1cd6c0fe7] /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x68e287) [0x7fd1cd6c2287] /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x70db4d) [0x7fd1cd741b4d] /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x716d43) [0x7fd1cd74ad43] /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x716d9f) [0x7fd1cd74ad9f] /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x71f36e) [0x7fd1cd75336e] /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x716d9f) [0x7fd1cd74ad9f] /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x71d8a2) [0x7fd1cd7518a2] /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x713cf0) [0x7fd1cd747cf0] /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x690758) [0x7fd1cd6c4758] /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so(+0x568bd0) [0x7fd1cd59cbd0] ./blender(_ZN7blender3gpu8GLShader19create_shader_stageEjNS_11MutableSpanIPKcEE+0x60) [0xa00c690] ./blender(_ZN7blender3gpu8GLShader24compute_shader_from_glslENS_11MutableSpanIPKcEE+0x14) [0xa00c8d4] ./blender(GPU_shader_create_ex+0x425) [0x9fc4285] ./blender(GPU_shader_create_compute+0x1f) [0x9fc473f] ./blender() [0x17a6c87] ./blender(draw_subdiv_extract_pos_nor+0x113) [0x17a7dd3] ./blender() [0x180bb8b] ./blender(mesh_buffer_cache_create_requested_subdiv+0x43d) [0x17fd36d] ./blender(DRW_create_subdivision+0x43e) [0x17a948e] ./blender(DRW_mesh_batch_cache_create_requested+0xc6d) [0x1816ded] ./blender() [0x17ab058] ./blender(DRW_draw_render_loop_ex+0x425) [0x17ac875] ./blender(view3d_main_region_draw+0x8f) [0x2331e7f] ./blender(ED_region_do_draw+0x841) [0x1b15b81] ./blender(wm_draw_update+0x553) [0x161c383] ./blender(WM_main+0x30) [0x1619520] ./blender(main+0x322) [0x1046fb2] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xeb) [0x7fd1ed3b509b] ./blender() [0x115918c] WARN (gpu.shader): subdiv patch evaluation ComputeShader: | 2589 | set_vertex_pos(vertex_data, pos); | ^ | common_subdiv_patch_evaluation_comp.glsl:407:18: `vertex_data' used uninitialized ERROR (gpu.shader): subdiv patch evaluation Linking: | Error: Too many compute shader storage blocks (9/8) Writing: /tmp/blender.crash.txt Segmentation fault ```

Changed status from 'Needs User Info' to: 'Needs Triage'

Changed status from 'Needs User Info' to: 'Needs Triage'

Added subscriber: @kevindietrich

Added subscriber: @kevindietrich

Thanks for update.

@kevindietrich Can you tell if this is issue with GPU driver or could be bug in our code?

Thanks for update. @kevindietrich Can you tell if this is issue with GPU driver or could be bug in our code?

This error Error: Too many compute shader storage blocks (9/8) should have been fixed already, so there might a bug in the code. I would need to plug my AMD GPU to investigate further. However, updating driver should fix it.

This error `Error: Too many compute shader storage blocks (9/8)` should have been fixed already, so there might a bug in the code. I would need to plug my AMD GPU to investigate further. However, updating driver should fix it.

Added subscriber: @srogmann

Added subscriber: @srogmann

I reproduced this bug in 3.2.0-alpha using Nvidia instead of AMD.

System Information
Operating system: Debian (Linux)
Graphics card: GeForce RTX 3080 Mobile

Blender Version
Broken: 3.1.2 Linux 64, 3.2.0 2022-04-18 Linux 64

# Blender 3.2.0, Commit date: 2022-04-18 10:21, Hash 933fed2a17a3
bpy.context.space_data.context = 'MODIFIER'  # Property
bpy.ops.object.modifier_add(type='SUBSURF')  # Operator

# backtrace
build_linux/bin/blender(BLI_system_backtrace+0x20) [0xb35c650]
build_linux/bin/blender() [0x1118909]
/lib/x86_64-linux-gnu/libc.so.6(+0x3bd60) [0x7f49146f3d60]
build_linux/bin/blender(GPU_shader_bind+0x13) [0x9d2dc13]
build_linux/bin/blender(draw_subdiv_extract_pos_nor+0x26b) [0x1740bfb]
build_linux/bin/blender() [0x17ab10b]
build_linux/bin/blender() [0x179c4de]
build_linux/bin/blender(DRW_create_subdivision+0x404) [0x1742874]
I reproduced this bug in 3.2.0-alpha using Nvidia instead of AMD. **System Information** Operating system: Debian (Linux) Graphics card: GeForce RTX 3080 Mobile **Blender Version** Broken: 3.1.2 Linux 64, 3.2.0 2022-04-18 Linux 64 ``` # Blender 3.2.0, Commit date: 2022-04-18 10:21, Hash 933fed2a17a3 bpy.context.space_data.context = 'MODIFIER' # Property bpy.ops.object.modifier_add(type='SUBSURF') # Operator # backtrace build_linux/bin/blender(BLI_system_backtrace+0x20) [0xb35c650] build_linux/bin/blender() [0x1118909] /lib/x86_64-linux-gnu/libc.so.6(+0x3bd60) [0x7f49146f3d60] build_linux/bin/blender(GPU_shader_bind+0x13) [0x9d2dc13] build_linux/bin/blender(draw_subdiv_extract_pos_nor+0x26b) [0x1740bfb] build_linux/bin/blender() [0x17ab10b] build_linux/bin/blender() [0x179c4de] build_linux/bin/blender(DRW_create_subdivision+0x404) [0x1742874] ```

backtrace in 3.2.0-alpha-2022-04-18 via gdb:

ERROR (gpu.shader): subdiv patch evaluation Linking:
      | Error: Too many compute shader storage blocks (9/8)

--Type <RET> for more, q to quit, c to continue without paging--

Thread 1 "blender" received signal SIGSEGV, Segmentation fault.
GPU_shader_get_uniform_block_binding (shader=0x0, name=0x115d7c27 "shader_data")
    at ~/blender-git/blender/source/blender/gpu/intern/gpu_shader.cc:594
594       ShaderInterface *interface = unwrap(shader)->interface;
(gdb) bt
#0  GPU_shader_get_uniform_block_binding (shader=0x0, name=0x115d7c27 "shader_data")
    at ~/blender-git/blender/source/blender/gpu/intern/gpu_shader.cc:594
#1  0x0000000004970e4b in draw_subdiv_ubo_update_and_bind (cache=0x7fff95db0348, shader=0x0,
    src_offset=0, dst_offset=0, total_dispatch_size=24, has_sculpt_mask=false)
    at ~/blender-git/blender/source/blender/draw/intern/draw_cache_impl_subdivision.cc:1165
#2  0x0000000004970f9b in drw_subdiv_compute_dispatch (cache=0x7fff95db0348, shader=0x0,
    src_offset=0, dst_offset=0, total_dispatch_size=24, has_sculpt_mask=false)
    at ~/blender-git/blender/source/blender/draw/intern/draw_cache_impl_subdivision.cc:1216
#3  0x0000000004971255 in draw_subdiv_extract_pos_nor (cache=0x7fff95db0348,
    pos_nor=0x7fff9841a008)
    at ~/blender-git/blender/source/blender/draw/intern/draw_cache_impl_subdivision.cc:1267
#4  0x0000000004a2444d in blender::draw::extract_pos_nor_init_subdiv (
    subdiv_cache=0x7fff95db0348, UNUSED_mr=0x7fffb3171d08, UNUSED_cache=0x7fff97f75608,
    buffer=0x7fff9841a008, UNUSED_data=0x7fffb32fb788)
    at ~/blender-git/blender/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_pos_nor.cc:230
#5  0x00000000049fef79 in blender::draw::mesh_buffer_cache_create_requested_subdiv (
    cache=0x7fff97f75608, mbc=0x7fff97f75608, subdiv_cache=0x7fff95db0348, mr=0x7fffb3171d08)
    at ~/blender-git/blender/source/blender/draw/intern/draw_cache_extract_mesh.cc:870
[...]
backtrace in 3.2.0-alpha-2022-04-18 via gdb: ``` ERROR (gpu.shader): subdiv patch evaluation Linking: | Error: Too many compute shader storage blocks (9/8) --Type <RET> for more, q to quit, c to continue without paging-- Thread 1 "blender" received signal SIGSEGV, Segmentation fault. GPU_shader_get_uniform_block_binding (shader=0x0, name=0x115d7c27 "shader_data") at ~/blender-git/blender/source/blender/gpu/intern/gpu_shader.cc:594 594 ShaderInterface *interface = unwrap(shader)->interface; (gdb) bt #0 GPU_shader_get_uniform_block_binding (shader=0x0, name=0x115d7c27 "shader_data") at ~/blender-git/blender/source/blender/gpu/intern/gpu_shader.cc:594 #1 0x0000000004970e4b in draw_subdiv_ubo_update_and_bind (cache=0x7fff95db0348, shader=0x0, src_offset=0, dst_offset=0, total_dispatch_size=24, has_sculpt_mask=false) at ~/blender-git/blender/source/blender/draw/intern/draw_cache_impl_subdivision.cc:1165 #2 0x0000000004970f9b in drw_subdiv_compute_dispatch (cache=0x7fff95db0348, shader=0x0, src_offset=0, dst_offset=0, total_dispatch_size=24, has_sculpt_mask=false) at ~/blender-git/blender/source/blender/draw/intern/draw_cache_impl_subdivision.cc:1216 #3 0x0000000004971255 in draw_subdiv_extract_pos_nor (cache=0x7fff95db0348, pos_nor=0x7fff9841a008) at ~/blender-git/blender/source/blender/draw/intern/draw_cache_impl_subdivision.cc:1267 #4 0x0000000004a2444d in blender::draw::extract_pos_nor_init_subdiv ( subdiv_cache=0x7fff95db0348, UNUSED_mr=0x7fffb3171d08, UNUSED_cache=0x7fff97f75608, buffer=0x7fff9841a008, UNUSED_data=0x7fffb32fb788) at ~/blender-git/blender/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_pos_nor.cc:230 #5 0x00000000049fef79 in blender::draw::mesh_buffer_cache_create_requested_subdiv ( cache=0x7fff97f75608, mbc=0x7fff97f75608, subdiv_cache=0x7fff95db0348, mr=0x7fffb3171d08) at ~/blender-git/blender/source/blender/draw/intern/draw_cache_extract_mesh.cc:870 [...] ```

Debugging draw_subdiv_extract_pos_nor: get_patch_evaluation_shader returns unexpected NULL instead of shader.

(gdb) n
1252      GPUShader *shader = get_patch_evaluation_shader(SHADER_PATCH_EVALUATION);
(gdb) n
ERROR (gpu.shader): subdiv patch evaluation Linking: 
      | Error: Too many compute shader storage blocks (9/8)

1253      GPU_shader_bind(shader);
(gdb) p shader
$1 = (GPUShader *) 0x0
Debugging draw_subdiv_extract_pos_nor: get_patch_evaluation_shader returns unexpected NULL instead of shader. ``` (gdb) n 1252 GPUShader *shader = get_patch_evaluation_shader(SHADER_PATCH_EVALUATION); (gdb) n ERROR (gpu.shader): subdiv patch evaluation Linking: | Error: Too many compute shader storage blocks (9/8) 1253 GPU_shader_bind(shader); (gdb) p shader $1 = (GPUShader *) 0x0 ```
  • debug-gpu displays:
ndof: spacenavd not found
Read prefs: ~/.config/blender/3.2/config/userpref.blend
INFO (gpu.debug): Notification : Successfully hooked OpenGL debug callback using OpenGL 4.3
INFO (gpu.debug): Notification : Successfully hooked OpenGL debug callback using OpenGL 4.3
WARN (gpu.debug):  : 0:2588(17): warning: `vertex_data' used uninitialized
build_linux_debug/bin/blender(BLI_system_backtrace+0x26) [0x10ded32c]
build_linux_debug/bin/blender() [0xf707962]
/usr/lib/x86_64-linux-gnu/dri/swrast_dri.so(+0x21abb2) [0x7fcd78bb3bb2]
/usr/lib/x86_64-linux-gnu/dri/swrast_dri.so(+0x434ab6) [0x7fcd78dcdab6]
/usr/lib/x86_64-linux-gnu/dri/swrast_dri.so(+0x435ece) [0x7fcd78dceece]
[...]

So libgl1-mesa-dri:amd64 might be the one supporting 8 SSBOs only in my current configuration. The system is a new one, it is possible that the wrong libraries are chosen (e.g. old software mesa in debian bullseye).

- debug-gpu displays: ``` ndof: spacenavd not found Read prefs: ~/.config/blender/3.2/config/userpref.blend INFO (gpu.debug): Notification : Successfully hooked OpenGL debug callback using OpenGL 4.3 INFO (gpu.debug): Notification : Successfully hooked OpenGL debug callback using OpenGL 4.3 WARN (gpu.debug): : 0:2588(17): warning: `vertex_data' used uninitialized build_linux_debug/bin/blender(BLI_system_backtrace+0x26) [0x10ded32c] build_linux_debug/bin/blender() [0xf707962] /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so(+0x21abb2) [0x7fcd78bb3bb2] /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so(+0x434ab6) [0x7fcd78dcdab6] /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so(+0x435ece) [0x7fcd78dceece] [...] ``` So libgl1-mesa-dri:amd64 might be the one supporting 8 SSBOs only in my current configuration. The system is a new one, it is possible that the wrong libraries are chosen (e.g. old software mesa in debian bullseye).

I created a small "explanation patch" to do some exception-handling and display a hint in case of a missing shader.

--- draw_cache_impl_subdivision.orig.cc	2022-04-18 14:51:08.899347814 +0200
+++ draw_cache_impl_subdivision.cc	2022-04-23 13:23:04.545751222 +0200
@@ -1250,6 +1250,13 @@
   evaluator->wrapPatchParamBuffer(evaluator, &patch_param_buffer_interface);
 
   GPUShader *shader = get_patch_evaluation_shader(SHADER_PATCH_EVALUATION);
+  if (shader == NULL) {
+    GPU_vertbuf_discard(patch_index_buffer);
+    GPU_vertbuf_discard(patch_param_buffer);
+    GPU_vertbuf_discard(patch_arrays_buffer);
+    GPU_vertbuf_discard(src_buffer);
+    throw std::runtime_error("Couldn't build a shader, please disable GPU Subdivision in Preferences/Viewport or review your graphics-driver. A possible technical cause may be an OpenGL-driver which supports eight SSBOs only (nine are needed).");
+  }
   GPU_shader_bind(shader);
 
   int binding_point = 0;

After applying this patch one gets

ERROR (gpu.shader): subdiv patch evaluation Linking: 
      | Error: Too many compute shader storage blocks (9/8)

terminate called after throwing an instance of 'std::runtime_error'
  what():  Couldn't build a shader, please disable GPU Subdivision in Preferences/Viewport or review your graphics-driver. A possible technical cause may be an OpenGL-driver which supports eight SSBOs only

It would be nice if a driver which supports 8 storage blocks only (like libgl1-mesa-dri [20.3.5-1]) would be detected earlier. I will have a look at my system to determine why mesa instead of the nvidia-driver was choosen in this case.

I created a small "explanation patch" to do some exception-handling and display a hint in case of a missing shader. ``` --- draw_cache_impl_subdivision.orig.cc 2022-04-18 14:51:08.899347814 +0200 +++ draw_cache_impl_subdivision.cc 2022-04-23 13:23:04.545751222 +0200 @@ -1250,6 +1250,13 @@ evaluator->wrapPatchParamBuffer(evaluator, &patch_param_buffer_interface); GPUShader *shader = get_patch_evaluation_shader(SHADER_PATCH_EVALUATION); + if (shader == NULL) { + GPU_vertbuf_discard(patch_index_buffer); + GPU_vertbuf_discard(patch_param_buffer); + GPU_vertbuf_discard(patch_arrays_buffer); + GPU_vertbuf_discard(src_buffer); + throw std::runtime_error("Couldn't build a shader, please disable GPU Subdivision in Preferences/Viewport or review your graphics-driver. A possible technical cause may be an OpenGL-driver which supports eight SSBOs only (nine are needed)."); + } GPU_shader_bind(shader); int binding_point = 0; ``` After applying this patch one gets ``` ERROR (gpu.shader): subdiv patch evaluation Linking: | Error: Too many compute shader storage blocks (9/8) terminate called after throwing an instance of 'std::runtime_error' what(): Couldn't build a shader, please disable GPU Subdivision in Preferences/Viewport or review your graphics-driver. A possible technical cause may be an OpenGL-driver which supports eight SSBOs only ``` It would be nice if a driver which supports 8 storage blocks only (like libgl1-mesa-dri [20.3.5-1]) would be detected earlier. I will have a look at my system to determine why mesa instead of the nvidia-driver was choosen in this case.

On systems with several OpenGL-implementations one can use the environment variable __GLX_VENDOR_LIBRARY_NAME to choose an implementation. I can switch between a working nvidia-driver and a in blender non-working mesa-driver.

$ __GLX_VENDOR_LIBRARY_NAME=nvidia glxinfo | grep OpenGL.*string
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: NVIDIA GeForce RTX 3080 Laptop GPU/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 510.47.03
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL version string: 4.6.0 NVIDIA 510.47.03
OpenGL shading language version string: 4.60 NVIDIA
OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 510.47.03
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
$ __GLX_VENDOR_LIBRARY_NAME=mesa glxinfo | grep OpenGL.*string
OpenGL vendor string: Mesa/X.org
OpenGL renderer string: llvmpipe (LLVM 11.0.1, 256 bits)
OpenGL core profile version string: 4.5 (Core Profile) Mesa 20.3.5
OpenGL core profile shading language version string: 4.50
OpenGL version string: 3.1 Mesa 20.3.5
OpenGL shading language version string: 1.40
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 20.3.5
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
$ export__GLX_VENDOR_LIBRARY_NAME=nvidia
$ blender
On systems with several OpenGL-implementations one can use the environment variable __GLX_VENDOR_LIBRARY_NAME to choose an implementation. I can switch between a working nvidia-driver and a in blender non-working mesa-driver. ``` $ __GLX_VENDOR_LIBRARY_NAME=nvidia glxinfo | grep OpenGL.*string OpenGL vendor string: NVIDIA Corporation OpenGL renderer string: NVIDIA GeForce RTX 3080 Laptop GPU/PCIe/SSE2 OpenGL core profile version string: 4.6.0 NVIDIA 510.47.03 OpenGL core profile shading language version string: 4.60 NVIDIA OpenGL version string: 4.6.0 NVIDIA 510.47.03 OpenGL shading language version string: 4.60 NVIDIA OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 510.47.03 OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20 $ __GLX_VENDOR_LIBRARY_NAME=mesa glxinfo | grep OpenGL.*string OpenGL vendor string: Mesa/X.org OpenGL renderer string: llvmpipe (LLVM 11.0.1, 256 bits) OpenGL core profile version string: 4.5 (Core Profile) Mesa 20.3.5 OpenGL core profile shading language version string: 4.50 OpenGL version string: 3.1 Mesa 20.3.5 OpenGL shading language version string: 1.40 OpenGL ES profile version string: OpenGL ES 3.2 Mesa 20.3.5 OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20 $ export__GLX_VENDOR_LIBRARY_NAME=nvidia $ blender ```
Member

Added subscriber: @Imaginer

Added subscriber: @Imaginer

Added subscribers: @blendffnike, @PratikPB2123, @mano-wii

Added subscribers: @blendffnike, @PratikPB2123, @mano-wii

Added subscriber: @datar

Added subscriber: @datar
Member

Added subscriber: @OmarEmaraDev

Added subscriber: @OmarEmaraDev
Member

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

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

@kevindietrich I can reproduce the issue with LLVMPipe in mesa 22, so maybe this can help with debugging the issue without having to switch GPUs.

LIBGL_ALWAYS_SOFTWARE=1 blender
ERROR (gpu.shader): subdiv patch evaluation Linking:
      | Error: Too many compute shader storage blocks (9/8)

@kevindietrich I can reproduce the issue with LLVMPipe in mesa 22, so maybe this can help with debugging the issue without having to switch GPUs. ``` LIBGL_ALWAYS_SOFTWARE=1 blender ``` ``` ERROR (gpu.shader): subdiv patch evaluation Linking: | Error: Too many compute shader storage blocks (9/8) ```
Jeroen Bakker self-assigned this 2022-05-11 14:58:05 +02:00
Member

I am able to reproduce. Assigning to me.

I am able to reproduce. Assigning to me.

This issue was referenced by e354ba701a

This issue was referenced by e354ba701a0090abf131f25f49565660d8a70d0b

This issue was referenced by edd892166d

This issue was referenced by edd892166d48077290759c3299e2433638f85aa1
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'

This issue was referenced by fa9e878e79

This issue was referenced by fa9e878e79357d613a85a50050292f93b5bf41fc
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
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
9 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#97330
No description provided.