Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[fix](memory) Disable Arrow Jemalloc (apache#37528)
## Proposed changes Currently, Arrow use separate Jemalloc, and use non-standard methods `mallocx`, `sdallocx`, `rallocx` in `memory_pool_jemalloc.cc` to optimize memory allocation. But this may be incompatible with older versions of the Linux kernel. when we use Arrow on Arm Kirin v10 or Centos 7.4, it will get stuck on the Jemalloc Lock, with the stack below, it will appear when calling `arrow::RecordBatch::MakeEmpty`. the kernel version of Arm Kylin v10 is 4.19.90, and the kernel version of Centos 7.4 is 4.14. ``` #0 0x0000ffffae3ceff8 in __lll_lock_wait () from /lib64/libpthread.so.0 #1 0x0000ffffae3c9b50 in pthread_mutex_lock () from /lib64/libpthread.so.0 #2 0x0000ffffae61c834 in pthread_mutex_lock () from /lib64/libc.so.6 apache#3 0x0000aaaac99bc1e0 in je_arrow_private_je_malloc_mutex_lock_slow () apache#4 0x0000aaaac99af3a4 in ?? () apache#5 0x0000aaaac99b576c in je_arrow_mallocx () apache#6 0x0000aaaac99a8aec in ?? () apache#7 0x0000aaaac99a9858 in arrow::AllocateResizableBuffer(long, arrow::MemoryPool*) () apache#8 0x0000aaaac399f8b8 in arrow::BufferBuilder::Resize(long, bool) () apache#9 0x0000aaaac983715c in arrow::BaseBinaryBuilder<arrow::BinaryType>::Resize(long) () apache#10 0x0000aaaac39a47e0 in arrow::BaseBinaryBuilder<arrow::BinaryType>::Append(unsigned char const*, int) () ``` After disable separate Jemalloc when compiling Arrow, the above error disappeared, and Arrow will use the default memory allocator, which is Doris Jemalloc.
- Loading branch information