Skip to content

SIGSEGV while building add example #52

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

Open
zetanumbers opened this issue Mar 10, 2022 · 6 comments
Open

SIGSEGV while building add example #52

zetanumbers opened this issue Mar 10, 2022 · 6 comments
Labels
bug Something isn't working C-rustc_codegen_nvvm Category: the NVVM Rustc codegen

Comments

@zetanumbers
Copy link

  • Git commit: 8a32ee7
  • $LLVM_CONFIG --version: 7.1.0
`cargo -vV`
cargo 1.58.0-nightly (294967c53 2021-11-29)
release: 1.58.0
commit-hash: 294967c53f0c70d598fc54ca189313c86c576ea7
commit-date: 2021-11-29
host: x86_64-unknown-linux-gnu
libgit2: 1.3.0 (sys:0.13.23 vendored)
libcurl: 7.80.0-DEV (sys:0.4.51+curl-7.80.0 vendored ssl:OpenSSL/1.1.1l)
os: Pop!_OS 21.10 (impish) [64-bit]
`cargo run -p add`
/home/zeta/repos/Rust-CUDA〉cargo clean
/home/zeta/repos/Rust-CUDA〉cargo run -p add
   Compiling libc v0.2.119
   Compiling autocfg v1.1.0
   Compiling pkg-config v0.3.24
   Compiling proc-macro2 v1.0.36
   Compiling unicode-xid v0.2.2
   Compiling syn v1.0.86
   Compiling glob v0.3.0
   Compiling cfg-if v1.0.0
   Compiling lazy_static v1.4.0
   Compiling libm v0.2.2
   Compiling regex-syntax v0.6.25
   Compiling semver-parser v0.7.0
   Compiling semver v1.0.6
   Compiling curl v0.4.42
   Compiling log v0.4.14
   Compiling openssl-probe v0.1.5
   Compiling serde_derive v1.0.136
   Compiling serde v1.0.136
   Compiling once_cell v1.10.0
   Compiling pin-project-lite v0.2.8
   Compiling serde_json v1.0.79
   Compiling smallvec v1.8.0
   Compiling bitflags v1.3.2
   Compiling ansi_term v0.12.1
   Compiling itoa v1.0.1
   Compiling rustc-demangle v0.1.21
   Compiling ryu v1.0.9
   Compiling static_assertions v1.1.0
   Compiling mint v0.5.9
   Compiling bytemuck v1.8.0
   Compiling nanorand v0.6.1
   Compiling num-traits v0.2.14
   Compiling num-integer v0.1.44
   Compiling find_cuda_helper v0.2.0 (/home/zeta/repos/Rust-CUDA/crates/find_cuda_helper)
   Compiling tracing-core v0.1.23
   Compiling sharded-slab v0.1.4
   Compiling semver v0.6.0
   Compiling thread_local v1.1.4
   Compiling regex-automata v0.1.10
   Compiling regex v1.5.5
   Compiling nvvm v0.1.1 (/home/zeta/repos/Rust-CUDA/crates/nvvm)
   Compiling cust_raw v0.11.3 (/home/zeta/repos/Rust-CUDA/crates/cust_raw)
   Compiling cust v0.3.2 (/home/zeta/repos/Rust-CUDA/crates/cust)
   Compiling build-helper v0.1.1
   Compiling quote v1.0.15
   Compiling jobserver v0.1.24
   Compiling filetime v0.2.15
   Compiling socket2 v0.4.4
   Compiling xattr v0.2.2
   Compiling matchers v0.1.0
   Compiling tracing-log v0.1.2
   Compiling rustc_version v0.4.0
   Compiling cc v1.0.73
   Compiling tar v0.4.38
   Compiling vek v0.15.6
   Compiling approx v0.4.0
   Compiling glam v0.20.2
   Compiling openssl-sys v0.9.72
   Compiling libz-sys v1.1.5
   Compiling lzma-sys v0.1.17
   Compiling curl-sys v0.4.52+curl-7.81.0
   Compiling xz2 v0.1.6
   Compiling xz v0.1.0
   Compiling tracing-attributes v0.1.20
   Compiling rustc_codegen_nvvm_macros v0.1.0 (/home/zeta/repos/Rust-CUDA/crates/rustc_codegen_nvvm_macros)
   Compiling cust_derive v0.2.0 (/home/zeta/repos/Rust-CUDA/crates/cust_derive)
   Compiling cust_core v0.1.1 (/home/zeta/repos/Rust-CUDA/crates/cust_core)
   Compiling tracing v0.1.32
   Compiling tracing-subscriber v0.3.9
   Compiling rustc_codegen_nvvm v0.3.0 (/home/zeta/repos/Rust-CUDA/crates/rustc_codegen_nvvm)
warning: In file included from /home/zeta/llvm-7.1.0/include/llvm/CodeGen/TargetSubtargetInfo.h:22,
warning:                  from rustc_llvm_wrapper/PassWrapper.cpp:29:
warning: /home/zeta/llvm-7.1.0/include/llvm/CodeGen/SchedulerRegistry.h: In constructor ‘llvm::RegisterScheduler::RegisterScheduler(const char*, const char*, llvm::RegisterScheduler::FunctionPassCtor)’:
warning: /home/zeta/llvm-7.1.0/include/llvm/CodeGen/SchedulerRegistry.h:40:35: warning: cast between incompatible function types from ‘llvm::RegisterScheduler::FunctionPassCtor’ {aka ‘llvm::ScheduleDAGSDNodes* (*)(llvm::SelectionDAGISel*, llvm::CodeGenOpt::Level)’} to ‘llvm::MachinePassCtor’ {aka ‘void* (*)()’} [-Wcast-function-type]
warning:    40 |   : MachinePassRegistryNode(N, D, (MachinePassCtor)C)
warning:       |                                   ^~~~~~~~~~~~~~~~~~
warning: In file included from rustc_llvm_wrapper/rustllvm.h:15,
warning:                  from rustc_llvm_wrapper/RustWrapper.cpp:11:
warning: /home/zeta/llvm-7.1.0/include/llvm/ADT/ArrayRef.h: In instantiation of ‘llvm::ArrayRef<T>::ArrayRef(const std::initializer_list<_Tp>&) [with T = long unsigned int]’:
warning: /home/zeta/llvm-7.1.0/include/llvm/IR/DIBuilder.h:640:31:   required from here
warning: /home/zeta/llvm-7.1.0/include/llvm/ADT/ArrayRef.h:102:37: warning: initializing ‘llvm::ArrayRef<long unsigned int>::Data’ from ‘std::initializer_list<long unsigned int>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
warning:   102 |     : Data(Vec.begin() == Vec.end() ? (T*)nullptr : Vec.begin()),
warning:       |            ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: In file included from /home/zeta/llvm-7.1.0/include/llvm/ADT/STLExtras.h:21,
warning:                  from /home/zeta/llvm-7.1.0/include/llvm/ADT/StringRef.h:13,
warning:                  from /home/zeta/llvm-7.1.0/include/llvm/ADT/StringMap.h:17,
warning:                  from /home/zeta/llvm-7.1.0/include/llvm/Support/Host.h:17,
warning:                  from /home/zeta/llvm-7.1.0/include/llvm/ADT/Hashing.h:49,
warning:                  from /home/zeta/llvm-7.1.0/include/llvm/ADT/ArrayRef.h:13,
warning:                  from rustc_llvm_wrapper/rustllvm.h:15,
warning:                  from rustc_llvm_wrapper/RustWrapper.cpp:11:
warning: /home/zeta/llvm-7.1.0/include/llvm/ADT/SmallVector.h: In instantiation of ‘void llvm::SmallVectorTemplateBase<T, true>::push_back(const T&) [with T = std::pair<void*, long unsigned int>]’:
warning: /home/zeta/llvm-7.1.0/include/llvm/Support/Allocator.h:249:33:   required from ‘void* llvm::BumpPtrAllocatorImpl<AllocatorT, SlabSize, SizeThreshold>::Allocate(size_t, size_t) [with AllocatorT = llvm::MallocAllocator; long unsigned int SlabSize = 4096; long unsigned int SizeThreshold = 4096; size_t = long unsigned int]’
warning: /home/zeta/llvm-7.1.0/include/llvm/Support/YAMLParser.h:138:26:   required from here
warning: /home/zeta/llvm-7.1.0/include/llvm/ADT/SmallVector.h:313:11: warning: ‘void* memcpy(void*, const void*, size_t)’ writing to an object of type ‘struct std::pair<void*, long unsigned int>’ with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Wclass-memaccess]
warning:   313 |     memcpy(this->end(), &Elt, sizeof(T));
warning:       |     ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: In file included from /usr/include/c++/11/utility:70,
warning:                  from /home/zeta/llvm-7.1.0/include/llvm/Support/type_traits.h:19,
warning:                  from /home/zeta/llvm-7.1.0/include/llvm/ADT/Optional.h:22,
warning:                  from /home/zeta/llvm-7.1.0/include/llvm/ADT/STLExtras.h:20,
warning:                  from /home/zeta/llvm-7.1.0/include/llvm/ADT/StringRef.h:13,
warning:                  from /home/zeta/llvm-7.1.0/include/llvm/ADT/StringMap.h:17,
warning:                  from /home/zeta/llvm-7.1.0/include/llvm/Support/Host.h:17,
warning:                  from /home/zeta/llvm-7.1.0/include/llvm/ADT/Hashing.h:49,
warning:                  from /home/zeta/llvm-7.1.0/include/llvm/ADT/ArrayRef.h:13,
warning:                  from rustc_llvm_wrapper/rustllvm.h:15,
warning:                  from rustc_llvm_wrapper/RustWrapper.cpp:11:
warning: /usr/include/c++/11/bits/stl_pair.h:211:12: note: ‘struct std::pair<void*, long unsigned int>’ declared here
warning:   211 |     struct pair
warning:       |            ^~~~
warning: In file included from rustc_llvm_wrapper/rustllvm.h:15,
warning:                  from rustc_llvm_wrapper/PassWrapper.cpp:16:
warning: /home/zeta/llvm-7.1.0/include/llvm/ADT/ArrayRef.h: In instantiation of ‘llvm::ArrayRef<T>::ArrayRef(const std::initializer_list<_Tp>&) [with T = long unsigned int]’:
warning: /home/zeta/llvm-7.1.0/include/llvm/IR/DIBuilder.h:640:31:   required from here
warning: /home/zeta/llvm-7.1.0/include/llvm/ADT/ArrayRef.h:102:37: warning: initializing ‘llvm::ArrayRef<long unsigned int>::Data’ from ‘std::initializer_list<long unsigned int>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
warning:   102 |     : Data(Vec.begin() == Vec.end() ? (T*)nullptr : Vec.begin()),
warning:       |            ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: In file included from /home/zeta/llvm-7.1.0/include/llvm/ADT/STLExtras.h:21,
warning:                  from /home/zeta/llvm-7.1.0/include/llvm/ADT/StringRef.h:13,
warning:                  from /home/zeta/llvm-7.1.0/include/llvm/ADT/StringMap.h:17,
warning:                  from /home/zeta/llvm-7.1.0/include/llvm/Support/Host.h:17,
warning:                  from /home/zeta/llvm-7.1.0/include/llvm/ADT/Hashing.h:49,
warning:                  from /home/zeta/llvm-7.1.0/include/llvm/ADT/ArrayRef.h:13,
warning:                  from rustc_llvm_wrapper/rustllvm.h:15,
warning:                  from rustc_llvm_wrapper/PassWrapper.cpp:16:
warning: /home/zeta/llvm-7.1.0/include/llvm/ADT/SmallVector.h: In instantiation of ‘void llvm::SmallVectorTemplateBase<T, true>::push_back(const T&) [with T = std::pair<void*, long unsigned int>]’:
warning: /home/zeta/llvm-7.1.0/include/llvm/Support/Allocator.h:249:33:   required from ‘void* llvm::BumpPtrAllocatorImpl<AllocatorT, SlabSize, SizeThreshold>::Allocate(size_t, size_t) [with AllocatorT = llvm::MallocAllocator; long unsigned int SlabSize = 4096; long unsigned int SizeThreshold = 4096; size_t = long unsigned int]’
warning: /home/zeta/llvm-7.1.0/include/llvm/Support/YAMLParser.h:138:26:   required from here
warning: /home/zeta/llvm-7.1.0/include/llvm/ADT/SmallVector.h:313:11: warning: ‘void* memcpy(void*, const void*, size_t)’ writing to an object of type ‘struct std::pair<void*, long unsigned int>’ with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Wclass-memaccess]
warning:   313 |     memcpy(this->end(), &Elt, sizeof(T));
warning:       |     ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: In file included from /usr/include/c++/11/bits/stl_algobase.h:64,
warning:                  from /usr/include/c++/11/vector:60,
warning:                  from rustc_llvm_wrapper/PassWrapper.cpp:13:
warning: /usr/include/c++/11/bits/stl_pair.h:211:12: note: ‘struct std::pair<void*, long unsigned int>’ declared here
warning:   211 |     struct pair
warning:       |            ^~~~
warning: In file included from /home/zeta/llvm-7.1.0/include/llvm/ADT/DenseSet.h:17,
warning:                  from rustc_llvm_wrapper/rustllvm.h:16,
warning:                  from rustc_llvm_wrapper/PassWrapper.cpp:16:
warning: /home/zeta/llvm-7.1.0/include/llvm/ADT/DenseMap.h: In instantiation of ‘void llvm::DenseMapBase<DerivedT, KeyT, ValueT, KeyInfoT, BucketT>::copyFrom(const llvm::DenseMapBase<OtherBaseT, KeyT, ValueT, KeyInfoT, BucketT>&) [with OtherBaseT = llvm::DenseMap<long unsigned int, llvm::GlobalValueSummary*>; DerivedT = llvm::DenseMap<long unsigned int, llvm::GlobalValueSummary*>; KeyT = long unsigned int; ValueT = llvm::GlobalValueSummary*; KeyInfoT = llvm::DenseMapInfo<long unsigned int>; BucketT = llvm::detail::DenseMapPair<long unsigned int, llvm::GlobalValueSummary*>]’:
warning: /home/zeta/llvm-7.1.0/include/llvm/ADT/DenseMap.h:711:28:   required from ‘void llvm::DenseMap<KeyT, ValueT, KeyInfoT, BucketT>::copyFrom(const llvm::DenseMap<KeyT, ValueT, KeyInfoT, BucketT>&) [with KeyT = long unsigned int; ValueT = llvm::GlobalValueSummary*; KeyInfoT = llvm::DenseMapInfo<long unsigned int>; BucketT = llvm::detail::DenseMapPair<long unsigned int, llvm::GlobalValueSummary*>]’
warning: /home/zeta/llvm-7.1.0/include/llvm/ADT/DenseMap.h:665:5:   required from ‘llvm::DenseMap<KeyT, ValueT, KeyInfoT, BucketT>::DenseMap(const llvm::DenseMap<KeyT, ValueT, KeyInfoT, BucketT>&) [with KeyT = long unsigned int; ValueT = llvm::GlobalValueSummary*; KeyInfoT = llvm::DenseMapInfo<long unsigned int>; BucketT = llvm::detail::DenseMapPair<long unsigned int, llvm::GlobalValueSummary*>]’
warning: /home/zeta/llvm-7.1.0/include/llvm/ADT/StringMap.h:350:18:   required from ‘ValueTy llvm::StringMap<ValueTy, AllocatorTy>::lookup(llvm::StringRef) const [with ValueTy = llvm::DenseMap<long unsigned int, llvm::GlobalValueSummary*>; AllocatorTy = llvm::MallocAllocator]’
warning: rustc_llvm_wrapper/PassWrapper.cpp:1200:71:   required from here
warning: /home/zeta/llvm-7.1.0/include/llvm/ADT/DenseMap.h:396:13: warning: ‘void* memcpy(void*, const void*, size_t)’ writing to an object of type ‘struct llvm::detail::DenseMapPair<long unsigned int, llvm::GlobalValueSummary*>’ with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Wclass-memaccess]
warning:   396 |       memcpy(getBuckets(), other.getBuckets(),
warning:       |       ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning:   397 |              getNumBuckets() * sizeof(BucketT));
warning:       |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: /home/zeta/llvm-7.1.0/include/llvm/ADT/DenseMap.h:40:8: note: ‘struct llvm::detail::DenseMapPair<long unsigned int, llvm::GlobalValueSummary*>’ declared here
warning:    40 | struct DenseMapPair : public std::pair<KeyT, ValueT> {
warning:       |        ^~~~~~~~~~~~
   Compiling cuda_builder v0.3.0 (/home/zeta/repos/Rust-CUDA/crates/cuda_builder)
   Compiling add v0.1.0 (/home/zeta/repos/Rust-CUDA/examples/cuda/cpu/add)
error: failed to run custom build command for `add v0.1.0 (/home/zeta/repos/Rust-CUDA/examples/cuda/cpu/add)`

Caused by:
  process didn't exit successfully: `/home/zeta/repos/Rust-CUDA/target/debug/build/add-34c097f5387f9249/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-changed=../../gpu/add_gpu

  --- stderr
     Compiling compiler_builtins v0.1.55
     Compiling core v0.0.0 (/home/zeta/.rustup/toolchains/nightly-2021-12-04-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core)
     Compiling autocfg v1.1.0
     Compiling semver v1.0.6
     Compiling libm v0.2.2
     Compiling proc-macro2 v1.0.36
     Compiling unicode-xid v0.2.2
     Compiling syn v1.0.86
     Compiling paste v1.0.6
     Compiling num-traits v0.2.14
     Compiling num-integer v0.1.44
     Compiling rustc_version v0.4.0
     Compiling quote v1.0.15
     Compiling vek v0.15.6
     Compiling cuda_std_macros v0.2.0 (/home/zeta/repos/Rust-CUDA/crates/cuda_std_macros)
     Compiling rustc-std-workspace-core v1.99.0 (/home/zeta/.rustup/toolchains/nightly-2021-12-04-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/rustc-std-workspace-core)
  /home/zeta/.rustup/toolchains/nightly-2021-12-04-x86_64-unknown-linux-gnu/bin/../lib/librustc_driver-713ba8e674184066.so(+0x4d4be3)[0x7fde8decebe3]
  /lib/x86_64-linux-gnu/libc.so.6(+0x42520)[0x7fde8d474520]
  /lib/x86_64-linux-gnu/libstdc++.so.6(_ZNSsC2ERKSs+0x1d)[0x7fde84e962bd]
  /home/zeta/repos/Rust-CUDA/target/debug/deps/librustc_codegen_nvvm.so(+0x1a24901)[0x7fde869df901]
  /home/zeta/repos/Rust-CUDA/target/debug/deps/librustc_codegen_nvvm.so(+0x1a1f542)[0x7fde869da542]
  /home/zeta/repos/Rust-CUDA/target/debug/deps/librustc_codegen_nvvm.so(+0x999054)[0x7fde85954054]
  /home/zeta/repos/Rust-CUDA/target/debug/deps/librustc_codegen_nvvm.so(+0x9186e9)[0x7fde858d36e9]
  /home/zeta/repos/Rust-CUDA/target/debug/deps/librustc_codegen_nvvm.so(+0x91a41d)[0x7fde858d541d]
  /home/zeta/repos/Rust-CUDA/target/debug/deps/librustc_codegen_nvvm.so(+0x92f4b8)[0x7fde858ea4b8]
  /home/zeta/repos/Rust-CUDA/target/debug/deps/librustc_codegen_nvvm.so(+0x95838d)[0x7fde8591338d]
  /home/zeta/repos/Rust-CUDA/target/debug/deps/librustc_codegen_nvvm.so(+0x908041)[0x7fde858c3041]
  /home/zeta/.rustup/toolchains/nightly-2021-12-04-x86_64-unknown-linux-gnu/bin/../lib/libstd-13e2ae73269b4206.so(rust_metadata_std_f24903a91e569aa2+0xa99b3)[0x7fde8d7349b3]
  /lib/x86_64-linux-gnu/libc.so.6(+0x94947)[0x7fde8d4c6947]
  /lib/x86_64-linux-gnu/libc.so.6(clone+0x44)[0x7fde8d556a44]
  /home/zeta/.rustup/toolchains/nightly-2021-12-04-x86_64-unknown-linux-gnu/bin/../lib/librustc_driver-713ba8e674184066.so(+0x4d4be3)[0x7f4617b8bbe3]
  /lib/x86_64-linux-gnu/libc.so.6(+0x42520)[0x7f4617131520]
  /lib/x86_64-linux-gnu/libc.so.6(+0x197f00)[0x7f4617286f00]
  /home/zeta/repos/Rust-CUDA/target/debug/deps/librustc_codegen_nvvm.so(+0x1a1055f)[0x7f46107cb55f]
  /home/zeta/repos/Rust-CUDA/target/debug/deps/librustc_codegen_nvvm.so(+0x1a1f59a)[0x7f46107da59a]
  /home/zeta/repos/Rust-CUDA/target/debug/deps/librustc_codegen_nvvm.so(+0x999054)[0x7f460f754054]
  /home/zeta/repos/Rust-CUDA/target/debug/deps/librustc_codegen_nvvm.so(+0x9186e9)[0x7f460f6d36e9]
  /home/zeta/repos/Rust-CUDA/target/debug/deps/librustc_codegen_nvvm.so(+0x91a41d)[0x7f460f6d541d]
  /home/zeta/repos/Rust-CUDA/target/debug/deps/librustc_codegen_nvvm.so(+0x92f4b8)[0x7f460f6ea4b8]
  /home/zeta/repos/Rust-CUDA/target/debug/deps/librustc_codegen_nvvm.so(+0x95838d)[0x7f460f71338d]
  /home/zeta/repos/Rust-CUDA/target/debug/deps/librustc_codegen_nvvm.so(+0x908041)[0x7f460f6c3041]
  /home/zeta/.rustup/toolchains/nightly-2021-12-04-x86_64-unknown-linux-gnu/bin/../lib/libstd-13e2ae73269b4206.so(rust_metadata_std_f24903a91e569aa2+0xa99b3)[0x7f46173f19b3]
  /lib/x86_64-linux-gnu/libc.so.6(+0x94947)[0x7f4617183947]
  /lib/x86_64-linux-gnu/libc.so.6(clone+0x44)[0x7f4617213a44]
  error: could not compile `rustc-std-workspace-core`

  Caused by:
    process didn't exit successfully: `rustc --crate-name rustc_std_workspace_core --edition=2018 /home/zeta/.rustup/toolchains/nightly-2021-12-04-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/rustc-std-workspace-core/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C debuginfo=1 -C overflow-checks=on -C metadata=f0bb55e3c25ff57e -C extra-filename=-f0bb55e3c25ff57e --out-dir /home/zeta/repos/Rust-CUDA/target/cuda-builder/nvptx64-nvidia-cuda/release/deps --target nvptx64-nvidia-cuda -Z force-unstable-if-unmarked -L dependency=/home/zeta/repos/Rust-CUDA/target/cuda-builder/nvptx64-nvidia-cuda/release/deps -L dependency=/home/zeta/repos/Rust-CUDA/target/cuda-builder/release/deps --extern core=/home/zeta/repos/Rust-CUDA/target/cuda-builder/nvptx64-nvidia-cuda/release/deps/libcore-f8fbafb5a7b3b2c0.rmeta --cap-lints allow -Zcodegen-backend=/home/zeta/repos/Rust-CUDA/target/debug/deps/librustc_codegen_nvvm.so '-Cllvm-args=-arch=compute_61 --override-libm'` (signal: 11, SIGSEGV: invalid memory reference)
  warning: build failed, waiting for other jobs to finish...
  /home/zeta/.rustup/toolchains/nightly-2021-12-04-x86_64-unknown-linux-gnu/bin/../lib/librustc_driver-713ba8e674184066.so(+0x4d4be3)[0x7f2a1a248be3]
  /lib/x86_64-linux-gnu/libc.so.6(+0x42520)[0x7f2a197ee520]
  /lib/x86_64-linux-gnu/libc.so.6(+0x197f00)[0x7f2a19943f00]
  /home/zeta/repos/Rust-CUDA/target/debug/deps/librustc_codegen_nvvm.so(+0x1a1055f)[0x7f2a12dcb55f]
  /home/zeta/repos/Rust-CUDA/target/debug/deps/librustc_codegen_nvvm.so(+0x1a1f59a)[0x7f2a12dda59a]
  /home/zeta/repos/Rust-CUDA/target/debug/deps/librustc_codegen_nvvm.so(+0x999054)[0x7f2a11d54054]
  /home/zeta/repos/Rust-CUDA/target/debug/deps/librustc_codegen_nvvm.so(+0x9186e9)[0x7f2a11cd36e9]
  /home/zeta/repos/Rust-CUDA/target/debug/deps/librustc_codegen_nvvm.so(+0x91a41d)[0x7f2a11cd541d]
  /home/zeta/repos/Rust-CUDA/target/debug/deps/librustc_codegen_nvvm.so(+0x92f4b8)[0x7f2a11cea4b8]
  /home/zeta/repos/Rust-CUDA/target/debug/deps/librustc_codegen_nvvm.so(+0x95838d)[0x7f2a11d1338d]
  /home/zeta/repos/Rust-CUDA/target/debug/deps/librustc_codegen_nvvm.so(+0x908041)[0x7f2a11cc3041]
  /home/zeta/.rustup/toolchains/nightly-2021-12-04-x86_64-unknown-linux-gnu/bin/../lib/libstd-13e2ae73269b4206.so(rust_metadata_std_f24903a91e569aa2+0xa99b3)[0x7f2a19aae9b3]
  /lib/x86_64-linux-gnu/libc.so.6(+0x94947)[0x7f2a19840947]
  /lib/x86_64-linux-gnu/libc.so.6(clone+0x44)[0x7f2a198d0a44]
  error: build failed
  thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: BuildFailed', examples/cuda/cpu/add/build.rs:7:10
  stack backtrace:
     0:     0x55bd76b7663c - std::backtrace_rs::backtrace::libunwind::trace::hf7449935ead7573e
                                 at /rustc/532d2b14c05f9bc20b2d27cbb5f4550d28343a36/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
     1:     0x55bd76b7663c - std::backtrace_rs::backtrace::trace_unsynchronized::h221aa2d88d72372a
                                 at /rustc/532d2b14c05f9bc20b2d27cbb5f4550d28343a36/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
     2:     0x55bd76b7663c - std::sys_common::backtrace::_print_fmt::h1c77e8983e1df895
                                 at /rustc/532d2b14c05f9bc20b2d27cbb5f4550d28343a36/library/std/src/sys_common/backtrace.rs:67:5
     3:     0x55bd76b7663c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hd4ec41a9a6b0d22c
                                 at /rustc/532d2b14c05f9bc20b2d27cbb5f4550d28343a36/library/std/src/sys_common/backtrace.rs:46:22
     4:     0x55bd76b9982c - core::fmt::write::h72801a82c94e6ff1
                                 at /rustc/532d2b14c05f9bc20b2d27cbb5f4550d28343a36/library/core/src/fmt/mod.rs:1149:17
     5:     0x55bd76b72825 - std::io::Write::write_fmt::haf74340a8cbeaa88
                                 at /rustc/532d2b14c05f9bc20b2d27cbb5f4550d28343a36/library/std/src/io/mod.rs:1697:15
     6:     0x55bd76b77d80 - std::sys_common::backtrace::_print::h2d15cd157796a64a
                                 at /rustc/532d2b14c05f9bc20b2d27cbb5f4550d28343a36/library/std/src/sys_common/backtrace.rs:49:5
     7:     0x55bd76b77d80 - std::sys_common::backtrace::print::h52d286d22e2398eb
                                 at /rustc/532d2b14c05f9bc20b2d27cbb5f4550d28343a36/library/std/src/sys_common/backtrace.rs:36:9
     8:     0x55bd76b77d80 - std::panicking::default_hook::{{closure}}::h6da08fba6306daf2
                                 at /rustc/532d2b14c05f9bc20b2d27cbb5f4550d28343a36/library/std/src/panicking.rs:211:50
     9:     0x55bd76b7792b - std::panicking::default_hook::h266f67a22e76b11a
                                 at /rustc/532d2b14c05f9bc20b2d27cbb5f4550d28343a36/library/std/src/panicking.rs:228:9
    10:     0x55bd76b78564 - std::panicking::rust_panic_with_hook::he55698a957f4fb6d
                                 at /rustc/532d2b14c05f9bc20b2d27cbb5f4550d28343a36/library/std/src/panicking.rs:606:17
    11:     0x55bd76b78010 - std::panicking::begin_panic_handler::{{closure}}::h01f453c3ac181895
                                 at /rustc/532d2b14c05f9bc20b2d27cbb5f4550d28343a36/library/std/src/panicking.rs:502:13
    12:     0x55bd76b76ae4 - std::sys_common::backtrace::__rust_end_short_backtrace::h675d77c6e5a3926d
                                 at /rustc/532d2b14c05f9bc20b2d27cbb5f4550d28343a36/library/std/src/sys_common/backtrace.rs:139:18
    13:     0x55bd76b77f79 - rust_begin_unwind
                                 at /rustc/532d2b14c05f9bc20b2d27cbb5f4550d28343a36/library/std/src/panicking.rs:498:5
    14:     0x55bd76b982c1 - core::panicking::panic_fmt::h7b8580d81fcbbacd
                                 at /rustc/532d2b14c05f9bc20b2d27cbb5f4550d28343a36/library/core/src/panicking.rs:107:14
    15:     0x55bd76b98573 - core::result::unwrap_failed::h885d3f7beb571353
                                 at /rustc/532d2b14c05f9bc20b2d27cbb5f4550d28343a36/library/core/src/result.rs:1660:5
    16:     0x55bd76b0a8bc - core::result::Result<T,E>::unwrap::h7cad7d4d8f622d94
    17:     0x55bd76b0a9c4 - build_script_build::main::hcc15305ed3914600
    18:     0x55bd76b0ad63 - core::ops::function::FnOnce::call_once::h4294fec930b869be
    19:     0x55bd76b0a7f9 - std::sys_common::backtrace::__rust_begin_short_backtrace::h8ddd2afd426b9805
    20:     0x55bd76b0aa49 - std::rt::lang_start::{{closure}}::he17181887215836e
    21:     0x55bd76b75e81 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h3ab949a23c24b3b3
                                 at /rustc/532d2b14c05f9bc20b2d27cbb5f4550d28343a36/library/core/src/ops/function.rs:259:13
    22:     0x55bd76b75e81 - std::panicking::try::do_call::hd77545f815897665
                                 at /rustc/532d2b14c05f9bc20b2d27cbb5f4550d28343a36/library/std/src/panicking.rs:406:40
    23:     0x55bd76b75e81 - std::panicking::try::h7ce07831cfe77010
                                 at /rustc/532d2b14c05f9bc20b2d27cbb5f4550d28343a36/library/std/src/panicking.rs:370:19
    24:     0x55bd76b75e81 - std::panic::catch_unwind::h3a6382eb739fc3cb
                                 at /rustc/532d2b14c05f9bc20b2d27cbb5f4550d28343a36/library/std/src/panic.rs:133:14
    25:     0x55bd76b75e81 - std::rt::lang_start_internal::{{closure}}::ha0ce13fbefa6ed19
                                 at /rustc/532d2b14c05f9bc20b2d27cbb5f4550d28343a36/library/std/src/rt.rs:128:48
    26:     0x55bd76b75e81 - std::panicking::try::do_call::hbacbc27e75105135
                                 at /rustc/532d2b14c05f9bc20b2d27cbb5f4550d28343a36/library/std/src/panicking.rs:406:40
    27:     0x55bd76b75e81 - std::panicking::try::he42832d690a14084
                                 at /rustc/532d2b14c05f9bc20b2d27cbb5f4550d28343a36/library/std/src/panicking.rs:370:19
    28:     0x55bd76b75e81 - std::panic::catch_unwind::h868b7b91fa924314
                                 at /rustc/532d2b14c05f9bc20b2d27cbb5f4550d28343a36/library/std/src/panic.rs:133:14
    29:     0x55bd76b75e81 - std::rt::lang_start_internal::h7797a51a89d842a3
                                 at /rustc/532d2b14c05f9bc20b2d27cbb5f4550d28343a36/library/std/src/rt.rs:128:20
    30:     0x55bd76b0aa31 - std::rt::lang_start::hf668bbaa54c4815d
    31:     0x55bd76b0a9f3 - main
    32:     0x7f31c0db7fd0 - <unknown>
    33:     0x7f31c0db807d - __libc_start_main
    34:     0x55bd76b0a725 - _start
    35:                0x0 - <unknown>
@RDambrosio016
Copy link
Member

Have you tried just running it again? Sometimes it yields spurious segfaults i haven't quite been able to track down. Other than that, building llvm with debug assertions and using that will yield more info

@zetanumbers
Copy link
Author

I've used prebuilt release from https://releases.llvm.org/ . I guess i should build it myself now.

@zetanumbers
Copy link
Author

I have built llvm 7.1.0 from source with -DLLVM_ENABLE_ASSERTIONS=On

`RUST_BACKTRACE=full cargo run -p add`
warning: In file included from /home/zeta/llvm-7/include/llvm/CodeGen/TargetSubtargetInfo.h:22,
warning:                  from rustc_llvm_wrapper/PassWrapper.cpp:29:
warning: /home/zeta/llvm-7/include/llvm/CodeGen/SchedulerRegistry.h: In constructor ‘llvm::RegisterScheduler::RegisterScheduler(const char*, const char*, llvm::RegisterScheduler::FunctionPassCtor)’:
warning: /home/zeta/llvm-7/include/llvm/CodeGen/SchedulerRegistry.h:40:35: warning: cast between incompatible function types from ‘llvm::RegisterScheduler::FunctionPassCtor’ {aka ‘llvm::ScheduleDAGSDNodes* (*)(llvm::SelectionDAGISel*, llvm::CodeGenOpt::Level)’} to ‘llvm::MachinePassCtor’ {aka ‘void* (*)()’} [-Wcast-function-type]
warning:    40 |   : MachinePassRegistryNode(N, D, (MachinePassCtor)C)
warning:       |                                   ^~~~~~~~~~~~~~~~~~
warning: In file included from rustc_llvm_wrapper/rustllvm.h:15,
warning:                  from rustc_llvm_wrapper/RustWrapper.cpp:11:
warning: /home/zeta/llvm-7/include/llvm/ADT/ArrayRef.h: In instantiation of ‘llvm::ArrayRef<T>::ArrayRef(const std::initializer_list<_Tp>&) [with T = long unsigned int]’:
warning: /home/zeta/llvm-7/include/llvm/IR/DIBuilder.h:640:31:   required from here
warning: /home/zeta/llvm-7/include/llvm/ADT/ArrayRef.h:102:37: warning: initializing ‘llvm::ArrayRef<long unsigned int>::Data’ from ‘std::initializer_list<long unsigned int>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
warning:   102 |     : Data(Vec.begin() == Vec.end() ? (T*)nullptr : Vec.begin()),
warning:       |            ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: In file included from /home/zeta/llvm-7/include/llvm/ADT/STLExtras.h:21,
warning:                  from /home/zeta/llvm-7/include/llvm/ADT/StringRef.h:13,
warning:                  from /home/zeta/llvm-7/include/llvm/ADT/StringMap.h:17,
warning:                  from /home/zeta/llvm-7/include/llvm/Support/Host.h:17,
warning:                  from /home/zeta/llvm-7/include/llvm/ADT/Hashing.h:49,
warning:                  from /home/zeta/llvm-7/include/llvm/ADT/ArrayRef.h:13,
warning:                  from rustc_llvm_wrapper/rustllvm.h:15,
warning:                  from rustc_llvm_wrapper/RustWrapper.cpp:11:
warning: /home/zeta/llvm-7/include/llvm/ADT/SmallVector.h: In instantiation of ‘void llvm::SmallVectorTemplateBase<T, true>::push_back(const T&) [with T = std::pair<void*, long unsigned int>]’:
warning: /home/zeta/llvm-7/include/llvm/Support/Allocator.h:249:33:   required from ‘void* llvm::BumpPtrAllocatorImpl<AllocatorT, SlabSize, SizeThreshold>::Allocate(size_t, size_t) [with AllocatorT = llvm::MallocAllocator; long unsigned int SlabSize = 4096; long unsigned int SizeThreshold = 4096; size_t = long unsigned int]’
warning: /home/zeta/llvm-7/include/llvm/Support/YAMLParser.h:138:26:   required from here
warning: /home/zeta/llvm-7/include/llvm/ADT/SmallVector.h:313:11: warning: ‘void* memcpy(void*, const void*, size_t)’ writing to an object of type ‘struct std::pair<void*, long unsigned int>’ with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Wclass-memaccess]
warning:   313 |     memcpy(this->end(), &Elt, sizeof(T));
warning:       |     ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: In file included from /usr/include/c++/11/utility:70,
warning:                  from /home/zeta/llvm-7/include/llvm/Support/type_traits.h:19,
warning:                  from /home/zeta/llvm-7/include/llvm/ADT/Optional.h:22,
warning:                  from /home/zeta/llvm-7/include/llvm/ADT/STLExtras.h:20,
warning:                  from /home/zeta/llvm-7/include/llvm/ADT/StringRef.h:13,
warning:                  from /home/zeta/llvm-7/include/llvm/ADT/StringMap.h:17,
warning:                  from /home/zeta/llvm-7/include/llvm/Support/Host.h:17,
warning:                  from /home/zeta/llvm-7/include/llvm/ADT/Hashing.h:49,
warning:                  from /home/zeta/llvm-7/include/llvm/ADT/ArrayRef.h:13,
warning:                  from rustc_llvm_wrapper/rustllvm.h:15,
warning:                  from rustc_llvm_wrapper/RustWrapper.cpp:11:
warning: /usr/include/c++/11/bits/stl_pair.h:211:12: note: ‘struct std::pair<void*, long unsigned int>’ declared here
warning:   211 |     struct pair
warning:       |            ^~~~
warning: In file included from rustc_llvm_wrapper/rustllvm.h:15,
warning:                  from rustc_llvm_wrapper/PassWrapper.cpp:16:
warning: /home/zeta/llvm-7/include/llvm/ADT/ArrayRef.h: In instantiation of ‘llvm::ArrayRef<T>::ArrayRef(const std::initializer_list<_Tp>&) [with T = long unsigned int]’:
warning: /home/zeta/llvm-7/include/llvm/IR/DIBuilder.h:640:31:   required from here
warning: /home/zeta/llvm-7/include/llvm/ADT/ArrayRef.h:102:37: warning: initializing ‘llvm::ArrayRef<long unsigned int>::Data’ from ‘std::initializer_list<long unsigned int>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
warning:   102 |     : Data(Vec.begin() == Vec.end() ? (T*)nullptr : Vec.begin()),
warning:       |            ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: In file included from /home/zeta/llvm-7/include/llvm/ADT/STLExtras.h:21,
warning:                  from /home/zeta/llvm-7/include/llvm/ADT/StringRef.h:13,
warning:                  from /home/zeta/llvm-7/include/llvm/ADT/StringMap.h:17,
warning:                  from /home/zeta/llvm-7/include/llvm/Support/Host.h:17,
warning:                  from /home/zeta/llvm-7/include/llvm/ADT/Hashing.h:49,
warning:                  from /home/zeta/llvm-7/include/llvm/ADT/ArrayRef.h:13,
warning:                  from rustc_llvm_wrapper/rustllvm.h:15,
warning:                  from rustc_llvm_wrapper/PassWrapper.cpp:16:
warning: /home/zeta/llvm-7/include/llvm/ADT/SmallVector.h: In instantiation of ‘void llvm::SmallVectorTemplateBase<T, true>::push_back(const T&) [with T = std::pair<void*, long unsigned int>]’:
warning: /home/zeta/llvm-7/include/llvm/Support/Allocator.h:249:33:   required from ‘void* llvm::BumpPtrAllocatorImpl<AllocatorT, SlabSize, SizeThreshold>::Allocate(size_t, size_t) [with AllocatorT = llvm::MallocAllocator; long unsigned int SlabSize = 4096; long unsigned int SizeThreshold = 4096; size_t = long unsigned int]’
warning: /home/zeta/llvm-7/include/llvm/Support/YAMLParser.h:138:26:   required from here
warning: /home/zeta/llvm-7/include/llvm/ADT/SmallVector.h:313:11: warning: ‘void* memcpy(void*, const void*, size_t)’ writing to an object of type ‘struct std::pair<void*, long unsigned int>’ with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Wclass-memaccess]
warning:   313 |     memcpy(this->end(), &Elt, sizeof(T));
warning:       |     ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: In file included from /usr/include/c++/11/bits/stl_algobase.h:64,
warning:                  from /usr/include/c++/11/vector:60,
warning:                  from rustc_llvm_wrapper/PassWrapper.cpp:13:
warning: /usr/include/c++/11/bits/stl_pair.h:211:12: note: ‘struct std::pair<void*, long unsigned int>’ declared here
warning:   211 |     struct pair
warning:       |            ^~~~
warning: In file included from /home/zeta/llvm-7/include/llvm/ADT/DenseSet.h:17,
warning:                  from rustc_llvm_wrapper/rustllvm.h:16,
warning:                  from rustc_llvm_wrapper/PassWrapper.cpp:16:
warning: /home/zeta/llvm-7/include/llvm/ADT/DenseMap.h: In instantiation of ‘void llvm::DenseMapBase<DerivedT, KeyT, ValueT, KeyInfoT, BucketT>::copyFrom(const llvm::DenseMapBase<OtherBaseT, KeyT, ValueT, KeyInfoT, BucketT>&) [with OtherBaseT = llvm::DenseMap<long unsigned int, llvm::GlobalValueSummary*>; DerivedT = llvm::DenseMap<long unsigned int, llvm::GlobalValueSummary*>; KeyT = long unsigned int; ValueT = llvm::GlobalValueSummary*; KeyInfoT = llvm::DenseMapInfo<long unsigned int>; BucketT = llvm::detail::DenseMapPair<long unsigned int, llvm::GlobalValueSummary*>]’:
warning: /home/zeta/llvm-7/include/llvm/ADT/DenseMap.h:711:28:   required from ‘void llvm::DenseMap<KeyT, ValueT, KeyInfoT, BucketT>::copyFrom(const llvm::DenseMap<KeyT, ValueT, KeyInfoT, BucketT>&) [with KeyT = long unsigned int; ValueT = llvm::GlobalValueSummary*; KeyInfoT = llvm::DenseMapInfo<long unsigned int>; BucketT = llvm::detail::DenseMapPair<long unsigned int, llvm::GlobalValueSummary*>]’
warning: /home/zeta/llvm-7/include/llvm/ADT/DenseMap.h:665:5:   required from ‘llvm::DenseMap<KeyT, ValueT, KeyInfoT, BucketT>::DenseMap(const llvm::DenseMap<KeyT, ValueT, KeyInfoT, BucketT>&) [with KeyT = long unsigned int; ValueT = llvm::GlobalValueSummary*; KeyInfoT = llvm::DenseMapInfo<long unsigned int>; BucketT = llvm::detail::DenseMapPair<long unsigned int, llvm::GlobalValueSummary*>]’
warning: /home/zeta/llvm-7/include/llvm/ADT/StringMap.h:350:18:   required from ‘ValueTy llvm::StringMap<ValueTy, AllocatorTy>::lookup(llvm::StringRef) const [with ValueTy = llvm::DenseMap<long unsigned int, llvm::GlobalValueSummary*>; AllocatorTy = llvm::MallocAllocator]’
warning: rustc_llvm_wrapper/PassWrapper.cpp:1200:71:   required from here
warning: /home/zeta/llvm-7/include/llvm/ADT/DenseMap.h:396:13: warning: ‘void* memcpy(void*, const void*, size_t)’ writing to an object of type ‘struct llvm::detail::DenseMapPair<long unsigned int, llvm::GlobalValueSummary*>’ with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Wclass-memaccess]
warning:   396 |       memcpy(getBuckets(), other.getBuckets(),
warning:       |       ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning:   397 |              getNumBuckets() * sizeof(BucketT));
warning:       |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: /home/zeta/llvm-7/include/llvm/ADT/DenseMap.h:40:8: note: ‘struct llvm::detail::DenseMapPair<long unsigned int, llvm::GlobalValueSummary*>’ declared here
warning:    40 | struct DenseMapPair : public std::pair<KeyT, ValueT> {
warning:       |        ^~~~~~~~~~~~
   Compiling add v0.1.0 (/home/zeta/repos/Rust-CUDA/examples/cuda/cpu/add)
error: failed to run custom build command for `add v0.1.0 (/home/zeta/repos/Rust-CUDA/examples/cuda/cpu/add)`

Caused by:
  process didn't exit successfully: `/home/zeta/repos/Rust-CUDA/target/debug/build/add-34c097f5387f9249/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-changed=../../gpu/add_gpu

  --- stderr
     Compiling cuda_std v0.2.2 (/home/zeta/repos/Rust-CUDA/crates/cuda_std)
  warning: function is never used: `double_ordering_from_one`
    --> crates/cuda_std/src/atomic.rs:65:4
     |
  65 | fn double_ordering_from_one(ordering: Ordering) -> (Ordering, Ordering) {
     |    ^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = note: `#[warn(dead_code)]` on by default

  Intrinsic has incorrect return type!
  i32 (i32, i64)* @llvm.nvvm.match.any.sync.i64
  Intrinsic has incorrect return type!
  i32 (i32, i64)* @llvm.nvvm.match.any.sync.i64
  Intrinsic has incorrect return type!
  i32 (i32, i64)* @llvm.nvvm.match.any.sync.i64
  LLVM ERROR: Broken module found, compilation aborted!
  warning: `cuda_std` (lib) generated 1 warning
  error: could not compile `cuda_std`; 1 warning emitted
  thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: BuildFailed', examples/cuda/cpu/add/build.rs:7:10
  stack backtrace:
     0:     0x55fe5044b63c - std::backtrace_rs::backtrace::libunwind::trace::hf7449935ead7573e
                                 at /rustc/532d2b14c05f9bc20b2d27cbb5f4550d28343a36/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
     1:     0x55fe5044b63c - std::backtrace_rs::backtrace::trace_unsynchronized::h221aa2d88d72372a
                                 at /rustc/532d2b14c05f9bc20b2d27cbb5f4550d28343a36/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
     2:     0x55fe5044b63c - std::sys_common::backtrace::_print_fmt::h1c77e8983e1df895
                                 at /rustc/532d2b14c05f9bc20b2d27cbb5f4550d28343a36/library/std/src/sys_common/backtrace.rs:67:5
     3:     0x55fe5044b63c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hd4ec41a9a6b0d22c
                                 at /rustc/532d2b14c05f9bc20b2d27cbb5f4550d28343a36/library/std/src/sys_common/backtrace.rs:46:22
     4:     0x55fe5046e82c - core::fmt::write::h72801a82c94e6ff1
                                 at /rustc/532d2b14c05f9bc20b2d27cbb5f4550d28343a36/library/core/src/fmt/mod.rs:1149:17
     5:     0x55fe50447825 - std::io::Write::write_fmt::haf74340a8cbeaa88
                                 at /rustc/532d2b14c05f9bc20b2d27cbb5f4550d28343a36/library/std/src/io/mod.rs:1697:15
     6:     0x55fe5044cd80 - std::sys_common::backtrace::_print::h2d15cd157796a64a
                                 at /rustc/532d2b14c05f9bc20b2d27cbb5f4550d28343a36/library/std/src/sys_common/backtrace.rs:49:5
     7:     0x55fe5044cd80 - std::sys_common::backtrace::print::h52d286d22e2398eb
                                 at /rustc/532d2b14c05f9bc20b2d27cbb5f4550d28343a36/library/std/src/sys_common/backtrace.rs:36:9
     8:     0x55fe5044cd80 - std::panicking::default_hook::{{closure}}::h6da08fba6306daf2
                                 at /rustc/532d2b14c05f9bc20b2d27cbb5f4550d28343a36/library/std/src/panicking.rs:211:50
     9:     0x55fe5044c92b - std::panicking::default_hook::h266f67a22e76b11a
                                 at /rustc/532d2b14c05f9bc20b2d27cbb5f4550d28343a36/library/std/src/panicking.rs:228:9
    10:     0x55fe5044d564 - std::panicking::rust_panic_with_hook::he55698a957f4fb6d
                                 at /rustc/532d2b14c05f9bc20b2d27cbb5f4550d28343a36/library/std/src/panicking.rs:606:17
    11:     0x55fe5044d010 - std::panicking::begin_panic_handler::{{closure}}::h01f453c3ac181895
                                 at /rustc/532d2b14c05f9bc20b2d27cbb5f4550d28343a36/library/std/src/panicking.rs:502:13
    12:     0x55fe5044bae4 - std::sys_common::backtrace::__rust_end_short_backtrace::h675d77c6e5a3926d
                                 at /rustc/532d2b14c05f9bc20b2d27cbb5f4550d28343a36/library/std/src/sys_common/backtrace.rs:139:18
    13:     0x55fe5044cf79 - rust_begin_unwind
                                 at /rustc/532d2b14c05f9bc20b2d27cbb5f4550d28343a36/library/std/src/panicking.rs:498:5
    14:     0x55fe5046d2c1 - core::panicking::panic_fmt::h7b8580d81fcbbacd
                                 at /rustc/532d2b14c05f9bc20b2d27cbb5f4550d28343a36/library/core/src/panicking.rs:107:14
    15:     0x55fe5046d573 - core::result::unwrap_failed::h885d3f7beb571353
                                 at /rustc/532d2b14c05f9bc20b2d27cbb5f4550d28343a36/library/core/src/result.rs:1660:5
    16:     0x55fe503df8bc - core::result::Result<T,E>::unwrap::h7cad7d4d8f622d94
    17:     0x55fe503df9c4 - build_script_build::main::hcc15305ed3914600
    18:     0x55fe503dfd63 - core::ops::function::FnOnce::call_once::h4294fec930b869be
    19:     0x55fe503df7f9 - std::sys_common::backtrace::__rust_begin_short_backtrace::h8ddd2afd426b9805
    20:     0x55fe503dfa49 - std::rt::lang_start::{{closure}}::he17181887215836e
    21:     0x55fe5044ae81 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h3ab949a23c24b3b3
                                 at /rustc/532d2b14c05f9bc20b2d27cbb5f4550d28343a36/library/core/src/ops/function.rs:259:13
    22:     0x55fe5044ae81 - std::panicking::try::do_call::hd77545f815897665
                                 at /rustc/532d2b14c05f9bc20b2d27cbb5f4550d28343a36/library/std/src/panicking.rs:406:40
    23:     0x55fe5044ae81 - std::panicking::try::h7ce07831cfe77010
                                 at /rustc/532d2b14c05f9bc20b2d27cbb5f4550d28343a36/library/std/src/panicking.rs:370:19
    24:     0x55fe5044ae81 - std::panic::catch_unwind::h3a6382eb739fc3cb
                                 at /rustc/532d2b14c05f9bc20b2d27cbb5f4550d28343a36/library/std/src/panic.rs:133:14
    25:     0x55fe5044ae81 - std::rt::lang_start_internal::{{closure}}::ha0ce13fbefa6ed19
                                 at /rustc/532d2b14c05f9bc20b2d27cbb5f4550d28343a36/library/std/src/rt.rs:128:48
    26:     0x55fe5044ae81 - std::panicking::try::do_call::hbacbc27e75105135
                                 at /rustc/532d2b14c05f9bc20b2d27cbb5f4550d28343a36/library/std/src/panicking.rs:406:40
    27:     0x55fe5044ae81 - std::panicking::try::he42832d690a14084
                                 at /rustc/532d2b14c05f9bc20b2d27cbb5f4550d28343a36/library/std/src/panicking.rs:370:19
    28:     0x55fe5044ae81 - std::panic::catch_unwind::h868b7b91fa924314
                                 at /rustc/532d2b14c05f9bc20b2d27cbb5f4550d28343a36/library/std/src/panic.rs:133:14
    29:     0x55fe5044ae81 - std::rt::lang_start_internal::h7797a51a89d842a3
                                 at /rustc/532d2b14c05f9bc20b2d27cbb5f4550d28343a36/library/std/src/rt.rs:128:20
    30:     0x55fe503dfa31 - std::rt::lang_start::hf668bbaa54c4815d
    31:     0x55fe503df9f3 - main
    32:     0x7fd4dfc3bfd0 - <unknown>
    33:     0x7fd4dfc3c07d - __libc_start_main
    34:     0x55fe503df725 - _start
    35:                0x0 - <unknown>

@zetanumbers
Copy link
Author

I have installed cuda version 11.4.4 as the last cuda version that bundles with 470 version of nvidida driver, that supports nvidia gtx 780. Maybe i have too old of a video card? In that case i think it should be mentioned in the getting started chapter.

@RDambrosio016
Copy link
Member

seems i messed something up when adding warp matches, the intrinsics seem mistyped, im currently away from my pc but ill check it out ASAP

@RDambrosio016 RDambrosio016 added bug Something isn't working C-rustc_codegen_nvvm Category: the NVVM Rustc codegen labels Mar 11, 2022
@locadani
Copy link

locadani commented Apr 8, 2023

I have the same problem. I used prebuilt LLVM (if this can help). I looked deeper in the functions called and in my case the problem is given by the function crates/cuda_builder/src/invoke_rustc, which stops the building execution. Try adding a println!("cargo:warning=Anything"); after it and tell me if you have the same problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working C-rustc_codegen_nvvm Category: the NVVM Rustc codegen
Projects
None yet
Development

No branches or pull requests

3 participants