Skip to content

PETSc error #64

@emiasims

Description

@emiasims

I'm rendering a scene with a bunch of little spheres and boxes, and the rendering completes, but then throws this error and crashes the python process.

[0]PETSC ERROR: ------------------------------------------------------------------------
[0]PETSC ERROR: Caught signal number 13 Broken Pipe: Likely while reading or writing to a socket
[0]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger
[0]PETSC ERROR: or see https://petsc.org/release/faq/#valgrind and https://petsc.org/release/faq/
[0]PETSC ERROR: configure using --with-debugging=yes, recompile, link, and run 
[0]PETSC ERROR: to get more information on the crash.
Abort(59) on node 0 (rank 0 in comm 0): application called MPI_Abort(MPI_COMM_WORLD, 59) - process 0

It happens specifically when this line is executed, process.communicate(string.encode('ascii')) in render_povstring. This makes sense, since it complains about a broken pipe for the communicate call.

If I save the string (or just the tempfile), and execute the exact call to render_povstring separately, it doesn't replicate the issue. The string is generated in a module that uses multiprocessing, so there might be some weirdness going on there?

Either way, the issue is resolved if I remove string.encode('ascii') from the communicate call, or use subprocess.run instead of Popen, like in this patch. Is there any use to sending the string as stdin, since the command generated in that function always uses the saved file anyway?

The patch I linked above preserves the return_np_array functionality, I'm not sure if there is another side effect but it doesn't seem so to me. I'll submit a PR if you like

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions