Search Issue Tracker
Fixed in 2021.2.X
Fixed in 2018.4.X, 2019.4.X, 2020.3.X, 2021.1.X
Votes
0
Found in
2018.4
2019.1
2019.2
2019.3
2020.1
Issue ID
1229259
Regression
No
100% crash when baking with Enlighten on a system with more than 64 threads
Crash when baking with Enlighten on a system with more than 64 threads, for example a AMD Threadripper 3990X.
Steps to reproduce:
Open gfx tests project.
Open scene 'Assets/044-BakedLightingLightmapMats-editor.unity'
Choose Enlighten as bake backend.
Bake lighting.
Observed result:
100% reproducible crash in the embree worker threads spawned by Enlighten:
> Unity.exe!embree::PrimRefGen<embree::HeuristicBinning<2>,embree::atomic_set<embree::PrimRefBlock> >::task_gen_parallel(const embree::TaskScheduler::ThreadInfo & thread, unsigned __int64 idx) Line 80 C++
Unity.exe!embree::TaskSchedulerStandard::run(unsigned __int64 tid) Line 100 C++
Unity.exe!embree::TaskSchedulerStandard::threadFunction(embree::TaskSchedulerStandard::Thread * thread) Line 115 C++
Unity.exe!embree::threadStartup(embree::ThreadStartupData * parg) Line 120 C++
[External Code]
Exception thrown: read access violation.
**block** was 0xFFFFFFFFFFFF7FFF.
Thread was spawned by BakingJobs.Worker 0
[External Code]
Unity.exe!embree::ConditionSys::wait(embree::MutexSys & mutex) Line 109
Unity.exe!embree::TaskSchedulerStandard::stop() Line 74
Unity.exe!embree::BVH4Builder<embree::HeuristicBinning<2> >::BVH4Builder<embree::HeuristicBinning<2> >(const embree::TriangleType & trity, const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & intTy, const embree::BuildTriangle * triangles, unsigned __int64 numTriangles, const embree::Vec3<float> * vertices, unsigned __int64 numVertices, const embree::BBox<embree::Vec3<float> > & bounds, bool freeVertices) Line 37
Unity.exe!Geo::GeoEmbreeContext::Create(const Geo::IRtMesh * world, bool anyHitTraversal) Line 138
Unity.exe!Enlighten::Precalc::Create(const Enlighten::Bake * bake, const Enlighten::BakeInputProperties * props, const Enlighten::BakeVisibilityBuffer * visBuffer, const Enlighten::BakeInputSystem * system, const Enlighten::BakeSystemResource * systemResource, const Enlighten::IBakeTextureManager * texMgr) Line 58
Unity.exe!Enlighten::ComputeVisibility(Enlighten::BakeVisibilityBuffer * visBuffer, const Enlighten::Bake * bake, const Enlighten::BakeInputSystem * system, const Enlighten::BakeSystemResource * systemResource, const Geo::GeoArray<Geo::GeoPair<int,Enlighten::BakeInputLight const *> > * lightsToAdd, const Enlighten::IBakeTextureManager * pTexMgr, const Enlighten::BakeInputProperties * props, bool target) Line 989
Unity.exe!Enlighten::Bake::UpdateVisibilityBuffer(const Enlighten::IBakeInputSystem * pSystem, const Enlighten::IBakeSystemResource * pSystemResource, const Enlighten::IBakeTextureManager * pTexMgr, const Enlighten::IBakeInputLighting * pLighting, const Enlighten::IBakeInputProperties * pProps, bool target, Geo::IGeoProgressProxy * progress, Enlighten::IBakeVisibilityBuffer * & ioVisBuffer) Line 400
Unity.exe!CreateEnlightenBakeVisibilityBufferJob::Execute(IQueueJob::JobInfo & info) Line 139
Unity.exe!IQueueJob::InvokeExecuteJob(IQueueJob & job, IQueueJob::JobInfo * info) Line 45
Unity.exe!JobManager::UpdateFunction(void * userData) Line 583
Unity.exe!JobQueue::ExecuteJobFunc<1>(JobInfo * info, JobGroup * group, void(*)(void *) completeJobFunc) Line 460
Unity.exe!JobQueue::Exec(JobInfo * info, __int64 tag, int count, bool zeroJobWorkersMode) Line 617
Unity.exe!JobQueue::Steal(JobGroup * group, JobInfo * info, __int64 tag, int count, bool exec, bool zeroJobWorkersMode) Line 724
Unity.exe!JobQueue::ExecuteJobFromQueue(bool zeroJobWorkersMode) Line 819
Unity.exe!JobQueue::ProcessJobs(JobQueue::ThreadInfo * threadInfo, void * profInfo) Line 939
Unity.exe!JobQueue::WorkLoop(void * data) Line 1022
Unity.exe!Thread::RunThreadWrapper(void * ptr) Line 78
[External Code]
Expected outcome: bake completes without errors.
Workaround:
If SMT is disabled on an AMD Threadripper 3990X so it has 64 threads instead of 128, the crash doesn't happen.
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- [HDRP] [Metal] Tiled artefacts when using DRS
- [HDRP] Empty template starts with incorrect Physically Based Sky ground
- Big chunk of "Untracked" memory in the Memory Profiler screenshot when a custom .obj file is loaded while in Play Mode
- Video contains artifacts when played in the Video Preview section in the Inspector Window
- UI Toolkit Slider "Fill" option doesn't invert when "Inverted" option is selected
lobosky
Sep 13, 2020 17:39
Nice Update