Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pocl breaks on OSX when after commit 351ca0a3cdeb584cab7e2ea5e3bb845a103f4cbd #4

Closed
elhigu opened this issue Aug 27, 2013 · 4 comments

Comments

@elhigu
Copy link
Contributor

elhigu commented Aug 27, 2013

After commit our test cases start giving following type of errors:

clEnqueueNDRangeKernel failed with code -5

clSetKernelArg failed for arg 2
clSetKernelArg failed for array length parameter
clEnqueueNDRangeKernel failed with code -5

And pocl test bench start failing:

Subject: [pocl 0.9-pre] testsuite: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 52 53 54 55 56 57 58 59 60 61 62 66 67 68 69 70 71 72 74 75 76 79 80 82 85 87 failed

@kraiskil
Copy link
Member

The makefile-related stuff of that commit was reverted in 857f62d, and the rest of 351ca0a should not affect the script version in any way besides the refactoring. Which seems to work on all other platforms.

@elhigu
Copy link
Contributor Author

elhigu commented Aug 27, 2013

Yes I understand that rest should not affect, but for some reason problems start in commit 351ca0a .

I tested also commit 857f62d and few other commits (I randomly selected 4 to test) between HEAD and 351ca0a they all fail on my setup.

When I reset branch to 2d9e1e5 it works.

I'm on OSX 10.8.4, with hwloc 1.7 from homebrew and with llvm-3.3 compiled with optimizations from release tarball.

@eschnett
Copy link
Contributor

Thanks for tracking this down. I looked at then newly introduce routine, and found a missing "return 0" statement at the end. (Or, I didn't find it, actually.)

OS X was broken for me before as well, and this corrected it.

-erik

On 2013-08-27, at 8:53 , Mikael Lepistö notifications@github.com wrote:

Yes I understand that rest should not affect, but for some reason problems start in commit 351ca0a .

I tested also commit 857f62d and few other commits (I randomly selected 4 to test) between HEAD and 351ca0a they all fail on my setup.

When I reset branch to 2d9e1e5 it works.

I'm on OSX 10.8.4, with hwloc 1.7 from homebrew and with llvm-3.3 compiled with optimizations from release tarball.


Reply to this email directly or view it on GitHub.

Erik Schnetter schnetter@gmail.com
http://www.perimeterinstitute.ca/personal/eschnetter/

My email is as private as my paper mail. I therefore support encrypting
and signing email messages. Get my PGP key from http://pgp.mit.edu/.

@elhigu
Copy link
Contributor Author

elhigu commented Aug 27, 2013

I just tried the latest revision and everything works fine again. Thanks!

@elhigu elhigu closed this as completed Aug 27, 2013
anbe42 added a commit to anbe42/pocl that referenced this issue Dec 1, 2021
The segmentation fault can be observed with llvm-10, llvm-11 and llvm-12
and seems to be fixed in llvm-13. It happens on the architectures armhf
and armel (both 32-bit) always and on x86_64 sporadically.
The test segfaults only on the first run (i.e. the kernel is not yet in
pocl's kernel cache) while it passes on subsequent execution (with
something already in the kernel cache), emitting only some llvm
diagnostics:

inlinable function call in a function with debug info must have a !dbg location
  %11 = call i32 @_Z12get_local_idj(i32 0)
inlinable function call in a function with debug info must have a !dbg location
  %19 = call i32 @_Z12get_local_idj(i32 1)
inlinable function call in a function with debug info must have a !dbg location
  %27 = call i32 @_Z12get_local_idj(i32 2)

The backtrace of the segmentation fault as observed with llvm-10 and pocl 1.6:
 #0  getEmissionKind () at .../llvm/include/llvm/IR/DebugInfoMetadata.h:1244
 pocl#1  initialize () at .../llvm/lib/CodeGen/LexicalScopes.cpp:53
 pocl#2  0xb14102f0 in computeIntervals () at .../llvm/lib/CodeGen/LiveDebugVariables.cpp:979
 pocl#3  runOnMachineFunction () at .../llvm/lib/CodeGen/LiveDebugVariables.cpp:996
 pocl#4  runOnMachineFunction () at .../llvm/lib/CodeGen/LiveDebugVariables.cpp:1023
 pocl#5  0xb14856c8 in runOnFunction () at .../llvm/lib/CodeGen/MachineFunctionPass.cpp:73
 pocl#6  0xb12ff494 in runOnFunction () at .../llvm/lib/IR/LegacyPassManager.cpp:1481
 pocl#7  0xb12ff750 in runOnModule () at .../llvm/lib/IR/LegacyPassManager.cpp:1517
 pocl#8  0xb12ffba8 in runOnModule () at .../llvm/lib/IR/LegacyPassManager.cpp:1582
 pocl#9  run () at .../llvm/lib/IR/LegacyPassManager.cpp:1694
 pocl#10 0xb6e64c82 in pocl_llvm_codegen (Device=Device@entry=0xdb0010, Modp=0x1361838, Output=Output@entry=0xbefde86c, OutputSize=OutputSize@entry=0xbefde880) at ./lib/CL/pocl_llvm_wg.cc:624
 pocl#11 0xb6e291de in llvm_codegen (output=output@entry=0xdeb898 "...BMDHA/Sdot_kernel/0-0-0/Sdot_kernel.so", device_i=device_i@entry=0, kernel=kernel@entry=0xbefe0240,
     device=0xdb0010, command=command@entry=0xbefe0278, specialize=specialize@entry=0) at ./lib/CL/devices/common.c:158
 pocl#12 0xb6e2ae44 in pocl_check_kernel_disk_cache (command=command@entry=0xbefe0278, specialized=specialized@entry=0) at ./lib/CL/devices/common.c:958
 pocl#13 0xb6e2b262 in pocl_check_kernel_dlhandle_cache (command=0xbefe0278, initial_refcount=0, specialize=0) at ./lib/CL/devices/common.c:1081
 pocl#14 0xb6e033d4 in program_compile_dynamic_wg_binaries (program=program@entry=0xd8ab88) at ./lib/CL/pocl_build.c:179
 pocl#15 0xb6e13f20 in get_binary_sizes (sizes=0xbefe0384, program=0xd8ab88) at ./lib/CL/clGetProgramInfo.c:36
 pocl#16 POclGetProgramInfo (program=0xd8ab88, param_name=4453, param_value_size=128, param_value=0xbefe0384, param_value_size_ret=0xbefe0380) at ./lib/CL/clGetProgramInfo.c:115
 pocl#17 0x00473070 in main () at 975931.c:238

pocl#889
https://bugs.debian.org/975931
anbe42 added a commit to anbe42/pocl that referenced this issue Dec 1, 2021
The segmentation fault can be observed with llvm-10, llvm-11 and llvm-12
and seems to be fixed in llvm-13. It happens on the architectures armhf
and armel (both 32-bit) always and on x86_64 sporadically.
The test segfaults only on the first run (i.e. the kernel is not yet in
pocl's kernel cache) while it passes on subsequent execution (with
something already in the kernel cache), emitting only some llvm
diagnostics:

inlinable function call in a function with debug info must have a !dbg location
  %11 = call i32 @_Z12get_local_idj(i32 0)
inlinable function call in a function with debug info must have a !dbg location
  %19 = call i32 @_Z12get_local_idj(i32 1)
inlinable function call in a function with debug info must have a !dbg location
  %27 = call i32 @_Z12get_local_idj(i32 2)

The backtrace of the segmentation fault as observed with llvm-10 and pocl 1.6:
 #0  getEmissionKind () at .../llvm/include/llvm/IR/DebugInfoMetadata.h:1244
 pocl#1  initialize () at .../llvm/lib/CodeGen/LexicalScopes.cpp:53
 pocl#2  0xb14102f0 in computeIntervals () at .../llvm/lib/CodeGen/LiveDebugVariables.cpp:979
 pocl#3  runOnMachineFunction () at .../llvm/lib/CodeGen/LiveDebugVariables.cpp:996
 pocl#4  runOnMachineFunction () at .../llvm/lib/CodeGen/LiveDebugVariables.cpp:1023
 pocl#5  0xb14856c8 in runOnFunction () at .../llvm/lib/CodeGen/MachineFunctionPass.cpp:73
 pocl#6  0xb12ff494 in runOnFunction () at .../llvm/lib/IR/LegacyPassManager.cpp:1481
 pocl#7  0xb12ff750 in runOnModule () at .../llvm/lib/IR/LegacyPassManager.cpp:1517
 pocl#8  0xb12ffba8 in runOnModule () at .../llvm/lib/IR/LegacyPassManager.cpp:1582
 pocl#9  run () at .../llvm/lib/IR/LegacyPassManager.cpp:1694
 pocl#10 0xb6e64c82 in pocl_llvm_codegen (Device=Device@entry=0xdb0010, Modp=0x1361838, Output=Output@entry=0xbefde86c, OutputSize=OutputSize@entry=0xbefde880) at ./lib/CL/pocl_llvm_wg.cc:624
 pocl#11 0xb6e291de in llvm_codegen (output=output@entry=0xdeb898 "...BMDHA/Sdot_kernel/0-0-0/Sdot_kernel.so", device_i=device_i@entry=0, kernel=kernel@entry=0xbefe0240,
     device=0xdb0010, command=command@entry=0xbefe0278, specialize=specialize@entry=0) at ./lib/CL/devices/common.c:158
 pocl#12 0xb6e2ae44 in pocl_check_kernel_disk_cache (command=command@entry=0xbefe0278, specialized=specialized@entry=0) at ./lib/CL/devices/common.c:958
 pocl#13 0xb6e2b262 in pocl_check_kernel_dlhandle_cache (command=0xbefe0278, initial_refcount=0, specialize=0) at ./lib/CL/devices/common.c:1081
 pocl#14 0xb6e033d4 in program_compile_dynamic_wg_binaries (program=program@entry=0xd8ab88) at ./lib/CL/pocl_build.c:179
 pocl#15 0xb6e13f20 in get_binary_sizes (sizes=0xbefe0384, program=0xd8ab88) at ./lib/CL/clGetProgramInfo.c:36
 pocl#16 POclGetProgramInfo (program=0xd8ab88, param_name=4453, param_value_size=128, param_value=0xbefe0384, param_value_size_ret=0xbefe0380) at ./lib/CL/clGetProgramInfo.c:115
 pocl#17 0x00473070 in main () at 975931.c:238

pocl#889
https://bugs.debian.org/975931
anbe42 added a commit to anbe42/pocl that referenced this issue Dec 1, 2021
The segmentation fault can be observed with llvm-10, llvm-11 and llvm-12
and seems to be fixed in llvm-13. It happens on the architectures armhf
and armel (both 32-bit) always and on x86_64 sporadically.
The test segfaults only on the first run (i.e. the kernel is not yet in
pocl's kernel cache) while it passes on subsequent execution (with
something already in the kernel cache), emitting only some llvm
diagnostics:

inlinable function call in a function with debug info must have a !dbg location
  %11 = call i32 @_Z12get_local_idj(i32 0)
inlinable function call in a function with debug info must have a !dbg location
  %19 = call i32 @_Z12get_local_idj(i32 1)
inlinable function call in a function with debug info must have a !dbg location
  %27 = call i32 @_Z12get_local_idj(i32 2)

The backtrace of the segmentation fault as observed with llvm-10 and pocl 1.6:
 #0  getEmissionKind () at .../llvm/include/llvm/IR/DebugInfoMetadata.h:1244
 pocl#1  initialize () at .../llvm/lib/CodeGen/LexicalScopes.cpp:53
 pocl#2  0xb14102f0 in computeIntervals () at .../llvm/lib/CodeGen/LiveDebugVariables.cpp:979
 pocl#3  runOnMachineFunction () at .../llvm/lib/CodeGen/LiveDebugVariables.cpp:996
 pocl#4  runOnMachineFunction () at .../llvm/lib/CodeGen/LiveDebugVariables.cpp:1023
 pocl#5  0xb14856c8 in runOnFunction () at .../llvm/lib/CodeGen/MachineFunctionPass.cpp:73
 pocl#6  0xb12ff494 in runOnFunction () at .../llvm/lib/IR/LegacyPassManager.cpp:1481
 pocl#7  0xb12ff750 in runOnModule () at .../llvm/lib/IR/LegacyPassManager.cpp:1517
 pocl#8  0xb12ffba8 in runOnModule () at .../llvm/lib/IR/LegacyPassManager.cpp:1582
 pocl#9  run () at .../llvm/lib/IR/LegacyPassManager.cpp:1694
 pocl#10 0xb6e64c82 in pocl_llvm_codegen (Device=Device@entry=0xdb0010, Modp=0x1361838, Output=Output@entry=0xbefde86c, OutputSize=OutputSize@entry=0xbefde880) at ./lib/CL/pocl_llvm_wg.cc:624
 pocl#11 0xb6e291de in llvm_codegen (output=output@entry=0xdeb898 "...BMDHA/Sdot_kernel/0-0-0/Sdot_kernel.so", device_i=device_i@entry=0, kernel=kernel@entry=0xbefe0240,
     device=0xdb0010, command=command@entry=0xbefe0278, specialize=specialize@entry=0) at ./lib/CL/devices/common.c:158
 pocl#12 0xb6e2ae44 in pocl_check_kernel_disk_cache (command=command@entry=0xbefe0278, specialized=specialized@entry=0) at ./lib/CL/devices/common.c:958
 pocl#13 0xb6e2b262 in pocl_check_kernel_dlhandle_cache (command=0xbefe0278, initial_refcount=0, specialize=0) at ./lib/CL/devices/common.c:1081
 pocl#14 0xb6e033d4 in program_compile_dynamic_wg_binaries (program=program@entry=0xd8ab88) at ./lib/CL/pocl_build.c:179
 pocl#15 0xb6e13f20 in get_binary_sizes (sizes=0xbefe0384, program=0xd8ab88) at ./lib/CL/clGetProgramInfo.c:36
 pocl#16 POclGetProgramInfo (program=0xd8ab88, param_name=4453, param_value_size=128, param_value=0xbefe0384, param_value_size_ret=0xbefe0380) at ./lib/CL/clGetProgramInfo.c:115
 pocl#17 0x00473070 in main () at 975931.c:238

pocl#889
https://bugs.debian.org/975931
anbe42 added a commit to anbe42/pocl that referenced this issue Dec 1, 2021
The segmentation fault can be observed with llvm-10, llvm-11 and llvm-12
and seems to be fixed in llvm-13. It happens on the architectures armhf
and armel (both 32-bit) always and on x86_64 sporadically.
The test segfaults only on the first run (i.e. the kernel is not yet in
pocl's kernel cache) while it passes on subsequent execution (with
something already in the kernel cache), emitting only some llvm
diagnostics:

inlinable function call in a function with debug info must have a !dbg location
  %11 = call i32 @_Z12get_local_idj(i32 0)
inlinable function call in a function with debug info must have a !dbg location
  %19 = call i32 @_Z12get_local_idj(i32 1)
inlinable function call in a function with debug info must have a !dbg location
  %27 = call i32 @_Z12get_local_idj(i32 2)

The backtrace of the segmentation fault as observed with llvm-10 and pocl 1.6:
 #0  getEmissionKind () at .../llvm/include/llvm/IR/DebugInfoMetadata.h:1244
 pocl#1  initialize () at .../llvm/lib/CodeGen/LexicalScopes.cpp:53
 pocl#2  0xb14102f0 in computeIntervals () at .../llvm/lib/CodeGen/LiveDebugVariables.cpp:979
 pocl#3  runOnMachineFunction () at .../llvm/lib/CodeGen/LiveDebugVariables.cpp:996
 pocl#4  runOnMachineFunction () at .../llvm/lib/CodeGen/LiveDebugVariables.cpp:1023
 pocl#5  0xb14856c8 in runOnFunction () at .../llvm/lib/CodeGen/MachineFunctionPass.cpp:73
 pocl#6  0xb12ff494 in runOnFunction () at .../llvm/lib/IR/LegacyPassManager.cpp:1481
 pocl#7  0xb12ff750 in runOnModule () at .../llvm/lib/IR/LegacyPassManager.cpp:1517
 pocl#8  0xb12ffba8 in runOnModule () at .../llvm/lib/IR/LegacyPassManager.cpp:1582
 pocl#9  run () at .../llvm/lib/IR/LegacyPassManager.cpp:1694
 pocl#10 0xb6e64c82 in pocl_llvm_codegen (Device=Device@entry=0xdb0010, Modp=0x1361838, Output=Output@entry=0xbefde86c, OutputSize=OutputSize@entry=0xbefde880) at ./lib/CL/pocl_llvm_wg.cc:624
 pocl#11 0xb6e291de in llvm_codegen (output=output@entry=0xdeb898 "...BMDHA/Sdot_kernel/0-0-0/Sdot_kernel.so", device_i=device_i@entry=0, kernel=kernel@entry=0xbefe0240,
     device=0xdb0010, command=command@entry=0xbefe0278, specialize=specialize@entry=0) at ./lib/CL/devices/common.c:158
 pocl#12 0xb6e2ae44 in pocl_check_kernel_disk_cache (command=command@entry=0xbefe0278, specialized=specialized@entry=0) at ./lib/CL/devices/common.c:958
 pocl#13 0xb6e2b262 in pocl_check_kernel_dlhandle_cache (command=0xbefe0278, initial_refcount=0, specialize=0) at ./lib/CL/devices/common.c:1081
 pocl#14 0xb6e033d4 in program_compile_dynamic_wg_binaries (program=program@entry=0xd8ab88) at ./lib/CL/pocl_build.c:179
 pocl#15 0xb6e13f20 in get_binary_sizes (sizes=0xbefe0384, program=0xd8ab88) at ./lib/CL/clGetProgramInfo.c:36
 pocl#16 POclGetProgramInfo (program=0xd8ab88, param_name=4453, param_value_size=128, param_value=0xbefe0384, param_value_size_ret=0xbefe0380) at ./lib/CL/clGetProgramInfo.c:115
 pocl#17 0x00473070 in main () at 975931.c:238

pocl#889
https://bugs.debian.org/975931
anbe42 added a commit to anbe42/pocl that referenced this issue Dec 1, 2021
The segmentation fault can be observed with llvm-10, llvm-11 and llvm-12
and seems to be fixed in llvm-13. It happens on the architectures armhf
and armel (both 32-bit) always and on x86_64 sporadically.
The test segfaults only on the first run (i.e. the kernel is not yet in
pocl's kernel cache) while it passes on subsequent execution (with
something already in the kernel cache), emitting only some llvm
diagnostics:

inlinable function call in a function with debug info must have a !dbg location
  %11 = call i32 @_Z12get_local_idj(i32 0)
inlinable function call in a function with debug info must have a !dbg location
  %19 = call i32 @_Z12get_local_idj(i32 1)
inlinable function call in a function with debug info must have a !dbg location
  %27 = call i32 @_Z12get_local_idj(i32 2)

The backtrace of the segmentation fault as observed with llvm-10 and pocl 1.6:
 #0  getEmissionKind () at .../llvm/include/llvm/IR/DebugInfoMetadata.h:1244
 pocl#1  initialize () at .../llvm/lib/CodeGen/LexicalScopes.cpp:53
 pocl#2  0xb14102f0 in computeIntervals () at .../llvm/lib/CodeGen/LiveDebugVariables.cpp:979
 pocl#3  runOnMachineFunction () at .../llvm/lib/CodeGen/LiveDebugVariables.cpp:996
 pocl#4  runOnMachineFunction () at .../llvm/lib/CodeGen/LiveDebugVariables.cpp:1023
 pocl#5  0xb14856c8 in runOnFunction () at .../llvm/lib/CodeGen/MachineFunctionPass.cpp:73
 pocl#6  0xb12ff494 in runOnFunction () at .../llvm/lib/IR/LegacyPassManager.cpp:1481
 pocl#7  0xb12ff750 in runOnModule () at .../llvm/lib/IR/LegacyPassManager.cpp:1517
 pocl#8  0xb12ffba8 in runOnModule () at .../llvm/lib/IR/LegacyPassManager.cpp:1582
 pocl#9  run () at .../llvm/lib/IR/LegacyPassManager.cpp:1694
 pocl#10 0xb6e64c82 in pocl_llvm_codegen (Device=Device@entry=0xdb0010, Modp=0x1361838, Output=Output@entry=0xbefde86c, OutputSize=OutputSize@entry=0xbefde880) at ./lib/CL/pocl_llvm_wg.cc:624
 pocl#11 0xb6e291de in llvm_codegen (output=output@entry=0xdeb898 "...BMDHA/Sdot_kernel/0-0-0/Sdot_kernel.so", device_i=device_i@entry=0, kernel=kernel@entry=0xbefe0240,
     device=0xdb0010, command=command@entry=0xbefe0278, specialize=specialize@entry=0) at ./lib/CL/devices/common.c:158
 pocl#12 0xb6e2ae44 in pocl_check_kernel_disk_cache (command=command@entry=0xbefe0278, specialized=specialized@entry=0) at ./lib/CL/devices/common.c:958
 pocl#13 0xb6e2b262 in pocl_check_kernel_dlhandle_cache (command=0xbefe0278, initial_refcount=0, specialize=0) at ./lib/CL/devices/common.c:1081
 pocl#14 0xb6e033d4 in program_compile_dynamic_wg_binaries (program=program@entry=0xd8ab88) at ./lib/CL/pocl_build.c:179
 pocl#15 0xb6e13f20 in get_binary_sizes (sizes=0xbefe0384, program=0xd8ab88) at ./lib/CL/clGetProgramInfo.c:36
 pocl#16 POclGetProgramInfo (program=0xd8ab88, param_name=4453, param_value_size=128, param_value=0xbefe0384, param_value_size_ret=0xbefe0380) at ./lib/CL/clGetProgramInfo.c:115
 pocl#17 0x00473070 in main () at 975931.c:238

pocl#889
https://bugs.debian.org/975931
anbe42 added a commit to anbe42/pocl that referenced this issue Dec 7, 2021
The segmentation fault can be observed with llvm-10, llvm-11 and llvm-12
and seems to be fixed in llvm-13. It happens on the architectures armhf
and armel (both 32-bit) always and on x86_64 sporadically.
The test segfaults only on the first run (i.e. the kernel is not yet in
pocl's kernel cache) while it passes on subsequent execution (with
something already in the kernel cache), emitting only some llvm
diagnostics:

inlinable function call in a function with debug info must have a !dbg location
  %11 = call i32 @_Z12get_local_idj(i32 0)
inlinable function call in a function with debug info must have a !dbg location
  %19 = call i32 @_Z12get_local_idj(i32 1)
inlinable function call in a function with debug info must have a !dbg location
  %27 = call i32 @_Z12get_local_idj(i32 2)

The backtrace of the segmentation fault as observed with llvm-10 and pocl 1.6:
 #0  getEmissionKind () at .../llvm/include/llvm/IR/DebugInfoMetadata.h:1244
 pocl#1  initialize () at .../llvm/lib/CodeGen/LexicalScopes.cpp:53
 pocl#2  0xb14102f0 in computeIntervals () at .../llvm/lib/CodeGen/LiveDebugVariables.cpp:979
 pocl#3  runOnMachineFunction () at .../llvm/lib/CodeGen/LiveDebugVariables.cpp:996
 pocl#4  runOnMachineFunction () at .../llvm/lib/CodeGen/LiveDebugVariables.cpp:1023
 pocl#5  0xb14856c8 in runOnFunction () at .../llvm/lib/CodeGen/MachineFunctionPass.cpp:73
 pocl#6  0xb12ff494 in runOnFunction () at .../llvm/lib/IR/LegacyPassManager.cpp:1481
 pocl#7  0xb12ff750 in runOnModule () at .../llvm/lib/IR/LegacyPassManager.cpp:1517
 pocl#8  0xb12ffba8 in runOnModule () at .../llvm/lib/IR/LegacyPassManager.cpp:1582
 pocl#9  run () at .../llvm/lib/IR/LegacyPassManager.cpp:1694
 pocl#10 0xb6e64c82 in pocl_llvm_codegen (Device=Device@entry=0xdb0010, Modp=0x1361838, Output=Output@entry=0xbefde86c, OutputSize=OutputSize@entry=0xbefde880) at ./lib/CL/pocl_llvm_wg.cc:624
 pocl#11 0xb6e291de in llvm_codegen (output=output@entry=0xdeb898 "...BMDHA/Sdot_kernel/0-0-0/Sdot_kernel.so", device_i=device_i@entry=0, kernel=kernel@entry=0xbefe0240,
     device=0xdb0010, command=command@entry=0xbefe0278, specialize=specialize@entry=0) at ./lib/CL/devices/common.c:158
 pocl#12 0xb6e2ae44 in pocl_check_kernel_disk_cache (command=command@entry=0xbefe0278, specialized=specialized@entry=0) at ./lib/CL/devices/common.c:958
 pocl#13 0xb6e2b262 in pocl_check_kernel_dlhandle_cache (command=0xbefe0278, initial_refcount=0, specialize=0) at ./lib/CL/devices/common.c:1081
 pocl#14 0xb6e033d4 in program_compile_dynamic_wg_binaries (program=program@entry=0xd8ab88) at ./lib/CL/pocl_build.c:179
 pocl#15 0xb6e13f20 in get_binary_sizes (sizes=0xbefe0384, program=0xd8ab88) at ./lib/CL/clGetProgramInfo.c:36
 pocl#16 POclGetProgramInfo (program=0xd8ab88, param_name=4453, param_value_size=128, param_value=0xbefe0384, param_value_size_ret=0xbefe0380) at ./lib/CL/clGetProgramInfo.c:115
 pocl#17 0x00473070 in main () at 975931.c:238

pocl#889
https://bugs.debian.org/975931
anbe42 added a commit to anbe42/pocl that referenced this issue Dec 16, 2021
The segmentation fault can be observed with llvm-10, llvm-11 and llvm-12
and seems to be fixed in llvm-13. It happens on the architectures armhf
and armel (both 32-bit) always and on x86_64 sporadically.
The test segfaults only on the first run (i.e. the kernel is not yet in
pocl's kernel cache) while it passes on subsequent execution (with
something already in the kernel cache), emitting only some llvm
diagnostics:

inlinable function call in a function with debug info must have a !dbg location
  %11 = call i32 @_Z12get_local_idj(i32 0)
inlinable function call in a function with debug info must have a !dbg location
  %19 = call i32 @_Z12get_local_idj(i32 1)
inlinable function call in a function with debug info must have a !dbg location
  %27 = call i32 @_Z12get_local_idj(i32 2)

The backtrace of the segmentation fault as observed with llvm-10 and pocl 1.6:
 #0  getEmissionKind () at .../llvm/include/llvm/IR/DebugInfoMetadata.h:1244
 pocl#1  initialize () at .../llvm/lib/CodeGen/LexicalScopes.cpp:53
 pocl#2  0xb14102f0 in computeIntervals () at .../llvm/lib/CodeGen/LiveDebugVariables.cpp:979
 pocl#3  runOnMachineFunction () at .../llvm/lib/CodeGen/LiveDebugVariables.cpp:996
 pocl#4  runOnMachineFunction () at .../llvm/lib/CodeGen/LiveDebugVariables.cpp:1023
 pocl#5  0xb14856c8 in runOnFunction () at .../llvm/lib/CodeGen/MachineFunctionPass.cpp:73
 pocl#6  0xb12ff494 in runOnFunction () at .../llvm/lib/IR/LegacyPassManager.cpp:1481
 pocl#7  0xb12ff750 in runOnModule () at .../llvm/lib/IR/LegacyPassManager.cpp:1517
 pocl#8  0xb12ffba8 in runOnModule () at .../llvm/lib/IR/LegacyPassManager.cpp:1582
 pocl#9  run () at .../llvm/lib/IR/LegacyPassManager.cpp:1694
 pocl#10 0xb6e64c82 in pocl_llvm_codegen (Device=Device@entry=0xdb0010, Modp=0x1361838, Output=Output@entry=0xbefde86c, OutputSize=OutputSize@entry=0xbefde880) at ./lib/CL/pocl_llvm_wg.cc:624
 pocl#11 0xb6e291de in llvm_codegen (output=output@entry=0xdeb898 "...BMDHA/Sdot_kernel/0-0-0/Sdot_kernel.so", device_i=device_i@entry=0, kernel=kernel@entry=0xbefe0240,
     device=0xdb0010, command=command@entry=0xbefe0278, specialize=specialize@entry=0) at ./lib/CL/devices/common.c:158
 pocl#12 0xb6e2ae44 in pocl_check_kernel_disk_cache (command=command@entry=0xbefe0278, specialized=specialized@entry=0) at ./lib/CL/devices/common.c:958
 pocl#13 0xb6e2b262 in pocl_check_kernel_dlhandle_cache (command=0xbefe0278, initial_refcount=0, specialize=0) at ./lib/CL/devices/common.c:1081
 pocl#14 0xb6e033d4 in program_compile_dynamic_wg_binaries (program=program@entry=0xd8ab88) at ./lib/CL/pocl_build.c:179
 pocl#15 0xb6e13f20 in get_binary_sizes (sizes=0xbefe0384, program=0xd8ab88) at ./lib/CL/clGetProgramInfo.c:36
 pocl#16 POclGetProgramInfo (program=0xd8ab88, param_name=4453, param_value_size=128, param_value=0xbefe0384, param_value_size_ret=0xbefe0380) at ./lib/CL/clGetProgramInfo.c:115
 pocl#17 0x00473070 in main () at 975931.c:238

pocl#889
https://bugs.debian.org/975931
anbe42 added a commit to anbe42/pocl that referenced this issue Dec 17, 2021
The segmentation fault can be observed with llvm-10, llvm-11 and llvm-12
and seems to be fixed in llvm-13. It happens on the architectures armhf
and armel (both 32-bit) always and on x86_64 sporadically.
The test segfaults only on the first run (i.e. the kernel is not yet in
pocl's kernel cache) while it passes on subsequent execution (with
something already in the kernel cache), emitting only some llvm
diagnostics:

inlinable function call in a function with debug info must have a !dbg location
  %11 = call i32 @_Z12get_local_idj(i32 0)
inlinable function call in a function with debug info must have a !dbg location
  %19 = call i32 @_Z12get_local_idj(i32 1)
inlinable function call in a function with debug info must have a !dbg location
  %27 = call i32 @_Z12get_local_idj(i32 2)

The backtrace of the segmentation fault as observed with llvm-10 and pocl 1.6:
 #0  getEmissionKind () at .../llvm/include/llvm/IR/DebugInfoMetadata.h:1244
 pocl#1  initialize () at .../llvm/lib/CodeGen/LexicalScopes.cpp:53
 pocl#2  0xb14102f0 in computeIntervals () at .../llvm/lib/CodeGen/LiveDebugVariables.cpp:979
 pocl#3  runOnMachineFunction () at .../llvm/lib/CodeGen/LiveDebugVariables.cpp:996
 pocl#4  runOnMachineFunction () at .../llvm/lib/CodeGen/LiveDebugVariables.cpp:1023
 pocl#5  0xb14856c8 in runOnFunction () at .../llvm/lib/CodeGen/MachineFunctionPass.cpp:73
 pocl#6  0xb12ff494 in runOnFunction () at .../llvm/lib/IR/LegacyPassManager.cpp:1481
 pocl#7  0xb12ff750 in runOnModule () at .../llvm/lib/IR/LegacyPassManager.cpp:1517
 pocl#8  0xb12ffba8 in runOnModule () at .../llvm/lib/IR/LegacyPassManager.cpp:1582
 pocl#9  run () at .../llvm/lib/IR/LegacyPassManager.cpp:1694
 pocl#10 0xb6e64c82 in pocl_llvm_codegen (Device=Device@entry=0xdb0010, Modp=0x1361838, Output=Output@entry=0xbefde86c, OutputSize=OutputSize@entry=0xbefde880) at ./lib/CL/pocl_llvm_wg.cc:624
 pocl#11 0xb6e291de in llvm_codegen (output=output@entry=0xdeb898 "...BMDHA/Sdot_kernel/0-0-0/Sdot_kernel.so", device_i=device_i@entry=0, kernel=kernel@entry=0xbefe0240,
     device=0xdb0010, command=command@entry=0xbefe0278, specialize=specialize@entry=0) at ./lib/CL/devices/common.c:158
 pocl#12 0xb6e2ae44 in pocl_check_kernel_disk_cache (command=command@entry=0xbefe0278, specialized=specialized@entry=0) at ./lib/CL/devices/common.c:958
 pocl#13 0xb6e2b262 in pocl_check_kernel_dlhandle_cache (command=0xbefe0278, initial_refcount=0, specialize=0) at ./lib/CL/devices/common.c:1081
 pocl#14 0xb6e033d4 in program_compile_dynamic_wg_binaries (program=program@entry=0xd8ab88) at ./lib/CL/pocl_build.c:179
 pocl#15 0xb6e13f20 in get_binary_sizes (sizes=0xbefe0384, program=0xd8ab88) at ./lib/CL/clGetProgramInfo.c:36
 pocl#16 POclGetProgramInfo (program=0xd8ab88, param_name=4453, param_value_size=128, param_value=0xbefe0384, param_value_size_ret=0xbefe0380) at ./lib/CL/clGetProgramInfo.c:115
 pocl#17 0x00473070 in main () at 975931.c:238

pocl#889
https://bugs.debian.org/975931
anbe42 added a commit to anbe42/pocl that referenced this issue Dec 17, 2021
The segmentation fault can be observed with llvm-10, llvm-11 and llvm-12
and seems to be fixed in llvm-13. It happens on the architectures armhf
and armel (both 32-bit) always and on x86_64 sporadically.
The test segfaults only on the first run (i.e. the kernel is not yet in
pocl's kernel cache) while it passes on subsequent execution (with
something already in the kernel cache), emitting only some llvm
diagnostics:

inlinable function call in a function with debug info must have a !dbg location
  %11 = call i32 @_Z12get_local_idj(i32 0)
inlinable function call in a function with debug info must have a !dbg location
  %19 = call i32 @_Z12get_local_idj(i32 1)
inlinable function call in a function with debug info must have a !dbg location
  %27 = call i32 @_Z12get_local_idj(i32 2)

The backtrace of the segmentation fault as observed with llvm-10 and pocl 1.6:
 #0  getEmissionKind () at .../llvm/include/llvm/IR/DebugInfoMetadata.h:1244
 pocl#1  initialize () at .../llvm/lib/CodeGen/LexicalScopes.cpp:53
 pocl#2  0xb14102f0 in computeIntervals () at .../llvm/lib/CodeGen/LiveDebugVariables.cpp:979
 pocl#3  runOnMachineFunction () at .../llvm/lib/CodeGen/LiveDebugVariables.cpp:996
 pocl#4  runOnMachineFunction () at .../llvm/lib/CodeGen/LiveDebugVariables.cpp:1023
 pocl#5  0xb14856c8 in runOnFunction () at .../llvm/lib/CodeGen/MachineFunctionPass.cpp:73
 pocl#6  0xb12ff494 in runOnFunction () at .../llvm/lib/IR/LegacyPassManager.cpp:1481
 pocl#7  0xb12ff750 in runOnModule () at .../llvm/lib/IR/LegacyPassManager.cpp:1517
 pocl#8  0xb12ffba8 in runOnModule () at .../llvm/lib/IR/LegacyPassManager.cpp:1582
 pocl#9  run () at .../llvm/lib/IR/LegacyPassManager.cpp:1694
 pocl#10 0xb6e64c82 in pocl_llvm_codegen (Device=Device@entry=0xdb0010, Modp=0x1361838, Output=Output@entry=0xbefde86c, OutputSize=OutputSize@entry=0xbefde880) at ./lib/CL/pocl_llvm_wg.cc:624
 pocl#11 0xb6e291de in llvm_codegen (output=output@entry=0xdeb898 "...BMDHA/Sdot_kernel/0-0-0/Sdot_kernel.so", device_i=device_i@entry=0, kernel=kernel@entry=0xbefe0240,
     device=0xdb0010, command=command@entry=0xbefe0278, specialize=specialize@entry=0) at ./lib/CL/devices/common.c:158
 pocl#12 0xb6e2ae44 in pocl_check_kernel_disk_cache (command=command@entry=0xbefe0278, specialized=specialized@entry=0) at ./lib/CL/devices/common.c:958
 pocl#13 0xb6e2b262 in pocl_check_kernel_dlhandle_cache (command=0xbefe0278, initial_refcount=0, specialize=0) at ./lib/CL/devices/common.c:1081
 pocl#14 0xb6e033d4 in program_compile_dynamic_wg_binaries (program=program@entry=0xd8ab88) at ./lib/CL/pocl_build.c:179
 pocl#15 0xb6e13f20 in get_binary_sizes (sizes=0xbefe0384, program=0xd8ab88) at ./lib/CL/clGetProgramInfo.c:36
 pocl#16 POclGetProgramInfo (program=0xd8ab88, param_name=4453, param_value_size=128, param_value=0xbefe0384, param_value_size_ret=0xbefe0380) at ./lib/CL/clGetProgramInfo.c:115
 pocl#17 0x00473070 in main () at 975931.c:238

