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++][CI] Sporadic mimalloc-related Valgrind errors #45270

Closed
pitrou opened this issue Jan 15, 2025 · 1 comment
Closed

[C++][CI] Sporadic mimalloc-related Valgrind errors #45270

pitrou opened this issue Jan 15, 2025 · 1 comment

Comments

@pitrou
Copy link
Member

pitrou commented Jan 15, 2025

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

The Valgrind CI job is sometimes polluted by mimalloc-related Valgrind errors, such as:
https://github.com/ursacomputing/crossbow/actions/runs/12791589715/job/35660053477#step:7:3050

[ RUN      ] TestPrimitiveWriter/6.OptionalSpaced
==15960== Conditional jump or move depends on uninitialised value(s)
==15960==    at 0x64C895D: mi_check_is_double_free (alloc.c:197)
==15960==    by 0x64C95FA: mi_free (alloc.c:497)
==15960==    by 0x640C95F: arrow::(anonymous namespace)::MimallocAllocator::DeallocateAligned(unsigned char*, long, long) (memory_pool.cc:430)
==15960==    by 0x640D544: arrow::BaseMemoryPoolImpl<arrow::(anonymous namespace)::MimallocAllocator>::Free(unsigned char*, long, long) (memory_pool.cc:508)
==15960==    by 0x6408C21: arrow::PoolBuffer::~PoolBuffer() (memory_pool.cc:851)
==15960==    by 0x6408C50: arrow::PoolBuffer::~PoolBuffer() (memory_pool.cc:853)
==15960==    by 0x496B651: operator() (unique_ptr.h:99)
==15960==    by 0x496B651: std::unique_ptr<arrow::Buffer, std::default_delete<arrow::Buffer> >::~unique_ptr() (unique_ptr.h:404)

[etc.]

Since Valgrind is probably not mimalloc-aware, we should simply disable mimalloc on Valgrind builds so that the system allocator is used.

Component(s)

C++, Continuous Integration

pitrou added a commit to pitrou/arrow that referenced this issue Jan 15, 2025
Valgrind is not aware of third-party allocators such as mimalloc and jemalloc.
This can lead to spurious errors or, on the contrary, it could hide some actual issues.
assignUser pushed a commit that referenced this issue Jan 15, 2025
### Rationale for this change

Valgrind is not aware of third-party allocators such as mimalloc and jemalloc. This can lead to spurious errors or, on the contrary, it could hide some actual issues.

### What changes are included in this PR?

Disable mimalloc in the Valgrind build (jemalloc is already disabled).

### Are these changes tested?

Yes, by existing CI.

### Are there any user-facing changes?

No.

* GitHub Issue: #45270

Authored-by: Antoine Pitrou <[email protected]>
Signed-off-by: Jacob Wujciak-Jens <[email protected]>
@assignUser
Copy link
Member

Issue resolved by pull request 45271
#45271

@assignUser assignUser added this to the 20.0.0 milestone Jan 15, 2025
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

2 participants