GPU Subdivision: Crash after opening particular files #97737
Labels
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
17 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#97737
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system: Linux-5.15.0-27-generic-x86_64-with-glibc2.35 64 Bits
Graphics card: AMD Radeon RX 5700 XT (navi10, LLVM 13.0.1, DRM 3.42, 5.15.0-27-generic) AMD 4.6 (Core Profile) Mesa 22.0.1
Blender Version
Broken: version: 3.2.0 Alpha, branch: master, commit date: 2022-04-30 11:49, hash:
ac88123e29
Worked: 3.1
Short description of error
Crash occurs when trying to open a file with GPU subdivision enabled
Crash probably started to happen after library updates
Exact steps for others to reproduce the error
Here is the output of
blender --debug-all
:debug.txt
3D-101-INSTALLATIONS.crash.txt
3D-101-BUILDING-MATERIALS.crash.txt
Sample blend file that does not open
3D-101-BUILDING-MATERIALS.blend
Screencast of the problem (GPU Subdivision)
Screencast from 2022-05-01 08:04:44 PM.webm
Added subscriber: @RL
#97473 was marked as duplicate of this issue
#97963 was marked as duplicate of this issue
#97873 was marked as duplicate of this issue
blender/blender-addons#97803 was marked as duplicate of this issue
#97806 was marked as duplicate of this issue
#97702 was marked as duplicate of this issue
Added subscriber: @rjg
Changed status from 'Needs Triage' to: 'Needs User Info'
Please upload
/home/workstation/.cache/blender/3D-101-INSTALLATIONS.crash.txt
and ideally a minimal example project file that allows us to reproduce the issue.There, I added a few things.
Unfortunately the crash logs do not provide much insight. I can open the attached file without issues, so the problem could be with one of the library files that you've linked, as you've suspected.
This is a file without any libraries, but I still can't open it using 3.2.
3.1 opens it fine.
3D-101-STATIONERY-NO-LINKED-LIBRARY.blend
Added subscriber: @PratikPB2123
Hi, can you disable GPU subdivision and then load the file?: {nav Edit > Preferences > Viewport > Subdivision > GPU Subdivision}
There is a subdivision modifier on your object so I want you to check if crash is related to GPU subdiv feature.
Also I can't reproduce on current master (blender version 3.2)
Maybe related to this report?: #97702 (Crash loading demo flat-archiviz with 3.2 Alpha)
I tried this running with
--factory-startup
and disabled GPU Subdivision as you instructed, and it does open the file without any problems. With the file open, the moment I click on the checkbox to enable GPU Subdivision, blender crashes.Might this be a linux specific problem since you can open the file normally?
I also added a screencast showing the problem. Nice find on the GPU Subdiv! Thanks.
Added subscribers: @OmarEmaraDev, @JacquesLucke
@OmarEmaraDev or @JacquesLucke according to hardware list you both have similar system (Linux + AMD GPU)
Can you confirm this crash?
Also test #97702
I can reproduce the issue. It seems to be the same issue that I just mentioned 20 min ago on #blender-coders.
Seems to be related to opensubdiv, will try to bisect.
Couldn't bisect it in a reasonable amount of time right now, issue might also be caused a library update.
Stack trace: P2917
Some errors from asan, but not sure if those are related: P2918
I can open the file when I turn off
WITH_OPENSUBDIV
.Same also mentioned in #97702#1349274
So this was one of the more painful bisects, but it's related to a bump in dependencies for 3.2.x here
@JacquesLucke , can you merge these reports if both are same?
I'm marking this as
confirmed
Added subscribers: @DFair, @EAW, @ThomasDinges
Segfault trying to open a fileto GPU Subdivision: Crash after opening particular filesChanged status from 'Needs User Info' to: 'Confirmed'
Added subscriber: @kevindietrich
The new version of OpenSubDiv has some changes for OpenGL initialization problems on MacOS. Maybe this causes some issues on AMD cards. Or maybe it is something else.
Just any FYI: this resolved the segmentation fault for me locally too
Added subscriber: @jean-martin-barbut
I can confirm : I I disable the GPU subdivision, no more crash. I didn't have this bug on the 3.2.0 alpha.
Added subscriber: @onikuma
I was searching for a bug that matched my problem before creating a new one, and found this. Of all my blend files that stopped working recently on 3.2 builds, disabling the GPU subdivision resolved the problem and blender doesn't crash when opening the files. Verified with
e86b62f195
3.2 beta.The last build of 3.2 alpha that worked for me was
17eb8a9ceb
. Using this build I didn't have to turn off the GPU Subdivide and it opened my blend files as expected. I wasn't getting builds everyday, so there might have been newer builds that also worked, but all of the builds since17eb8a9ceb
, blender 3.2 crashed on opening most of my blend files.Added subscribers: @dr.sybren, @LazyDodo
Given the function it crashes in P2917 , the only crash i could see in that function would be OSD_OPENGL_HAS(ARB_direct_state_access) is true but glNamedBufferDataEXT is a nullptr.
@dr.sybren can you validate what opensubdiv is using for our linux? glew or the glapiloader? (grep your OSD build folder for
OSD_USES_GLEW
andOSD_USES_INTERNAL_GLAPILOADER
and see which one pops up)prodding through the binary it appears the glapiloader is used, this would only happen if it can't find glew
can you take a look here?
Added subscriber: @qq4945286
Added subscriber: @aleksijuvani
glNamedBufferDataEXT
is provided byEXT_direct_state_access
, notARB_direct_state_access
. Since they are checking forARB_direct_state_access
, the function to call isglNamedBufferData
, notglNamedBufferDataEXT
. Looking at the last commit to the file in question, this is probably an oversight on their part when switching fromEXT_direct_state_access
toARB_direct_state_access
.Hmmmm my build dir shows this:
so it would seem
OSD_USES_GLEW
is passed.Running
strings lib/libosdGPU.a | grep -iE 'GLEW|GLAPI'
shows symbols for both GLEW and (internal) GLAPI.Added subscriber: @brecht
I'm not sure how this is supposed to work when we build Blender with
extern/glew
and use an older GLEW for the library dependencies. We'd have to be lucky the symbols are compatible between versions.I think we should actually not be using GLEW for OpenSubdiv, which seems was the case for the 3.1 libraries.
Added subscribers: @B4rr3l, @dimant72
I think those are related to https://github.com/PixarAnimationStudios/OpenSubdiv/pull/1207
I can't seem to reproduce this issue, I guess because I have an NVIDIA card and not an AMD one.
Why do we have
extern/glew
anyway, since GLEW is also part of the pre-built libraries?-DNO_CLEW=OFF
and otherDGLEW_xxx
build options were already present in the commit that introduced the current deps-build infrastructure (3c14f02eac
) from back in 2017, so I don't think it was disabled in 3.1 either.I'm fine rebuilding OpenSubDiv with some other options. A patch with the required changes would be much appreciated, because since I can't reproduce the issue, I also can't check if my changes help anything.
I'm not sure about the historic reasons. D12034 may add a new reason. In any case, not something we'd want change for 3.2 I think.
Your
strings
command on the 3.1 libraries seems to show it was using glApi and no GLEW symbols.The current default in OpenSubdiv is
NO_GLEW=ON
, and that's no affected byNO_CLEW
orGLEW_*
variables. This was different in 2017, before the introduction of glApi.I'll make a patch.
I'm not sure it will solve the issue as I can't reproduce it either. But I don't see anything else in the diff between OpenSubdiv 3.4.3 and 3.4.4 that would explain it, so seems worth trying.
Removed subscriber: @aleksijuvani
I checked out
f4827d08bc
and did a build locally and this is still triggering a segmentation faultI'll try and get a trace in GDB (this take 30+ minutes locally) to confirm that it's still at the same place with this patch
It's not expected to be fixed yet, the libraries still need to be updated.
Changed status from 'Confirmed' to: 'Resolved'
This should be fixed now by {rBL62917}.
I haven't done an extensive test, but so far I no longer experience problems described in the initial report. Thank you everyone.
Added subscribers: @worksblender6, @mano-wii
Thank you very much, how can I apply this fix or when it will be released?
Download the latest 3.2 Beta or 3.3 Alpha build from https://builder.blender.org/download/daily/ it will have the fix.
Still an issue for me on the last 3.2 beta : if I disable normals/autosmooth and then apply a subdiv modifier. Eazy to reproduce : just add a mesh then apply subdiv modifier without checking the normals/autosmooth. See attached gif for demonstration. I'm using the latest 3.2 beta available.
still crashing while turning GPU subdivision on
Please include more information, like which exact version you downloaded, and when. 3.2-beta and 3.3-alpha use different branches for their libraries, and those were updated at different times.
Changed status from 'Resolved' to: 'Needs User Info'
I'll reopen the report then. More information will be needed to figure out why it works for some and not others.
--debug-gpu
from the terminal and attach full output logs here.There was another crash report on linux system: #97330 (Adding subdivision surface modifier to default cube causes silent crash.)
Is also fixed now
latest 3.3 Alpha
1bb7fda600
is working now! But latest 3.2 Betab47c5505aa
is not.With blender-3.2.0-beta+v32.502e1a44b948 : can't even launch blender. Terminal output of ./blender --debug-gpu is :
No log files seem to have been recorded.
With blender-3.2.0-beta+v32.b47c5505aa37 :
First see the attached GIF file that shows when the crash occures (seems to be related to autosmooth as it crashes when I unchecked the autosmooth after usin au subdv modifier (with GPU subdiv anabled). See log filsthat refer to that version.
My GPU is a AMD RX6800xt, see attached files for the terminal output of rocminfo and glxinfo -B.
With version blender-3.3.0-alpha+master.1bb7fda600c0, this bug seems to be solved.
blender_debug_output.txt
blender.crash.txt
glxinfo.txt
rocminfo.txt
That commit is from the same day as the new libraries were committed. I'm not 100% convinced that the buildbots have picked up on the new libs
That has nothing to do with this issue; this happens when Blender can't find Python. It could be due to a missing
make install
/ninja install
step.As also asked before: please be clear in which Blender you're using. A release name and a Git hash number is a good start, but in this case it doesn't mean much when we don't even know whether it's self-compiled or built by the buildbot.
Alright, 3.2 Beta
502e1a44b9
and 3.3 Alpha8d9d5da137
, both working great with GPU subdivision enabled + HIP at latest 5.1.2 ROcm driversNow we are talking! 6700XT + OpenSUSE Tumbleweed
Isn't it weird that one 3.2 version has no issue with python and another has an issue with python ? One version can find python and another one can't ?
I don't understand what you mean beacause i gave the build version of each instance of Blender I was running. I don't build Blender myself, I only get what is available on the nightly build.
Anyway I just downloaded the las available version : blender-3.2.0-beta+v32.502e1a44b948-linux.x86_64-release and it seems to be solved, at least on my computer (kubuntu 20.04 + studio) and RX6800XT with mesa+rocm.
I believe this can be marked as resolved. Thank you everyone for working on this.
Changed status from 'Needs User Info' to: 'Resolved'