CacheLib icon indicating copy to clipboard operation
CacheLib copied to clipboard

create createShm coredump using Cache::SharedMemNew

Open ycchildcoder opened this issue 9 months ago • 0 comments

m_cache_ = std::make_unique<Cache>(Cache::SharedMemNew, config);

core dump info: terminate called after throwing an instance of 'std::invalid_argument' what(): Unable to create shared memory segment: name: shm_cache, size: 108095602688, addr: (null). msg: Failed to create segment with key -626102863, size 108095602688, flags 1974: 无效的参数

#0 0x00007ffff67c6387 in raise () from /lib64/libc.so.6 #1 0x00007ffff67c7a78 in abort () from /lib64/libc.so.6 #2 0x00007ffff70d6a95 in __gnu_cxx::__verbose_terminate_handler() () from /lib64/libstdc++.so.6 #3 0x00007ffff70d4a06 in ?? () from /lib64/libstdc++.so.6 #4 0x00007ffff70d4a33 in std::terminate() () from /lib64/libstdc++.so.6 #5 0x00007ffff70d4c53 in __cxa_throw () from /lib64/libstdc++.so.6 #6 0x0000000000f8d391 in __cxxabiv1::__cxa_throw (thrownException=thrownException@entry=0x1fef8d0, type=0x1823b60 <_ZTISt16invalid_argument@@GLIBCXX_3.4>, destructor=) at /root/CacheLib/cachelib/external/folly/folly/experimental/exception_tracer/ExceptionTracerLib.cpp:159 #7 0x000000000043befb in facebook::cachelib::ShmManager::createShm (this=, shmName="shm_cache", size=, addr=, opts=...) at /opt/rh/devtoolset-9/root/usr/include/c++/9/ext/new_allocator.h:89 #8 0x0000000000a94857 in facebook::cachelib::CacheAllocatorfacebook::cachelib::LruCacheTrait::createNewMemoryAllocator (this=0x30f0b90) at /opt/rh/devtoolset-9/root/usr/include/c++/9/bits/unique_ptr.h:360 #9 0x0000000000ad5ef5 in facebook::cachelib::CacheAllocatorfacebook::cachelib::LruCacheTrait::initAllocator (this=this@entry=0x30f0b90, type=type@entry=facebook::cachelib::CacheAllocatorfacebook::cachelib::LruCacheTrait::kMemNew) at /opt/rh/devtoolset-9/root/usr/include/c++/9/bits/stl_tree.h:720 #10 0x0000000000b5ee0e in facebook::cachelib::CacheAllocatorfacebook::cachelib::LruCacheTrait::CacheAllocator (this=0x30f0b90, type=facebook::cachelib::CacheAllocatorfacebook::cachelib::LruCacheTrait::kMemNew, config=...) at /root/CacheLib/cachelib/../cachelib/allocator/MMLru.h:192 #11 0x0000000000c0029b in facebook::cachelib::CacheAllocatorfacebook::cachelib::LruCacheTrait::CacheAllocator (this=0x30f0b90, config=...) at /root/CacheLib/cachelib/../cachelib/allocator/CacheAllocator-inl.h:29 #12 0x0000000000812729 in std::make_unique<facebook::cachelib::CacheAllocatorfacebook::cachelib::LruCacheTrait, facebook::cachelib::CacheAllocatorfacebook::cachelib::LruCacheTrait::SharedMemNewT, facebook::cachelib::CacheAllocatorConfig<facebook::cachelib::CacheAllocatorfacebook::cachelib::LruCacheTrait >&>(facebook::cachelib::CacheAllocatorfacebook::cachelib::LruCacheTrait::SharedMemNewT&&, facebook::cachelib::CacheAllocatorConfig<facebook::cachelib::CacheAllocatorfacebook::cachelib::LruCacheTrait >&) () at /opt/rh/devtoolset-9/root/usr/include/c++/9/bits/unique_ptr.h:857 #13 0x000000000080e166 in CCacheLibManager::InitializeCache (this=0x7fffffffb2d0, cacheSize=108095602688) at CacheLibManager.cpp:48

ycchildcoder avatar Mar 31 '25 10:03 ycchildcoder