Repository navigation
Closed
Description
Is this a duplicate?
- I confirmed there appear to be no duplicate issues for this bug and that I agree to the Code of Conduct
Type of Bug
Silent Failure
Component
CUB
Describe the bug
compute-sanitizer --tool initcheck --check-device-heap yes --leak-check full --padding 512 --track-stream-ordered-races all --check-warpgroup-mma yes --require-cuda-init no --check-exit-code yes --error-exitcode 1 --nvtx true /home/coder/cccl/build/cuda12.4-gcc13/cub-cpp17/bin/cub.cpp17.test.iterator
========= COMPUTE-SANITIZER
========= Host API memory access error at host access to 0x7fb33ca00400 of size 32 bytes
========= Uninitialized access at 0x7fb33ca00400 on access by cudaMemcpy source
========= Saved host backtrace up to driver entry point at error
========= Host Frame: [0x2e7d39]
========= in /usr/lib/x86_64-linux-gnu/libcuda.so.1
========= Host Frame:libcudart_static_e760a7280bc1af45ef561886abc194823c5edadb [0x2c3eb0]
========= in /home/coder/cccl/build/cuda12.4-gcc13/cub-cpp17/bin/cub.cpp17.test.iterator
========= Host Frame:libcudart_static_901c335edfe2e89188fa6b8fe3e2a2194ad05bff [0x290109]
========= in /home/coder/cccl/build/cuda12.4-gcc13/cub-cpp17/bin/cub.cpp17.test.iterator
========= Host Frame:cudaMemcpy [0x2eb946]
========= in /home/coder/cccl/build/cuda12.4-gcc13/cub-cpp17/bin/cub.cpp17.test.iterator
========= Host Frame:void test_iterator<cub::CUB_200500_600_700_800_NS::ConstantInputIterator<signed char, long>, signed char>(cub::CUB_200500_600_700_800_NS::ConstantInputIterator<signed char, long>, thrust::THRUST_200500_600_700_800_NS::detail::vector_base<signed char, thrust::THRUST_200500_600_700_800_NS::mr::stateless_resource_allocator<signed char, c2h::checked_host_memory_resource> > const&) [0x15edd4]
========= in /home/coder/cccl/build/cuda12.4-gcc13/cub-cpp17/bin/cub.cpp17.test.iterator
========= Host Frame:void C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_0<metal::list<signed char> >() [0x1257c6]
========= in /home/coder/cccl/build/cuda12.4-gcc13/cub-cpp17/bin/cub.cpp17.test.iterator
========= Host Frame:Catch::RunContext::invokeActiveTestCase() [0x6dfa2]
========= in /home/coder/cccl/build/cuda12.4-gcc13/cub-cpp17/bin/cub.cpp17.test.iterator
========= Host Frame:Catch::RunContext::runCurrentTest(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) [0x86407]
========= in /home/coder/cccl/build/cuda12.4-gcc13/cub-cpp17/bin/cub.cpp17.test.iterator
========= Host Frame:Catch::RunContext::runTest(Catch::TestCase const&) [0x8f0ea]
========= in /home/coder/cccl/build/cuda12.4-gcc13/cub-cpp17/bin/cub.cpp17.test.iterator
========= Host Frame:Catch::Session::runInternal() [0x9956f]
========= in /home/coder/cccl/build/cuda12.4-gcc13/cub-cpp17/bin/cub.cpp17.test.iterator
========= Host Frame:Catch::Session::run() [0x99b5d]
========= in /home/coder/cccl/build/cuda12.4-gcc13/cub-cpp17/bin/cub.cpp17.test.iterator
========= Host Frame:main [0x3b045]
========= in /home/coder/cccl/build/cuda12.4-gcc13/cub-cpp17/bin/cub.cpp17.test.iterator
========= Host Frame: [0x23a8f]
========= in /usr/lib/x86_64-linux-gnu/libc.so.6
========= Host Frame:__libc_start_main [0x23b48]
========= in /usr/lib/x86_64-linux-gnu/libc.so.6
========= Host Frame:_start [0x64cf4]
========= in /home/coder/cccl/build/cuda12.4-gcc13/cub-cpp17/bin/cub.cpp17.test.iterator
How to Reproduce
compute-sanitizer --tool initcheck --check-device-heap yes --leak-check full --padding 512 --track-stream-ordered-races all --check-warpgroup-mma yes --require-cuda-init no --check-exit-code yes --error-exitcode 1 --nvtx true /home/coder/cccl/build/cuda12.4-gcc13/cub-cpp17/bin/cub.cpp17.test.iterator
Expected behavior
No diagnostics emitted.
Reproduction link
No response
Operating System
No response
nvidia-smi output
No response
NVCC version
No response
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
- StatusShow more project fieldsDone
Activity
alliepiper commentedon Nov 8, 2024
I can reproduce this with a very simple program:
Swapping out T for
intdoes not trigger warning. Will investigate the iterator implementation next.alliepiper commentedon Nov 8, 2024
Even simpler:
It's the padding bits again. The error message suggests the entire 32-byte region is uninitialized, but it's just a portion of it. The diagnostic disappears when
valandoffsetare both 8-byte types.alliepiper commentedon Nov 15, 2024
Suppressed several versions of this diagnostic for
cub.test.iteratorin #1879, all due to padding bits.