databendlabs / databend

𝗗𝗮𝘁𝗮, 𝗔𝗻𝗮𝗹𝘆𝘁𝗶𝗰𝘀 & 𝗔𝗜. Modern alternative to Snowflake. Cost-effective and simple for massive-scale analytics. https://databend.com
https://docs.databend.com
Other
7.85k stars 750 forks source link

bug: databend-query crashed if enabling mem limit #9200

Open FANNG1 opened 1 year ago

FANNG1 commented 1 year ago

Search before asking

Version

xxx

What's Wrong?

core stack:

 common_hashtable::container::{impl#6}::drop<common_hashtable::table0::Entry<u128, ()>, 16, common_base::mem_allocator::mmap_allocator::MmapAllocator<common_base::mem_allocator::global_allocator::GlobalAllocator>> ()
    at src/common/hashtable/src/container.rs:210
impl<T, const N: usize, A: Allocator> Drop for StackContainer<T, N, A> {
    fn drop(&mut self) {
210->    if !self.ptr.is_null() {
            unsafe {
                self.allocator.deallocate(
                    NonNull::new(self.ptr).unwrap().cast(),
                    Layout::array::<T>(self.len).unwrap(),
                );
            }
        }
    }
}

How to Reproduce?

No response

Are you willing to submit PR?

FANNG1 commented 1 year ago

cc @drmingdrmer