pocl#889
https://bugs.debian.org/975931
anbe42 added a commit to anbe42/pocl that referenced this issue Jan 6, 2022
The segmentation fault can be observed with llvm-10, llvm-11 and llvm-12
and seems to be fixed in llvm-13. It happens on the architectures armhf
and armel (both 32-bit) always and on x86_64 sporadically.
The test segfaults only on the first run (i.e. the kernel is not yet in
pocl's kernel cache) while it passes on subsequent execution (with
something already in the kernel cache), emitting only some llvm
diagnostics:

inlinable function call in a function with debug info must have a !dbg location
  %11 = call i32 @_Z12get_local_idj(i32 0)
inlinable function call in a function with debug info must have a !dbg location
  %19 = call i32 @_Z12get_local_idj(i32 1)
inlinable function call in a function with debug info must have a !dbg location
  %27 = call i32 @_Z12get_local_idj(i32 2)

The backtrace of the segmentation fault as observed with llvm-10 and pocl 1.6:
 #0  getEmissionKind () at .../llvm/include/llvm/IR/DebugInfoMetadata.h:1244
 pocl#1  initialize () at .../llvm/lib/CodeGen/LexicalScopes.cpp:53
 pocl#2  0xb14102f0 in computeIntervals () at .../llvm/lib/CodeGen/LiveDebugVariables.cpp:979
 pocl#3  runOnMachineFunction () at .../llvm/lib/CodeGen/LiveDebugVariables.cpp:996
 pocl#4  runOnMachineFunction () at .../llvm/lib/CodeGen/LiveDebugVariables.cpp:1023
 pocl#5  0xb14856c8 in runOnFunction () at .../llvm/lib/CodeGen/MachineFunctionPass.cpp:73
 pocl#6  0xb12ff494 in runOnFunction () at .../llvm/lib/IR/LegacyPassManager.cpp:1481
 pocl#7  0xb12ff750 in runOnModule () at .../llvm/lib/IR/LegacyPassManager.cpp:1517
 pocl#8  0xb12ffba8 in runOnModule () at .../llvm/lib/IR/LegacyPassManager.cpp:1582
 pocl#9  run () at .../llvm/lib/IR/LegacyPassManager.cpp:1694
 pocl#10 0xb6e64c82 in pocl_llvm_codegen (Device=Device@entry=0xdb0010, Modp=0x1361838, Output=Output@entry=0xbefde86c, OutputSize=OutputSize@entry=0xbefde880) at ./lib/CL/pocl_llvm_wg.cc:624
 pocl#11 0xb6e291de in llvm_codegen (output=output@entry=0xdeb898 "...BMDHA/Sdot_kernel/0-0-0/Sdot_kernel.so", device_i=device_i@entry=0, kernel=kernel@entry=0xbefe0240,
     device=0xdb0010, command=command@entry=0xbefe0278, specialize=specialize@entry=0) at ./lib/CL/devices/common.c:158
 pocl#12 0xb6e2ae44 in pocl_check_kernel_disk_cache (command=command@entry=0xbefe0278, specialized=specialized@entry=0) at ./lib/CL/devices/common.c:958
 pocl#13 0xb6e2b262 in pocl_check_kernel_dlhandle_cache (command=0xbefe0278, initial_refcount=0, specialize=0) at ./lib/CL/devices/common.c:1081
 pocl#14 0xb6e033d4 in program_compile_dynamic_wg_binaries (program=program@entry=0xd8ab88) at ./lib/CL/pocl_build.c:179
 pocl#15 0xb6e13f20 in get_binary_sizes (sizes=0xbefe0384, program=0xd8ab88) at ./lib/CL/clGetProgramInfo.c:36
 pocl#16 POclGetProgramInfo (program=0xd8ab88, param_name=4453, param_value_size=128, param_value=0xbefe0384, param_value_size_ret=0xbefe0380) at ./lib/CL/clGetProgramInfo.c:115
 pocl#17 0x00473070 in main () at 975931.c:238

pocl#889
https://bugs.debian.org/975931
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants