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

[BUG] Memcheck error found in JSON_TEST JsonReaderTest.ErrorStrings #14141

Closed
davidwendt opened this issue Sep 20, 2023 · 1 comment · Fixed by #14164
Closed

[BUG] Memcheck error found in JSON_TEST JsonReaderTest.ErrorStrings #14141

davidwendt opened this issue Sep 20, 2023 · 1 comment · Fixed by #14164
Assignees
Labels
bug Something isn't working cuIO cuIO issue libcudf Affects libcudf (C++/CUDA) code.

Comments

@davidwendt
Copy link
Contributor

Describe the bug
The nightly builds memcheck run found an error in the JSON_TEST JsonReaderTest.ErrorStrings which was introduced by PR #13803

Steps/Code to reproduce bug

# compute-sanitizer --tool memcheck gtests/JSON_TEST --gtest_filter=JsonReaderTest.ErrorStrings --rmm_mode=cuda
========= COMPUTE-SANITIZER
Note: Google Test filter = JsonReaderTest.ErrorStrings
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from JsonReaderTest
[ RUN      ] JsonReaderTest.ErrorStrings
========= Invalid __global__ write of size 1 bytes
=========     at 0x1670 in void thrust::cuda_cub::core::_kernel_agent<thrust::cuda_cub::__parallel_for::ParallelForAgent<thrust::cuda_cub::for_each_f<thrust::counting_iterator<int, thrust::use_default, thrust::use_default, thrust::use_default>, thrust::detail::wrapped_function<cudf::io::json::detail::string_parse<thrust::transform_iterator<cudf::io::json::detail::to_string_view_pair<char>, thrust::zip_iterator<thrust::tuple<const int *, const int *, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, thrust::use_default, thrust::use_default>>, void>>, int>, thrust::cuda_cub::for_each_f<thrust::counting_iterator<int, thrust::use_default, thrust::use_default, thrust::use_default>, thrust::detail::wrapped_function<cudf::io::json::detail::string_parse<thrust::transform_iterator<cudf::io::json::detail::to_string_view_pair<char>, thrust::zip_iterator<thrust::tuple<const int *, const int *, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, thrust::use_default, thrust::use_default>>, void>>, int>(T2, T3)
=========     by thread (2,0,0) in block (0,0,0)
=========     Address 0x7faf25a02e05 is out of bounds
=========     and is 1 bytes after the nearest allocation at 0x7faf25a02e00 of size 5 bytes

@davidwendt davidwendt added bug Something isn't working Needs Triage Need team to review and classify libcudf Affects libcudf (C++/CUDA) code. cuIO cuIO issue labels Sep 20, 2023
@wence-
Copy link
Contributor

wence- commented Sep 20, 2023

Backtrace with symbols:

========= Invalid __global__ write of size 1 bytes
=========     at 0x5280 in /home/wence/Documents/src/rapids/cudf/cpp/src/io/utilities/data_casting.cu:205:process_string<first_type>
=========     by thread (2,0,0) in block (0,0,0)
=========     Address 0x7f10dd202e05 is out of bounds
=========     and is 1 bytes after the nearest allocation at 0x7f10dd202e00 of size 5 bytes
=========     Device Frame:/home/wence/Documents/src/rapids/cudf/cpp/src/io/utilities/data_casting.cu:770:cudf::io::json::detail::string_parse<thrust::transform_iterator<cudf::io::json::detail::to_string_view_pair<char>, thrust::zip_iterator<thrust::tuple<const int *, const int *, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, thrust::use_default, thrust::use_default>>::operator ()(int) [0xaa40]
=========     Device Frame:/home/wence/Documents/src/rapids/cudf/cpp/build/cuda-11.8.0/branch-23.10/release/_deps/thrust-src/thrust/detail/function.h:125:operator()<size_type> [0x2610]
=========     Device Frame:/home/wence/Documents/src/rapids/cudf/cpp/build/cuda-11.8.0/branch-23.10/release/_deps/thrust-src/thrust/detail/function.h:58:operator()<int> [0x26a0]
=========     Device Frame:/home/wence/Documents/src/rapids/cudf/cpp/build/cuda-11.8.0/branch-23.10/release/_deps/thrust-src/thrust/system/cuda/detail/for_each.h:97:consume_tile<false> [0x27e0]
=========     Device Frame:/home/wence/Documents/src/rapids/cudf/cpp/build/cuda-11.8.0/branch-23.10/release/_deps/thrust-src/thrust/system/cuda/detail/parallel_for.h:118:entry [0x2860]
=========     Device Frame:/home/wence/Documents/src/rapids/cudf/cpp/build/cuda-11.8.0/branch-23.10/release/_deps/thrust-src/thrust/system/cuda/detail/core/agent_launcher.h:76:void thrust::cuda_cub::core::_kernel_agent<thrust::cuda_cub::__parallel_for::ParallelForAgent<thrust::cuda_cub::for_each_f<thrust::counting_iterator<int, thrust::use_default, thrust::use_default, thrust::use_default>, thrust::detail::wrapped_function<cudf::io::json::detail::string_parse<thrust::transform_iterator<cudf::io::json::detail::to_string_view_pair<char>, thrust::zip_iterator<thrust::tuple<const int *, const int *, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, thrust::use_default, thrust::use_default>>, void>>, int>, thrust::cuda_cub::for_each_f<thrust::counting_iterator<int, thrust::use_default, thrust::use_default, thrust::use_default>, thrust::detail::wrapped_function<cudf::io::json::detail::string_parse<thrust::transform_iterator<cudf::io::json::detail::to_string_view_pair<char>, thrust::zip_iterator<thrust::tuple<const int *, const int *, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, thrust::use_default, thrust::use_default>>, void>>, int>(T2, T3) [0x2880]
=========     Saved host backtrace up to driver entry point at kernel launch time

@karthikeyann karthikeyann removed the Needs Triage Need team to review and classify label Sep 21, 2023
rapids-bot bot pushed a commit that referenced this issue Sep 25, 2023
…4164)

Fix missing null mask in string column names parsing. For parsing error, the row is made null. To write output properly, the nulls need to be passed so that they can be skipped during writing output stage in `parse_data`.
Fixes #14141

Authors:
  - Karthikeyan (https://github.com/karthikeyann)

Approvers:
  - David Wendt (https://github.com/davidwendt)
  - Elias Stehle (https://github.com/elstehle)
  - Nghia Truong (https://github.com/ttnghia)

URL: #14164
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cuIO cuIO issue libcudf Affects libcudf (C++/CUDA) code.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants