Maniphest T63178

Eevee animation render crash
Closed, ResolvedBUG

Assigned To
Clément Foucault (fclem)
Authored By
Alex (AnubisMaster)
Apr 1 2019, 12:37 PM
Tags
  • BF Blender
Subscribers
Alex (AnubisMaster)
Brecht Van Lommel (brecht)
Sebastian Parborg (zeddb)
Sergey Sharybin (sergey)

Description

System Information
Operating system: Windows 10 pro
Graphics card: GTX 1070 8gb

Blender Version
Broken: (example: 2.80, edbf15d3c044, master, 2018-11-28, as found on the splash screen)
Worked: (worked on almost 4 months ago (update wise))

**When i render in eevee ,after around 30 frames when rendering PNG's at 0 compression it crashes
Wheni render .MKV format (video) it takes around 800 frames to crash
When i render Png but with Render Samples set to 100 insthead of original 500 , it takes around 50 frames to crash

might be something related to the EeveE limitations ,but its weird when it worked fine one night and it doesn't work anymore ,at 500 samples i was able to render around 800 frames with CPU+GPU
now i'm rendering with GPU and it still does crash

GPU usage is around 94% during the render itself

The file has 4 Meshes , 1 empty , 5 curves (which one is animated with a cylinder),3 lights with an HDR , most things are animated (lights ,curves, textures, nodes) the animation is around 1200 frames the peak Memory usage is around 600 M (100 samples) / 800 M (at 500 samples)
yet it still crashes
here is the .blend file it seems that when i put at 64 samples on render ,the Crash is less frequent ,but it still happens around each few hundreds of frames
The render should be from frame 74 to frame 1249**

Revisions and Commits

rB Blender

Related Objects

Event Timeline

Alex (AnubisMaster) created this task.Apr 1 2019, 12:37 PM
Brecht Van Lommel (brecht) renamed this task from 2.8 RENDER CRASH to Eevee animation render crash.Apr 1 2019, 1:22 PM
Brecht Van Lommel (brecht) lowered the priority of this task from 90 to 30.
Brecht Van Lommel (brecht) added a subscriber: Brecht Van Lommel (brecht).

The frame it which it crashes is most likely random and the bug itself is unlikely to be related to the output file format.

We need exact steps to reproduce bugs, which in this case means a .blend file that crashes doing an animation render.

Note that Eevee always renders on the GPU. There is no CPU or CPU+GPU rendering, that's only for Cycles.

Alex (AnubisMaster) updated the task description.Apr 1 2019, 1:48 PM
In T63178#652594, @Brecht Van Lommel (brecht) wrote:

The frame it which it crashes is most likely random and the bug itself is unlikely to be related to the output file format.

We need exact steps to reproduce bugs, which in this case means a .blend file that crashes doing an animation render.

Note that Eevee always renders on the GPU. There is no CPU or CPU+GPU rendering, that's only for Cycles.

weird then it must have been a coincidence ,also sure i posted the .Blend file , hope it will show , keep in mind i'm constantly lowering the Samples to see whats the tolerable Crash Treshold , and seems under 32 samples is the most reliable ,but it still can Crash each amount of time

Alex (AnubisMaster) updated the task description.Apr 1 2019, 1:50 PM
Alex (AnubisMaster) updated the task description.Apr 1 2019, 6:35 PM
Brecht Van Lommel (brecht) raised the priority of this task from 30 to 90.Apr 1 2019, 6:36 PM
Alex (AnubisMaster) added a comment.Apr 2 2019, 4:22 AM

@Brecht Van Lommel (brecht) i updated the Download link with everything packed ,textures and hdrs , so it can be as accurate as possible to what i have

Sebastian Parborg (zeddb) assigned this task to Clément Foucault (fclem).EditedApr 2 2019, 10:44 AM
Sebastian Parborg (zeddb) lowered the priority of this task from 90 to 50.
Sebastian Parborg (zeddb) added a subscriber: Sebastian Parborg (zeddb).

