intel / intel-graphics-compiler

Other
606 stars 158 forks source link

ocloc crashes when using igc built with llvm-13 #227

Closed anbe42 closed 2 years ago

anbe42 commented 2 years ago

While building 22.04.22286 on Debian using igc 1.0.9933 built against llvm-13, ocloc crashes reproducibly. When using igc 1.0.9933 built against llvm-11, the build succeeds and all tests pass.

...
make  -f shared/source/built_ins/kernels/CMakeFiles/builtins_XE_HPC_COREcore_bindful.dir/build.make shared/source/built_ins/kernels/CMakeFiles/builtins_XE_HPC_COREcore_bindful.dir/build
make[2]: Entering directory '/build/intel-compute-runtime-22.04.22286/build'
[ 40%] Generating ../../../../bin/built_ins/x64/xe_hpc_core/bindful_copy_buffer_rect_0_XE_HPC_COREcore.gen, ../../../../bin/built_ins/x64/xe_hpc_core/bindful_copy_buffer_rect_0_XE_HPC_COREcore.bin
cd /build/intel-compute-runtime-22.04.22286/shared/source/built_ins/kernels && LD_LIBRARY_PATH=/build/intel-compute-runtime-22.04.22286/build/bin /build/intel-compute-runtime-22.04.22286/build/bin/ocloc -q -gen_file -file /build/intel-compute-runtime-22.04.22286/build/bin/built_ins/x64/xe_hpc_core/bindful_copy_buffer_rect_XE_HPC_COREcore.spv -spirv_input -device pvc -64 -output bindful_copy_buffer_rect_0 -out_dir /build/intel-compute-runtime-22.04.22286/build/bin/built_ins/x64/xe_hpc_core -revision_id 0 -options -cl-kernel-arg-info
[0]: /build/intel-compute-runtime-22.04.22286/build/bin/libocloc.so(_ZN16SafetyGuardLinux9sigActionEiP9siginfo_tPv+0x30) [0x7ff0b5146a80]
[1]: /lib/x86_64-linux-gnu/libc.so.6(+0x3c910) [0x7ff0b4efb910]
[2]: /usr/lib/x86_64-linux-gnu/libLLVM-13.so.1(_ZN4llvm11PointerType3getEPNS_4TypeEj+0x20) [0x7ff0ad952a50]
[3]: /usr/lib/x86_64-linux-gnu/libigc.so.1(+0x3123e5) [0x7ff0b2ca73e5]
[4]: /usr/lib/x86_64-linux-gnu/libigc.so.1(+0x330b76) [0x7ff0b2cc5b76]
[5]: /usr/lib/x86_64-linux-gnu/libigc.so.1(+0x3351e1) [0x7ff0b2cca1e1]
[6]: /usr/lib/x86_64-linux-gnu/libigc.so.1(+0x33b1f8) [0x7ff0b2cd01f8]
[7]: /usr/lib/x86_64-linux-gnu/libigc.so.1(+0x340b6d) [0x7ff0b2cd5b6d]
[8]: /usr/lib/x86_64-linux-gnu/libigc.so.1(+0x3414d8) [0x7ff0b2cd64d8]
[9]: /usr/lib/x86_64-linux-gnu/libigc.so.1(+0x272638) [0x7ff0b2c07638]
[10]: /usr/lib/x86_64-linux-gnu/libigc.so.1(+0x2765aa) [0x7ff0b2c0b5aa]
[11]: /usr/lib/x86_64-linux-gnu/libigc.so.1(+0x277835) [0x7ff0b2c0c835]
[12]: /usr/lib/x86_64-linux-gnu/libigc.so.1(+0x3604f0) [0x7ff0b2cf54f0]
[13]: /usr/lib/x86_64-linux-gnu/libigc.so.1(+0x27ab43) [0x7ff0b2c0fb43]
[14]: /usr/lib/x86_64-linux-gnu/libigc.so.1(+0x34f256) [0x7ff0b2ce4256]
[15]: /usr/lib/x86_64-linux-gnu/libigc.so.1(+0x35047f) [0x7ff0b2ce547f]
[16]: /build/intel-compute-runtime-22.04.22286/build/bin/libocloc.so(_ZN3NEO15OfflineCompiler15buildSourceCodeEv+0x22a) [0x7ff0b5106f0a]
[17]: /build/intel-compute-runtime-22.04.22286/build/bin/libocloc.so(_ZN3NEO15OfflineCompiler5buildEv+0x45) [0x7ff0b510c995]
[18]: /build/intel-compute-runtime-22.04.22286/build/bin/libocloc.so(_ZN16SafetyGuardLinux4callIiN3NEO15OfflineCompilerEMS2_FivEEET_PT0_T1_S5_+0x49) [0x7ff0b5146b79]
[19]: /build/intel-compute-runtime-22.04.22286/build/bin/libocloc.so(_Z20buildWithSafetyGuardPN3NEO15OfflineCompilerE+0xba) [0x7ff0b51468aa]
[20]: /build/intel-compute-runtime-22.04.22286/build/bin/libocloc.so(oclocInvoke+0x6e6) [0x7ff0b50eb536]
[21]: /build/intel-compute-runtime-22.04.22286/build/bin/ocloc(main+0x23) [0x55ab1b1ca763]
[22]: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xcd) [0x7ff0b4ee67ed]
[23]: /build/intel-compute-runtime-22.04.22286/build/bin/ocloc(_start+0x2a) [0x55ab1b1ca79a]
Aborted
make[2]: *** [shared/source/built_ins/kernels/CMakeFiles/builtins_XE_HPC_COREcore_bindful.dir/build.make:332: bin/built_ins/x64/xe_hpc_core/bindful_copy_buffer_rect_0_XE_HPC_COREcore.gen] Error 134
make[2]: Leaving directory '/build/intel-compute-runtime-22.04.22286/build'
...
anbe42 commented 2 years ago

It would be great if intel-graphics-compiler had a unit test that would reproduce this error on llvm-13 without requiring one to compile intel-compute-runtime ...

eero-t commented 2 years ago

@anbe42 isn't this a duplicate of #204 ? At least the backtrace seems very similar.

anbe42 commented 2 years ago

@eero-t you are right, that looks like the issue I experienced

eero-t commented 2 years ago

@anbe42 As that older bug has more info about the actual issue, I think you could close this. Just add your info to that bug.

anbe42 commented 2 years ago

duplicate of #204