Skip to content

Race condition when building testshade_llvm_compiled_rs #1762

Open
@ilyakurdyukov

Description

@ilyakurdyukov

In a parallel build, testshade_llvm_compiled_rs.bc and testshade_llvm_compiled_rs.bc.cpp are generated two to three times.

The next command can use the truncated result, which is being overwritten by the second or third generation.

This is an example from the build log:

[ 86%] Generating testshade_llvm_compiled_rs.bc
cd /usr/src/RPM/BUILD/openshadinglanguage-1.12.14.0/x86_64-alt-linux/src/testshade && /usr/lib/llvm-15.0/bin/llvm-link -internalize /usr/src/RPM/BUILD/openshadinglanguage-1.12.14.0/x86_64-alt-linux/src/testshade/rs_simplerend_host.bc -o /usr/src/RPM/BUILD/openshadinglanguage-1.12.14.0/x86_64-alt-linux/src/testshade/testshade_llvm_compiled_rs.bc

[ 86%] Generating testshade_llvm_compiled_rs.bc.cpp
cd /usr/src/RPM/BUILD/openshadinglanguage-1.12.14.0/src/testshade && /usr/bin/python3.11 /usr/src/RPM/BUILD/openshadinglanguage-1.12.14.0/src/build-scripts/serialize-bc.py /usr/src/RPM/BUILD/openshadinglanguage-1.12.14.0/x86_64-alt-linux/src/testshade/testshade_llvm_compiled_rs.bc /usr/src/RPM/BUILD/openshadinglanguage-1.12.14.0/x86_64-alt-linux/src/testshade/testshade_llvm_compiled_rs.bc.cpp testshade_llvm_compiled_rs

[ 87%] Generating testshade_llvm_compiled_rs.bc
cd /usr/src/RPM/BUILD/openshadinglanguage-1.12.14.0/x86_64-alt-linux/src/testshade && /usr/lib/llvm-15.0/bin/llvm-link -internalize /usr/src/RPM/BUILD/openshadinglanguage-1.12.14.0/x86_64-alt-linux/src/testshade/rs_simplerend_host.bc -o /usr/src/RPM/BUILD/openshadinglanguage-1.12.14.0/x86_64-alt-linux/src/testshade/testshade_llvm_compiled_rs.bc

[ 90%] Generating testshade_llvm_compiled_rs.bc.cpp
cd /usr/src/RPM/BUILD/openshadinglanguage-1.12.14.0/src/testshade && /usr/bin/python3.11 /usr/src/RPM/BUILD/openshadinglanguage-1.12.14.0/src/build-scripts/serialize-bc.py /usr/src/RPM/BUILD/openshadinglanguage-1.12.14.0/x86_64-alt-linux/src/testshade/testshade_llvm_compiled_rs.bc /usr/src/RPM/BUILD/openshadinglanguage-1.12.14.0/x86_64-alt-linux/src/testshade/testshade_llvm_compiled_rs.bc.cpp testshade_llvm_compiled_rs

Versions

  • OSL branch/version: 1.12.8.0, 1.12.13.0, 1.12.14.0
  • OS: ALT Linux
  • C++ compiler: doesn't matter
  • LLVM version: doesn't matter
  • OIIO version: doesn't matter

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugCrash or wrong behavior of an existing feature.shading systemRelated to the runtime shader execution

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions