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 memcheck --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.device_batch_copy
========= COMPUTE-SANITIZER
Using device 0: Tesla V100-PCIE-32GB (PTX version 700, SM700, 80 SMs, 32086 free / 32494 total MB physmem, 898.048 GB/s @ 877000 kHz mem clock, ECC on)
========= Invalid __global__ read of size 4 bytes
========= at void thrust::THRUST_200500_600_700_800_NS::cuda_cub::__uninitialized_copy::functor<thrust::THRUST_200500_600_700_800_NS::device_ptr<object_with_non_trivial_ctor>, thrust::THRUST_200500_600_700_800_NS::pointer<object_with_non_trivial_ctor, thrust::THRUST_200500_600_700_800_NS::cuda_cub::tag, thrust::THRUST_200500_600_700_800_NS::use_default, thrust::THRUST_200500_600_700_800_NS::use_default>>::operator ()<long>(T1)+0x1b0 in /home/coder/cccl/thrust/thrust/system/cuda/detail/uninitialized_copy.h:80
========= by thread (0,0,0) in block (0,0,0)
========= Address 0x7fc595e00018 is out of bounds
========= and is 1 bytes after the nearest allocation at 0x7fc595e00000 of size 24 bytes
========= Device Frame:void cub::CUB_200500_600_700_800_NS::detail::for_each::agent_block_striped_t<cub::CUB_200500_600_700_800_NS::detail::for_each::policy_t<(int)256, (int)2>, long, thrust::THRUST_200500_600_700_800_NS::cuda_cub::__uninitialized_copy::functor<thrust::THRUST_200500_600_700_800_NS::device_ptr<object_with_non_trivial_ctor>, thrust::THRUST_200500_600_700_800_NS::pointer<object_with_non_trivial_ctor, thrust::THRUST_200500_600_700_800_NS::cuda_cub::tag, thrust::THRUST_200500_600_700_800_NS::use_default, thrust::THRUST_200500_600_700_800_NS::use_default>>>::consume_tile<(bool)0>(int, int)+0x1b0 in /home/coder/cccl/cub/cub/agent/agent_for.cuh:75
========= Device Frame:void cub::CUB_200500_600_700_800_NS::detail::for_each::static_kernel<cub::CUB_200500_600_700_800_NS::detail::for_each::policy_hub_t::policy_350_t, long, thrust::THRUST_200500_600_700_800_NS::cuda_cub::__uninitialized_copy::functor<thrust::THRUST_200500_600_700_800_NS::device_ptr<object_with_non_trivial_ctor>, thrust::THRUST_200500_600_700_800_NS::pointer<object_with_non_trivial_ctor, thrust::THRUST_200500_600_700_800_NS::cuda_cub::tag, thrust::THRUST_200500_600_700_800_NS::use_default, thrust::THRUST_200500_600_700_800_NS::use_default>>>(T2, T3)+0x120 in /home/coder/cccl/cub/cub/device/dispatch/dispatch_for.cuh:155
========= Saved host backtrace up to driver entry point at kernel launch time
========= Host Frame: [0x2ef36f]
========= in /usr/lib/x86_64-linux-gnu/libcuda.so.1
========= Host Frame:libcudart_static_4d8b33a106dceb3c07a56e26de61f2d53bb62a68 [0x2cd6d]
========= in /home/coder/cccl/build/cuda12.4-gcc13/cub-cpp17/bin/cub.cpp17.test.device_batch_copy
========= Host Frame:cudaLaunchKernel [0x904ad]
========= in /home/coder/cccl/build/cuda12.4-gcc13/cub-cpp17/bin/cub.cpp17.test.device_batch_copy
========= Host Frame:object_with_non_trivial_ctor* thrust::THRUST_200500_600_700_800_NS::cuda_cub::__copy::cross_system_copy_n<thrust::THRUST_200500_600_700_800_NS::cuda_cub::tag, thrust::THRUST_200500_600_700_800_NS::system::cpp::detail::tag, thrust::THRUST_200500_600_700_800_NS::device_ptr<object_with_non_trivial_ctor>, long, object_with_non_trivial_ctor*>(thrust::THRUST_200500_600_700_800_NS::cuda_cub::execution_policy<thrust::THRUST_200500_600_700_800_NS::cuda_cub::tag>&, thrust::THRUST_200500_600_700_800_NS::system::cpp::detail::execution_policy<thrust::THRUST_200500_600_700_800_NS::system::cpp::detail::tag>&, thrust::THRUST_200500_600_700_800_NS::device_ptr<object_with_non_trivial_ctor>, long, object_with_non_trivial_ctor*, cuda::std::__4::integral_constant<bool, false>) [clone .constprop.0] [clone .isra.0] [0xf216]
========= in /home/coder/cccl/build/cuda12.4-gcc13/cub-cpp17/bin/cub.cpp17.test.device_batch_copy
========= Host Frame:nontrivial_constructor_test() [0x10a23]
========= in /home/coder/cccl/build/cuda12.4-gcc13/cub-cpp17/bin/cub.cpp17.test.device_batch_copy
========= Host Frame:main [0xe190]
========= in /home/coder/cccl/build/cuda12.4-gcc13/cub-cpp17/bin/cub.cpp17.test.device_batch_copy
========= 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 [0xe6d4]
========= in /home/coder/cccl/build/cuda12.4-gcc13/cub-cpp17/bin/cub.cpp17.test.device_batch_copy
How to Reproduce
compute-sanitizer --tool memcheck --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.device_batch_copy
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
Fix invalid memory reads in test_device_batch_copy.
Fix invalid memory reads in test_device_batch_copy.
Fix invalid memory reads in test_device_batch_copy.
Fix invalid memory reads in test_device_batch_copy. (#2698)
Fix invalid memory reads in test_device_batch_copy. (NVIDIA#2698)