Skip to content

[BUG] Partitioned Writing/Reading Failure #13414

Closed

Description

@quasiben

We are seeing a bug with partitioned writing we think was introduced in #13076

import cudf
input_path = "./data.parquet"
output_path = "./partition_on_frame.parquet"

no_part_df = cudf.read_parquet(input_path)
print(len(no_part_df))

# Write with partition_on
## This creates invalid files
no_part_df.to_parquet(output_path,partition_cols=["output_partition_id"])

### below fails
shuffled_df = cudf.read_parquet(output_path)
print(len(shuffled_df))

I'm trying to get a smaller dataset together -- at the moment the smallest parquet which seems to manifest this bug is ~400MB and is available on internal lab machines.

Activity

  1. added
    bug
    Needs Triage
    on May 23, 2023
  2. added
    cuIO
    2 - In Progress
    and removed
    Needs Triage
    on May 23, 2023
  3. moved this to Burndown PRs in libcudfon May 23, 2023
  4. GregoryKimball commented on May 24, 2023

    @GregoryKimball
    Contributor

    I've learned a few things about this failure. So far my observations are also consistent with #13076 as the blame diff.

    The offending file includes a column "text" that contains strings from 100-900k length. If we slice these strings to make them shorter, the writer can succeed.

    truncating the "text" column:
    df['text'] = df['text'].str.slice(0, value)
    
    result:
    pass with 320500
    pass with 320750
    pass with 320875
    pass with 320938
    pass with 320969
    fail with 320970 CUDF failure at: /nfs/repo/cudf-23.06/cpp/src/io/parquet/reader_impl_helpers.cpp:188: Incorrect data source
    fail with 320971 CUDF failure at: /nfs/repo/cudf-23.06/cpp/src/io/parquet/reader_impl_preprocess.cu:537: Error during decompression
    fail with 320973 CUDF failure at: /nfs/repo/cudf-23.06/cpp/src/io/parquet/reader_impl_preprocess.cu:537: Error during decompression
    fail with 320977 CUDF failure at: /nfs/repo/cudf-23.06/cpp/src/io/parquet/reader_impl_preprocess.cu:1468: Encountered malformed parquet page data (unexpected row count in page data)
    fail with 320985 CUDF failure at: /nfs/repo/cudf-23.06/cpp/src/io/parquet/reader_impl_preprocess.cu:1468: Encountered malformed parquet page data (unexpected row count in page data)
    

    The repro creates 7967 parquet files as part of the partitioning on output_partition_id. Several of these files throw errors when read individually:

    reader_impl_preprocess.cu:1661: There is no page to parse
    3, 0, 8, 2, 6
    reader_impl_preprocess.cu:1468: Encountered malformed parquet page data (unexpected row count in page data)
    11, 12
    pinned_host_vector.hpp:172: 700 cudaErrorIllegalAddress an illegal memory access was encountered
    5, 9, 10, 13, 14, 15
    

    Next I'll be examining these first few partitions and working on better python and C++ repros.

  5. ttnghia commented on May 25, 2023

    @ttnghia
    Contributor

    Can somebody validate #13438 (and approve it) please? Now the repro code above does not throw any exception, but I can't verify if the output if correct.

  6. moved this from Burndown PRs to No status in libcudfon May 25, 2023
  7. quasiben commented on May 25, 2023

    @quasiben
    ContributorAuthor

    Confirmed that #13438 work. Thanks @ttnghia and @GregoryKimball !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

2 - In ProgressbugcuIO

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions