[SERVER-56151] MacOS immediately aborts mongod Created: 18/Apr/21  Updated: 07/May/21  Resolved: 04/May/21

Status: Closed
Project: Core Server
Component/s: Shell
Affects Version/s: 4.4.4
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Alessandro Zanardi Assignee: Edwin Zhou
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File mongo.log    
Operating System: ALL
Steps To Reproduce:

Please see the "description" field with the full crash report.

Participants:

 Description   

I installed MongDB following the steps described here:

https://docs.mongodb.com/manual/tutorial/install-mongodb-on-os-x/

Every time I try to run `mongod` in Terminal, executing `https://docs.mongodb.com/manual/tutorial/install-mongodb-on-os-x/` I get an abort message.

Here below you find the crash report.

Process: mongod [1881] Path: /usr/local/Cellar/mongodb-community/4.4.4/bin/mongod Identifier: mongod Version: 0 Code Type: X86-64 (Native) Parent Process: zsh [1312] Responsible: Terminal [418] User ID: 501
 
Date/Time: 2021-04-18 12:51:36.839 +0200 OS Version: macOS 11.2.3 (20D91) Report Version: 12 Bridge OS Version: 5.2 (18P4347) Anonymous UUID: 36F96353-BAC5-E51D-CA50-97AE95A5F2C7
 
Time Awake Since Boot: 150 seconds
 
System Integrity Protection: disabled
 
Crashed Thread: 0 initandlisten Dispatch queue: com.apple.main-thread
 
Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY
 
Application Specific Information: abort() called
 
Thread 0 Crashed:: initandlisten Dispatch queue: com.apple.main-thread 0 libsystem_kernel.dylib  0x00007fff20449462 *pthread_kill + 10 1 libsystem_pthread.dylib  0x00007fff20477610 pthread_kill + 263 2 libsystem_c.dylib  0x00007fff203ca720 abort + 120 3 mongod  0x00000001102567e7 mongo::fassertFailedWithLocation(int, char const*, unsigned int) + 407 4 mongod  0x000000010e166d76 mongo::WiredTigerKVEngine::_openWiredTiger(std::*1::basic_string<char, std::*1::char_traits<char>, std::*1::allocator<char> > const&, std::*1::basic_string<char, std::*1::char_traits<char>, std::*1::allocator<char> > const&) + 2006 5 mongod  0x000000010e16420e mongo::WiredTigerKVEngine::WiredTigerKVEngine(std::*1::basic_string<char, std::*1::char_traits<char>, std::*1::allocator<char> > const&, std::*1::basic_string<char, std::*1::char_traits<char>, std::*1::allocator<char> > const&, mongo::ClockSource*, std::*1::basic_string<char, std::*1::char_traits<char>, std::*1::allocator<char> > const&, unsigned long, unsigned long, bool, bool, bool, bool) + 5486 6 mongod  0x000000010e168bc8 mongo::WiredTigerKVEngine::WiredTigerKVEngine(std::*1::basic_string<char, std::*1::char_traits<char>, std::*1::allocator<char> > const&, std::*1::basic_string<char, std::*1::char_traits<char>, std::*1::allocator<char> > const&, mongo::ClockSource_, std::*1::basic_string<char, std::*1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long, unsigned long, bool, bool, bool, bool) + 56 7 mongod  0x000000010e142197 mongo::(anonymous namespace)::WiredTigerFactory::create(mongo::StorageGlobalParams const&, mongo::StorageEngineLockFile const_) const + 823 8 mongod  0x000000010ebd35ea mongo::initializeStorageEngine(mongo::ServiceContext_, mongo::StorageEngineInitFlags) + 1914 9 mongod  0x000000010e0fe3c3 mongo::(anonymous namespace)::_initAndListen(mongo::ServiceContext_, int) + 1123 10 mongod  0x000000010e0f3fda mongo::(anonymous namespace)::mongoDbMain(int, char*, char*) + 5594 11 mongod  0x000000010e0f29f9 main + 9 12 libdyld.dylib  0x00007fff20492621 start + 1
 
Thread 1:: SignalHandler 0 libsystem_kernel.dylib  0x00007fff2044ba1e *sigwait + 10 1 libsystem_pthread.dylib  0x00007fff20478033 sigwait + 29 2 mongod  0x000000010ea7d27c mongo::(anonymous namespace)::signalProcessingThread(mongo::LogFileStatus) + 236 3 mongod  0x000000010ea7da59 void* std::*1::*thread_proxy<std::*1::tuple<std::*1::unique_ptr<std::*1::*thread_struct, std::*1::default_delete[std::__1::__thread_struct] >, mongo::stdx::thread::thread<void (_)(mongo::LogFileStatus), mongo::LogFileStatus&, 0>(void (_)(mongo::LogFileStatus), mongo::LogFileStatus&)::'lambda'()> >(void*) + 57 4 libsystem_pthread.dylib  0x00007fff20477950 _pthread_start + 224 5 libsystem_pthread.dylib  0x00007fff2047347b thread_start + 15
 
Thread 2:: BackgroundThreadClockSource 0 libsystem_kernel.dylib  0x00007fff204458e2 *psynch_cvwait + 10 1 libsystem_pthread.dylib  0x00007fff20477e6f _pthread_cond_wait + 1254 2 libc++.1.dylib  0x00007fff203decf2 std::*1::condition_variable::wait(std::*1::unique_lock<std::*1::mutex>&) + 18 3 mongod  0x000000010f01bce2 void std::*1::condition_variable_any::wait<std::*1::unique_lock[std::__1::mutex] >(std::*1::unique_lock<std::*1::mutex>&) + 98 4 mongod  0x0000000110126558 void* std::*1::*thread_proxy<std::*1::tuple<std::*1::unique_ptr<std::*1::*thread_struct, std::*1::default_delete<std::*1::__thread_struct> >, mongo::stdx::thread::thread<mongo::BackgroundThreadClockSource::_startTimerThread()::$_0, 0>(mongo::BackgroundThreadClockSource::_startTimerThread()::$_0)::'lambda'()> >(void*) + 232 5 libsystem_pthread.dylib  0x00007fff20477950 _pthread_start + 224 6 libsystem_pthread.dylib  0x00007fff2047347b thread_start + 15
 
Thread 3:: OCSPManagerHTTP-0 0 libsystem_kernel.dylib  0x00007fff204458e2 *psynch_cvwait + 10 1 libsystem_pthread.dylib  0x00007fff20477e6f _pthread_cond_wait + 1254 2 libc++.1.dylib  0x00007fff203decf2 std::*1::condition_variable::wait(std::*1::unique_lock<std::*1::mutex>&) + 18 3 mongod  0x000000010e186223 void std::*1::condition_variable_any::wait<std::*1::unique_lock[mongo::latch_detail::Latch] >(std::*1::unique_lock[mongo::latch_detail::Latch]&) + 99 4 mongod  0x000000010fde624f mongo::ThreadPool::_consumeTasks() + 783 5 mongod  0x000000010fde5dff mongo::ThreadPool::_workerThreadBody(mongo::ThreadPool*, std::*1::basic_string<char, std::*1::char_traits<char>, std::*1::allocator<char> > const&) + 319 6 mongod  0x000000010fde94de void* std::*1::*thread_proxy<std::*1::tuple<std::*1::unique_ptr<std::*1::*thread_struct, std::*1::default_delete<std::*1::__thread_struct> >, mongo::stdx::thread::thread<mongo::ThreadPool::_startWorkerThread_inlock()::$_17, 0>(mongo::ThreadPool::_startWorkerThread_inlock()::$_17)::'lambda'()> >(void*) + 62 7 libsystem_pthread.dylib  0x00007fff20477950 _pthread_start + 224 8 libsystem_pthread.dylib  0x00007fff2047347b thread_start + 15
 
Thread 4:: FlowControlRefresher 0 libsystem_kernel.dylib  0x00007fff204458e2 *psynch_cvwait + 10 1 libsystem_pthread.dylib  0x00007fff20477e6f _pthread_cond_wait + 1254 2 libc++.1.dylib  0x00007fff203ded83 std::*1::condition_variable::*do_timed_wait(std::*1::unique_lock[std::__1::mutex]&, std::*1::chrono::time_point<std::*1::chrono::system_clock, std::*1::chrono::duration<long long, std::*1::ratio<1l, 1000000000l> > >) + 93 3 mongod  0x000000010e179009 std::*1::cv_status std::*1::condition_variable::wait_until<std::*1::chrono::system_clock, std::*1::chrono::duration<long long, std::*1::ratio<1l, 1000000l> > >(std::*1::unique_lock[std::__1::mutex]&, std::*1::chrono::time_point<std::*1::chrono::system_clock, std::*1::chrono::duration<long long, std::*1::ratio<1l, 1000000l> > > const&) + 121 4 mongod  0x000000010e178e50 std::*1::cv_status std::*1::condition_variable_any::wait_until<mongo::BasicLockableAdapter, std::*1::chrono::system_clock, std::*1::chrono::duration<long long, std::*1::ratio<1l, 1000000l> > >(mongo::BasicLockableAdapter&, std::*1::chrono::time_point<std::*1::chrono::system_clock, std::*1::chrono::duration<long long, std::*1::ratio<1l, 1000000l> > > const&) + 96 5 mongod  0x0000000110126ab3 mongo::ClockSource::waitForConditionUntil(mongo::stdx::condition_variable&, mongo::BasicLockableAdapter, mongo::Date_t, mongo::Waitable_) + 787 6 mongod  0x000000010e80d424 void_ std::*1::*thread_proxy<std::*1::tuple<std::*1::unique_ptr<std::*1::*thread_struct, std::*1::default_delete[std::__1::__thread_struct] >, mongo::stdx::thread::thread<mongo::PeriodicRunnerImpl::PeriodicJobImpl::_run()::$_0, 0>(mongo::PeriodicRunnerImpl::PeriodicJobImpl::_run()::$_0)::'lambda'()> >(void*) + 612 7 libsystem_pthread.dylib  0x00007fff20477950 _pthread_start + 224 8 libsystem_pthread.dylib  0x00007fff2047347b thread_start + 15
 
Thread 0 crashed with X86 Thread State (64-bit):  rax: 0x0000000000000000 rbx: 0x000000011e9d1e00 rcx: 0x00007ffee1b0cf78 rdx: 0x0000000000000000  rdi: 0x0000000000000307 rsi: 0x0000000000000006 rbp: 0x00007ffee1b0cfa0 rsp: 0x00007ffee1b0cf78  r8: 0x00000001122e2a00 r9: 0x00007fd7e5500000 r10: 0x000000011e9d1e00 r11: 0x0000000000000246  r12: 0x0000000000000307 r13: 0x00000001110f84f0 r14: 0x0000000000000006 r15: 0x0000000000000016  rip: 0x00007fff20449462 rfl: 0x0000000000000246 cr2: 0x0000000110e937b8
 
Logical CPU: 0 Error Code: 0x020000b8 Trap Number: 133
 
External Modification Summary:  Calls made by other processes targeting this process:  task_for_pid: 0  thread_create: 0  thread_set_state: 0  Calls made by this process:  task_for_pid: 0  thread_create: 0  thread_set_state: 0  Calls made by all processes on this machine:  task_for_pid: 172  thread_create: 0  thread_set_state: 0
 
VM Region Summary: ReadOnly portion of Libraries: Total=639.9M resident=0K(0%) swapped_out_or_unallocated=639.9M(100%) Writable regions: Total=90.0M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=90.0M(100%)
                            VIRTUAL   REGION 
REGION TYPE SIZE COUNT (non-coalesced)  =========== ======= =======  Activity Tracing 256K 1  Kernel Alloc Once 8K 1  MALLOC 79.2M 23  MALLOC guard page 16K 4  STACK GUARD 56.0M 5  Stack 10.0M 5  VM_ALLOCATE 8K 2  *DATA 4451K 157 * DATA_CONST 6358K 99  *DATA_DIRTY 291K 60 * LINKEDIT 507.2M 4  *OBJC_RO 60.5M 1 * OBJC_RW 2449K 2  *TEXT 132.8M 161 * UNICODE 588K 1  shared memory 8K 2  =========== ======= =======  TOTAL 859.8M 528 
 
Model: MacBookPro15,1, BootROM 1554.80.3.0.0 (iBridge: 18.16.14347.0.0,0), 6 processors, 6-Core Intel Core i7, 2,6 GHz, 16 GB, SMC  Graphics: kHW_IntelUHDGraphics630Item, Intel UHD Graphics 630, spdisplays_builtin Graphics: kHW_AMDRadeonPro560XItem, Radeon Pro 560X, spdisplays_pcie_device, 4 GB Memory Module: BANK 0/ChannelA-DIMM0, 8 GB, DDR4, 2400 MHz, Micron, 8ATF1G64HZ-2G6E1 Memory Module: BANK 2/ChannelB-DIMM0, 8 GB, DDR4, 2400 MHz, Micron, 8ATF1G64HZ-2G6E1 AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x7BF), wl0: Sep 11 2020 16:57:49 version 9.30.440.2.32.5.61 FWID 01-129bddb Bluetooth: Version 8.0.3d9, 3 services, 27 devices, 1 incoming serial ports Network Service: Wi-Fi, AirPort, en0 USB Device: USB 3.1 Bus USB Device: Apple T2 Bus USB Device: Touch Bar Backlight USB Device: Touch Bar Display USB Device: Apple Internal Keyboard / Trackpad USB Device: Headset USB Device: Ambient Light Sensor USB Device: FaceTime HD Camera (Built-in) USB Device: Apple T2 Controller Thunderbolt Bus: MacBook Pro, Apple Inc., 47.4 Thunderbolt Bus: MacBook Pro, Apple Inc., 47.4



 Comments   
Comment by Alessandro Zanardi [ 07/May/21 ]

Hi Edwin,

Regarding this part:

We believe that the events described in the log files were made clear, and we don't think there are any necessary improvements to be made here.

I think when the MongoDB server crashes, besides logging in the background, I think it would be useful to also show an error message in the Terminal, so that the user can react to it.

Can you please pass this info to the dev team?

Thanks!

  Alex

Comment by Edwin Zhou [ 04/May/21 ]

Hi alessandro@zanardi.org,

We're happy to hear that you've been able to resolve the issue by performing a fresh install of MongoDB!

When an unexpected behavior occurs with MongoDB server, the events will be logged to the MongoDB server logs. Unfortunately, Apple's crash report doesn't provide much helpful information regarding crashes related to MongoDB. We believe that the events described in the log files were made clear, and we don't think there are any necessary improvements to be made here.

That being said, we appreciate the quick turnaround in providing us the information needed to help resolve this issue.

Gratefully,
Edwin

Comment by Alessandro Zanardi [ 04/May/21 ]

Hi Edwin,

The issue is already fixed on my side. I had to completely remove MongoDB, anywhere on the system, and reinstall it. After that, it worked.

Even so, it'd be much better for future users who have the same issue if MongoDB printed a useful error message, instead of getting an obscure abort log from Apple.

Maybe the dev team could look into it?

Cheers,

   Alex

Comment by Edwin Zhou [ 03/May/21 ]

Hi alessandro@zanardi.org,

Thank you for providing the log files as requested. After reviewing the logs, it appears that the first time you ran MongoDB was in 2019 and was on version 4.0.4. In 2021, you attempt to run MongoDB v4.4 on the same dbPath. Note that upgrading from version v4.0 to v4.4 will first require an intermediate upgrade to v4.2.

Can you first try to use MongoDB 4.0 on the existing dbPath? If it doesn't start, please attach the same mongo.log file covering the startup and the following crash.

If it does start, I recommend following the upgrade steps to MongoDB v4.2, and from there, to MongoDB v4.4.

Best,

Edwin

Comment by Alessandro Zanardi [ 30/Apr/21 ]

Hi @Edwin,

Here you have it:

mongo.log

Thanks for looking into this!

Comment by Edwin Zhou [ 26/Apr/21 ]

Hi alessandro@zanardi.org,

I apologize for my lack of clarity. Please provide the mongo.log file.

Best,
Edwin

Comment by Alessandro Zanardi [ 26/Apr/21 ]

Hi Edwin,

The directory indicated in the docs, on my computer, only contains "mongo.log" and "output.log".

But you requested "mongod.log".

How would you like me to proceed?

Best,

  Alex

Comment by Edwin Zhou [ 26/Apr/21 ]

Hi alessandro@zanardi.org,

In the documentation you linked, you will be able to find the directories where the logs are stored at the end of the Installing MongoDB 4.4 Community Edition section.

Best,
Edwin

Comment by Alessandro Zanardi [ 26/Apr/21 ]

Hi @Edwin Zhou,

I had to do a complete reset, felete the whole folder, and re-install Mongo.

So I'm afraid the file was lost. Anyways I'll double check it for you.

Considering I followed the instructions here, could you tell me on OSX with a Hombrew installation where the file should be located?

Thanks,

  Alex

 

p.s. for some weird reason the user mentions (like your name at the top of my message) don't seem to be working..

Comment by Edwin Zhou [ 26/Apr/21 ]

Hi alessandro@zanardi.org,

Can you provide the mongod.log file that covers this crash?

Best,
Edwin

Generated at Thu Feb 08 05:38:30 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.