Skip to content

Fix racecheck in parquet page_string_decode kernels - #23681

Open
davidwendt wants to merge 1 commit into
NVIDIA:mainfrom
davidwendt:cs-pq-ls
Open

Fix racecheck in parquet page_string_decode kernels#23681
davidwendt wants to merge 1 commit into
NVIDIA:mainfrom
davidwendt:cs-pq-ls

Conversation

@davidwendt

Copy link
Copy Markdown
Contributor

Description

Fixes a racecheck found in the weekend compute-sanitizer run in the parquet page_strings_decode.cu kernels totalDeltaByteArraySize and compute_delta_length_page_string_sizes_kernel. Adds a warp.sync() before the call to the setup_next_mini_block() utility which runs only on warp lane=0.

https://github.com/NVIDIA/cudf/actions/runs/31878600604/job/94998078592#step:5:2953

[ RUN      ] ParquetStringsTest.ReadLargeStrings
========= Warning: Race reported between Read access at cudf::io::parquet::detail::<unnamed>::totalDeltaByteArraySize(const unsigned char *, const unsigned char *, int, int)+0x9910 in page_string_decode.cu:455
=========     and Write access at cudf::io::parquet::detail::delta_binary_decoder::setup_next_mini_block(bool)+0x9be0 in delta_binary.cuh:208 [1250960 hazards]
========= 
[       OK ] ParquetStringsTest.ReadLargeStrings (77563 ms)

The change was introduced in PR #23314 which rewrote the delta decode loops in cpp/src/io/parquet/delta_binary.cuh and cpp/src/io/parquet/page_string_decode.cu to decode one warp-size pass at a time. That refactor introduced the pass-by-pass loop pattern in totalDeltaByteArraySize and the DELTA_LENGTH_BYTE_ARRAY string-size kernel where all lanes read current_value_idx without a synchronizing warp.sync() before lane 0 advances it in setup_next_mini_block, causing the race.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@davidwendt davidwendt self-assigned this Aug 17, 2026
@davidwendt
davidwendt requested a review from a team as a code owner August 17, 2026 18:06
@davidwendt davidwendt added the bug Something isn't working label Aug 17, 2026
@davidwendt
davidwendt requested a review from mattgara August 17, 2026 18:06
@davidwendt davidwendt added the 3 - Ready for Review Ready for review by team label Aug 17, 2026
@davidwendt
davidwendt requested a review from simoneves August 17, 2026 18:06
@davidwendt davidwendt added libcudf Affects libcudf (C++/CUDA) code. cuIO cuIO issue non-breaking Non-breaking change labels Aug 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3 - Ready for Review Ready for review by team bug Something isn't working cuIO cuIO issue libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants