Troubleshooting Typesense Binary Segmentation Fault on a Mac
TLDR Daniel sought help for a segmentation fault while using Typesense on a MacBook Air. Kishore Nallan guided them through the debugging process and suggested that it might be a compatibility issue with the Mac OS version. Daniel plans to try building Typesense on their own.
Jun 10, 2021 (30 months ago)
Daniel
02:19 PM[1] 42001 segmentation fault ./typesense-server --data-dir=/tmp/typesense-data --api-key=xyz
Kishore Nallan
02:19 PMDaniel
02:20 PMtypesense-server-0.20.0-darwin-amd64.tar.gz
Daniel
02:21 PM1.6 GHz Dual-Core Intel Core i5
8 GB 2133 MHz LPDDR3
Kishore Nallan
02:23 PMDaniel
02:23 PMKishore Nallan
02:23 PMDaniel
02:24 PMKishore Nallan
02:25 PMmd5sum typesense-server
The sum should be
a7cc212256a076fc6b9ddbb32351b3d8
Daniel
02:26 PMMD5 (typesense-server) = a7cc212256a076fc6b9ddbb32351b3d8
Kishore Nallan
02:26 PMDaniel
02:27 PMDaniel
02:28 PMKishore Nallan
02:28 PMDaniel
02:41 PMKishore Nallan
02:43 PMDaniel
02:48 PMDaniel
02:50 PM(lldb) bt 150
* thread #1, stop reason = signal SIGSTOP
* frame #0: 0x00000001049a46a5 typesense-server`std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__is_long() const + 21
frame #1: 0x00000001049a3e2c typesense-server`std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::size() const + 28
frame #2: 0x000000010499a435 typesense-server`std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::empty() const + 21
frame #3: 0x000000010499b1fc typesense-server`google::LogMessage::Init(char const*, int, int, void (google::LogMessage::*)()) + 1884
frame #4: 0x000000010499aa76 typesense-server`google::LogMessage::LogMessage(char const*, int, int, int, void (google::LogMessage::*)()) + 102
frame #5: 0x000000010499d768 typesense-server`google::ErrnoLogMessage::ErrnoLogMessage(char const*, int, int, int, void (google::LogMessage::*)()) + 104
frame #6: 0x000000010499d7d8 typesense-server`google::ErrnoLogMessage::ErrnoLogMessage(char const*, int, int, int, void (google::LogMessage::*)()) + 104
frame #7: 0x0000000104321690 typesense-server`bvar::ProcIOReader::operator()(bvar::ProcIO*) const + 208
frame #8: 0x000000010432154c typesense-server`bvar::ProcIO const& bvar::CachedReader<bvar::ProcIO>::get_value<bvar::ProcIOReader>(bvar::ProcIOReader const&) + 156
frame #9: 0x000000010431c911 typesense-server`unsigned long bvar::ProcIOReader::get_field<unsigned long, 0ul>(void*) + 17
frame #10: 0x0000000104322ccc typesense-server`bvar::detail::ReducerSampler<bvar::PassiveStatus<long>, long, bvar::detail::AddTo<long>, bvar::detail::MinusFrom<long> >::take_sample() + 300
frame #11: 0x0000000104350305 typesense-server`bvar::detail::ReducerSampler<bvar::PassiveStatus<unsigned long>, unsigned long, bvar::detail::AddTo<unsigned long>, bvar::detail::MinusFrom<unsigned long> >::ReducerSampler(bvar::PassiveStatus<unsigned long>*) + 85
frame #12: 0x0000000104350033 typesense-server`bvar::detail::WindowBase<bvar::PassiveStatus<unsigned long>, (bvar::SeriesFrequency)1>::WindowBase(bvar::PassiveStatus<unsigned long>*, long) + 115
frame #13: 0x000000010431c204 typesense-server`bvar::PerSecond<bvar::PassiveStatus<unsigned long> >::PerSecond(butil::BasicStringPiece<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > const&, bvar::PassiveStatus<unsigned long>*) + 36
frame #14: 0x0000000104323543 typesense-server`_GLOBAL__sub_I_default_variables.cpp + 1763
frame #15: 0x000000010c47f1d3 dyld`ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) + 535
frame #16: 0x000000010c47f5de dyld`ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) + 40
frame #17: 0x000000010c479ffb dyld`ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, char const*, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 493
frame #18: 0x000000010c4780b4 dyld`ImageLoader::processInitializers(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 188
frame #19: 0x000000010c478154 dyld`ImageLoader::runInitializers(ImageLoader::LinkContext const&, ImageLoader::InitializerTimingList&) + 82
frame #20: 0x000000010c4666a8 dyld`dyld::initializeMainExecutable() + 199
frame #21: 0x000000010c46bbba dyld`dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) + 6667
frame #22: 0x000000010c465227 dyld`dyldbootstrap::start(dyld3::MachOLoaded const*, int, char const**, dyld3::MachOLoaded const*, unsigned long*) + 453
frame #23: 0x000000010c465025 dyld`_dyld_start + 37
Daniel
02:51 PMKishore Nallan
03:05 PMTypesense
Indexed 2776 threads (79% resolved)
Similar Threads
Apple Silicon Binary & Compiling Typesense Issue
Bruno seeks to compile a native Apple Silicon binary of Typesense but encounters issues with RocksDB. Jason and Kishore Nallan assist, but the issue remains unresolved.
Memory Leak Issue in Typesense Server v0.21.0
Jim was experiencing a potential memory leak while load testing an API. Jason and Kishore Nallan suggest it may be a known issue in v0.22.0 RC builds which is resolved in later versions. Jim identifies a specific search filter escalating the issue. Kishore Nallan confirms a fix in the 0.22 RC builds.
Trouble Running Typesense Docker Image on AMD Phenom II X4 955 Processor
Ian struggles to run Typesense on an AMD Phenom II X4 955 Processor, experiencing the docker image to shut down immediately upon startup. Jason and Kishore Nallan suggest multiple troubleshooting steps, identifying the potential issue as the processor's lack of support for MSSE4 flags.
Typesense Connection Issue Resolution
James faced a 'connection refused' error trying to run typesense locally. Kishore Nallan identified an issue due to a glibc upgrade, provided a recent build for James to try and advised a restart after installation. The problem was subsequently resolved.
Resolving Issues with Infix and Prefix in Query Searches
Daren struggled with searches missing values in production. Jason and Kishore Nallan offered insights and created new features to help solve the problem, which was then tested and deployed by Daren.