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

[C++] parquet-encoding-benchmark makes invalid accesses if repetitions > 1 #42140

Closed
pitrou opened this issue Jun 13, 2024 · 1 comment
Closed

Comments

@pitrou
Copy link
Member

pitrou commented Jun 13, 2024

Describe the bug, including details regarding any error messages, version, and platform.

When looking at some continuous benchmarking failures on macOS ARM, I came to the conclusion that parquet-encoding-benchmark can crash if more than one benchmark repetition is requested.

I managed to reproduce the issue locally on x86 (Ubuntu 22.04) using this command line:

$ ARROW_DEFAULT_MEMORY_POOL=system  valgrind <build dir>/relwithdebinfo/parquet-encoding-benchmark --benchmark_repetitions=6 --benchmark_min_time=0.050000s --benchmark_filter=BM_ArrowBinaryPlain.EncodeLowLevel

Component(s)

C++

@pitrou pitrou self-assigned this Jun 13, 2024
pitrou added a commit to pitrou/arrow that referenced this issue Jun 13, 2024
pitrou added a commit that referenced this issue Jun 13, 2024
…42141)

### Rationale for this change

`parquet-encoding-benchmark`  would make invalid memory accesses if more than one repetition per benchmark is requested by the user.

This was initially noticed in #41205 : switching to jemalloc would crash the specific benchmark(s) on a macOS ARM machine.

### What changes are included in this PR?

Make sure benchmark data initialization is idempotent.

### Are these changes tested?

Locally using Valgrind.

### Are there any user-facing changes?

No.
* GitHub Issue: #42140

Authored-by: Antoine Pitrou <antoine@python.org>
Signed-off-by: Antoine Pitrou <antoine@python.org>
@pitrou pitrou added this to the 17.0.0 milestone Jun 13, 2024
@pitrou
Copy link
Member Author

pitrou commented Jun 13, 2024

Issue resolved by pull request 42141
#42141

@pitrou pitrou closed this as completed Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant