Page MenuHome

Crash (Seg Fault) When Rendering Grease Pencil Stroke on Render Farm
Needs Triage, NormalPublic


System Information
Operating system: Darwin-19.5.0-x86_64-i386-64bit 64 Bits
Graphics card: AMD Radeon Pro 5500M OpenGL Engine ATI Technologies Inc. 4.1 ATI-3.9.15

Blender Version
Broken: version: 2.83.1, branch: master, commit date: 2020-06-25 09:47, hash: rB8289fc688b3e
Worked: (newest version of Blender that worked as expected)

Short description of error
Our render farm of 70 iMacs has been running for 3 years through the 2.7x series up till 2.81a.
When we switched to 2.83 last week it started crashing consistently when rendering Grease Pencil strokes.
The crash occurs when using Blender to do command line rendering via an SSH session on a machine without the user physically logged in. (Crashes on Mac and Linux)

Command Line Rendering on my own machine works fine.
Command Line Rendering on a remote machine via SSH works fine if I'm also logged into that machine.
But as soon as I log out of the machine so that the SSH session is the only active user on the machine, then the error shows up.

I tested this on 2.81a and the error (below) shows up there too, but in 2.81a it doesn't also lead to the Segmentation Fault that crashes Blender.
It's only in 2.83 (and 2.83.1) that the error is followed by the Seg Fault 11

_RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL.
Writing: /var/folders/jk/7b488ncn6c13t515bnt6q_8w68xcj1/T/test.crash.txt
Segmentation fault: 11

on Linux the error message is slightly different, but still a crash:
Unable to open a display
Aborted (core dumped)

Contents of test.crash.txt (from the Mac crash)

Blender 2.83.1, Commit date: 2020-06-25 09:47, Hash 8289fc688b3e


0 Blender 0x00000001079eb9d7 BLI_system_backtrace + 55
1 Blender 0x000000010159ddb8 sig_handle_crash + 392
2 libsystem_platform.dylib 0x00007fff5db5fb3d _sigtramp + 29
3 ??? 0x00007f8594802010 0x0 + 140211698802704
4 Blender 0x0000000101a39da2 DRW_opengl_context_create + 66
5 Blender 0x00000001018f47d5 WM_init_opengl + 37
6 Blender 0x0000000101a374ff DRW_render_gpencil + 127
7 Blender 0x0000000105de5ef4 RE_engine_render + 1156
8 Blender 0x0000000105df06d3 do_render_all_options + 387
9 Blender 0x0000000105df2a14 RE_RenderAnim + 2260
10 Blender 0x000000010159c9dd arg_handle_render_animation + 141
11 Blender 0x000000010797880d BLI_argsParse + 173
12 Blender 0x000000010159a497 main + 855
13 libdyld.dylib 0x00007fff5d974ed9 start + 1
14 ??? 0x000000000000000a 0x0 + 10

Exact steps for others to reproduce the error

  1. Make a new default file.
  2. Delete the Cube
  3. Add->Grease Pencil->Monkey
  4. Save as test.blend
  5. Copy test.blend onto a remote machine
  6. Make sure the machine is at the login prompt (showing the username password boxes).
  7. ssh into the remote machine
  8. command line render one frame from test.blend something like:

Blender -b /test.blend -s 1 -e 1 -a

Event Timeline

Probably there isn't an active OpenGL context to perform the rendering in. This is normal for Windows and Linux doing OpenGL renders. Monitor needs to be connected and context needs to be there (eg user needs to be logged in). This seems like a known limitation for render farm rendering, but strange that the report says it used to work for 2.81. I am not familiar how Mac handles OpenGL contexts.

I don't think the report says it works in 2.81, just that it doesn't crash.

It would be good to ensure we don't crash and print a more helpful error message that headless rendering is not supported.

I checked this morning and found that the iMac, when running 2.81a reported the error, but was able to render the Grease Pencil Monkey Object.

The command:
./ -b ~/test.blend -s 1 -e 1 -o /tmp/ -a

The error:
_RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL.

And somehow it manages to render the grease pencil object:

I also tested on the headless Linux box but 2.81a failed just as 2.83 did.
The Render Farm is on iMacs in computer labs across campus, so maybe they aren't entirely headless since they all have built in monitors?