I'm getting an assert :

BLI_assert failed: /home/zed/prog/blender/source/blender/gpu/intern/gpu_buffers.c:153, gpu_pbvh_batch_init(), at 'buffers->index_lines_buf != ((void *)0)'

If I ignore that I eventually get a segfault (around frame 816 or so) when rendering the animation:

Thread 37 "blender" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fff883ff700 (LWP 21631)]
0x0000555558b45ae9 in bind_texture (tex=0x7fff843f6b48, bind_type=1 '\001')
    at /home/zed/prog/blender/source/blender/draw/intern/draw_manager_exec.c:916
916		slot_flags[bind_num] = bind_type;
(gdb) bt
#0  0x0000555558b45ae9 in bind_texture (tex=0x7fff843f6b48, bind_type=1 '\001')
    at /home/zed/prog/blender/source/blender/draw/intern/draw_manager_exec.c:916
#1  0x0000555558b4637d in draw_shgroup (shgroup=0x7fff88734a60, pass_state=34)
    at /home/zed/prog/blender/source/blender/draw/intern/draw_manager_exec.c:1102
#2  0x0000555558b46f15 in drw_draw_pass_ex (pass=0x7fff7fba0358, start_group=0x7fff88734a60, end_group=0x7fff88734a60)
    at /home/zed/prog/blender/source/blender/draw/intern/draw_manager_exec.c:1326
#3  0x0000555558b470c8 in DRW_draw_pass (pass=0x7fff7fba0358)
    at /home/zed/prog/blender/source/blender/draw/intern/draw_manager_exec.c:1366
#4  0x0000555558b73aaa in lightbake_render_world_face (face=0, user_data=0x7fff883fcb00)
    at /home/zed/prog/blender/source/blender/draw/engines/eevee/eevee_lightprobes.c:816
#5  0x0000555558b73879 in render_cubemap (callback=0x555558b73a1b <lightbake_render_world_face>, user_data=0x7fff883fcb00,
    pos=0x7fff883fcb1c, clipsta=1, clipend=10) at /home/zed/prog/blender/source/blender/draw/engines/eevee/eevee_lightprobes.c:781
#6  0x0000555558b73b2e in EEVEE_lightbake_render_world (UNUSED_sldata=0x7fff80fee108, vedata=0x7fff8315b888, face_fb=0x7fff883fcbc0)
    at /home/zed/prog/blender/source/blender/draw/engines/eevee/eevee_lightprobes.c:826
#7  0x0000555558b700a7 in EEVEE_lightbake_update_world_quick (sldata=0x7fff80fee108, vedata=0x7fff8315b888, scene=0x7fffbebf1008)
    at /home/zed/prog/blender/source/blender/draw/engines/eevee/eevee_lightcache.c:1198
#8  0x0000555558b7516e in EEVEE_lightprobes_refresh (sldata=0x7fff80fee108, vedata=0x7fff8315b888)
    at /home/zed/prog/blender/source/blender/draw/engines/eevee/eevee_lightprobes.c:1230
#9  0x0000555558b85803 in EEVEE_render_draw (vedata=0x7fff8315b888, engine=0x7fffa564c788, rl=0x7fff807cac88, rect=0x7fff883fd0b0)
    at /home/zed/prog/blender/source/blender/draw/engines/eevee/eevee_render.c:530
#10 0x0000555558b6bf2c in eevee_render_to_image (vedata=0x7fff8315b888, engine=0x7fffa564c788, render_layer=0x7fff807cac88,
    rect=0x7fff883fd0b0) at /home/zed/prog/blender/source/blender/draw/engines/eevee/eevee_engine.c:441
#11 0x0000555558b3b5a5 in DRW_render_to_image (engine=0x7fffa564c788, depsgraph=0x7fffa5415308)
    at /home/zed/prog/blender/source/blender/draw/intern/draw_manager.c:1903
#12 0x000055555855bd3d in RE_engine_render (re=0x7fffa30b3008, do_all=0)
    at /home/zed/prog/blender/source/blender/render/intern/source/external_engine.c:735
#13 0x0000555558563c95 in do_render_3d (re=0x7fffa30b3008)
    at /home/zed/prog/blender/source/blender/render/intern/source/pipeline.c:1080
#14 0x0000555558563fce in do_render (re=0x7fffa30b3008) at /home/zed/prog/blender/source/blender/render/intern/source/pipeline.c:1157
#15 0x00005555585647d4 in do_render_composite (re=0x7fffa30b3008)
    at /home/zed/prog/blender/source/blender/render/intern/source/pipeline.c:1365
#16 0x000055555856553d in do_render_all_options (re=0x7fffa30b3008)
    at /home/zed/prog/blender/source/blender/render/intern/source/pipeline.c:1632
#17 0x0000555558568429 in RE_BlenderAnim (re=0x7fffa30b3008, bmain=0x7fffba944208, scene=0x7fffb8eb3008, single_layer=0x0,
    camera_override=0x0, sfra=782, efra=842, tfra=1) at /home/zed/prog/blender/source/blender/render/intern/source/pipeline.c:2486
#18 0x00005555584584d2 in render_startjob (rjv=0x7fffa3a12ec8, stop=0x7fffa7fc247c, do_update=0x7fffa7fc247a, progress=0x7fffa7fc2480)
    at /home/zed/prog/blender/source/blender/editors/render/render_internal.c:612
#19 0x0000555557e6c04a in do_job_thread (job_v=0x7fffa7fc2408)
    at /home/zed/prog/blender/source/blender/windowmanager/intern/wm_jobs.c:330
#20 0x00005555592ed676 in tslot_thread_start (tslot_p=0x7fff90e85548)
    at /home/zed/prog/blender/source/blender/blenlib/intern/threads.c:258
#21 0x00007fffebef6173 in start_thread () from /lib64/libpthread.so.0
#22 0x00007fffeba229cf in clone () from /lib64/libc.so.6

(This is with the 96MB .blend file)

Alex (AnubisMaster) added a comment.Apr 3 2019, 2:54 PM

Hey thank you for checking the file i hope you can figure something out even tho i can't understand code

Macro itsawesome:

Alex (AnubisMaster) updated the task description.Apr 3 2019, 2:57 PM
Alex (AnubisMaster) added a comment.Apr 8 2019, 8:34 PM
This comment was removed by Alex (AnubisMaster).
Brecht Van Lommel (brecht) raised the priority of this task from 50 to High.Apr 9 2019, 1:46 PM
Clément Foucault (fclem) added a subscriber: Sergey Sharybin (sergey).Apr 17 2019, 2:02 AM

This is a threading bug. Basically the main thread is freeing textures that are to be used by the render thread. But if this happens between the time the gpu texture is referenced for drawing and the drawing time it results in crash. The Images are strangely considered unused.

What I find strange, is that (If I remember correctly) by design the image datablock should not be the same for Rendering. But maybe they share GPUTextures at copy on write level. @Sergey Sharybin (sergey) any idea why?

I have a patch P954 that fixes it but involves using a global lock...

The gpu textures are freed here:

GPU_free_image(ima = 0x7fffc0c5be08,);
GPU_free_unused_buffers(bmain = 0x7fffc598f608,);
wm_draw_update(C = 0x7ffff1e43108,);
WM_main(C = 0x7ffff1e43108,);
main(argc = 1,argv = 0x7fffffffe808,);
Clément Foucault (fclem) changed the task status from Unknown Status to Resolved by committing rB148c0aa0faa6: Fix T63178 Eevee animation render crash.Apr 23 2019, 8:35 PM
Clément Foucault (fclem) added a commit: rB148c0aa0faa6: Fix T63178 Eevee animation render crash.