question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

libnvvm segfault compiling this kernel

See original GitHub issue

Reporting a bug

From gitter https://gitter.im/numba/numba?at=5ebef15eeb9b6f316225be0e

Reproducer:

from numba import cuda
import numba

# Compiling this will segfault inside libnvvm
@cuda.jit(argtypes=[numba.float64[:]])
def kernel(arr):
    arr[cuda.threadIdx.x] = cuda.threadIdx.x / 100.0 + 2
    a_local = 0
    if round(arr[cuda.threadIdx.x], 2) > 0.09:
        a_local += 1
        arr[cuda.threadIdx.x] = a_local

lldb shows:

Process 50672 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
    frame #0: 0x000000011809b3ef libnvvm.3.2.0.dylib`llvm::NVPTXTargetLowering::getArgumentAlignment(llvm::SDValue, llvm::ImmutableCallSite const*, llvm::Type*, unsigned int) const + 31
libnvvm.3.2.0.dylib`llvm::NVPTXTargetLowering::getArgumentAlignment:
->  0x11809b3ef <+31>: movq   (%rcx), %rax
    0x11809b3f2 <+34>: movq   %rax, %r13
    0x11809b3f5 <+37>: andq   $-0x4, %r13
    0x11809b3f9 <+41>: leaq   -0x18(%r13), %rcx

Happened on windows with cudatoolkit 10.2 and MBP with cudatoolkit 9.0.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
stuartarchibaldcommented, May 18, 2020
0reactions
gmarkallcommented, May 15, 2020

Will look into this next week.

Read more comments on GitHub >

github_iconTop Results From Across the Web

LLVM/NVVM kernel crashes LibNVVM
Hi everyone, I have no luck compiling the following NVVM IR kernel with libNVVM (Version 1.0, as available for download in devzone).
Read more >
Why do I get a segmentation fault when calling a CUDA kernel ...
Your code compiles and runs correctly for me using ordinary nvcc commands (not CMake) if I add the -cudart shared switch to each...
Read more >
[SOLVED]Compiling kernel fails with segfault
Hi guys,. I'm out of answers. The situation : Compiling kernel randomly stops with : "segmentation fault" and never runs through.
Read more >
Segmentation Fault when trying to compile kernel 4.16.3-300 ...
Description of problem: when trying to compile the kernel I have a segmentation fault, and a request to submit a bug :) Version-Release ......
Read more >
Segmentation fault when compiling kernel/modules
Hi All, I am trying to cross-compile kernel/modules of gingerbread for arm on 64-bit Ubuntu (11.04). I am getting segmentation fault.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found