Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a MongoDB instance running in a VMWare VM with Ubuntu Server 12.04. Suddenly the server crashed, and when I try to reinitiate it I get the following error:

jonathanong@ubuntu:~/mongodb/solo$ /usr/bin/mongod --fork --port 27027 --dbpath ~/mongodb/solo --logpath ~/mongodb/solo/mongodb.log
Thu Jan 17 00:54:25   Assertion failure getcwd( buffer , 1000 ) src/mongo/db/cmdline.cpp 188
0xaffd31 0xac65cd 0x6878a8 0x55f070 0x565d39 0x7f2b226d176d 0x558149 
 /usr/bin/mongod(_ZN5mongo15printStackTraceERSo+0x21) [0xaffd31]
 /usr/bin/mongod(_ZN5mongo12verifyFailedEPKcS1_j+0xfd) [0xac65cd]
 /usr/bin/mongod(_ZN5mongo7CmdLine5storeEiPPcRN5boost15program_options19options_descriptionES6_RNS4_30positional_options_descriptionERNS4_13variables_mapE+0x4a38) [0x6878a8]
 /usr/bin/mongod() [0x55f070]
 /usr/bin/mongod(main+0x9) [0x565d39]
 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed) [0x7f2b226d176d]
 /usr/bin/mongod(__gxx_personality_v0+0x471) [0x558149]
Thu Jan 17 00:54:25 terminate() called, printing stack (if implemented for platform):
0xaffd31 0x55840e 0x7f2b23036846 0x7f2b23036873 0x7f2b2303696e 0xac6776 0x6878a8 0x55f070 0x565d39 0x7f2b226d176d 0x558149 
 /usr/bin/mongod(_ZN5mongo15printStackTraceERSo+0x21) [0xaffd31]
 /usr/bin/mongod(_ZN5mongo11myterminateEv+0x3e) [0x55840e]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xb5846) [0x7f2b23036846]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xb5873) [0x7f2b23036873]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xb596e) [0x7f2b2303696e]
 /usr/bin/mongod(_ZN5mongo12verifyFailedEPKcS1_j+0x2a6) [0xac6776]
 /usr/bin/mongod(_ZN5mongo7CmdLine5storeEiPPcRN5boost15program_options19options_descriptionES6_RNS4_30positional_options_descriptionERNS4_13variables_mapE+0x4a38) [0x6878a8]
 /usr/bin/mongod() [0x55f070]
 /usr/bin/mongod(main+0x9) [0x565d39]
 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed) [0x7f2b226d176d]
 /usr/bin/mongod(__gxx_personality_v0+0x471) [0x558149]
Thu Jan 17 00:54:25 Got signal: 6 (Aborted).

Thu Jan 17 00:54:25 Backtrace:
0xaffd31 0x558bb9 0x7f2b226e64a0 0x7f2b226e6425 0x7f2b226e9b8b 0x558413 0x7f2b23036846 0x7f2b23036873 0x7f2b2303696e 0xac6776 0x6878a8 0x55f070 0x565d39 0x7f2b226d176d 0x558149 
 /usr/bin/mongod(_ZN5mongo15printStackTraceERSo+0x21) [0xaffd31]
 /usr/bin/mongod(_ZN5mongo10abruptQuitEi+0x399) [0x558bb9]
 /lib/x86_64-linux-gnu/libc.so.6(+0x364a0) [0x7f2b226e64a0]
 /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x35) [0x7f2b226e6425]
 /lib/x86_64-linux-gnu/libc.so.6(abort+0x17b) [0x7f2b226e9b8b]
 /usr/bin/mongod(_ZN5mongo11myterminateEv+0x43) [0x558413]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xb5846) [0x7f2b23036846]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xb5873) [0x7f2b23036873]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xb596e) [0x7f2b2303696e]
 /usr/bin/mongod(_ZN5mongo12verifyFailedEPKcS1_j+0x2a6) [0xac6776]
 /usr/bin/mongod(_ZN5mongo7CmdLine5storeEiPPcRN5boost15program_options19options_descriptionES6_RNS4_30positional_options_descriptionERNS4_13variables_mapE+0x4a38) [0x6878a8]
 /usr/bin/mongod() [0x55f070]
 /usr/bin/mongod(main+0x9) [0x565d39]
 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed) [0x7f2b226d176d]
 /usr/bin/mongod(__gxx_personality_v0+0x471) [0x558149]

This is MongoDB 2.2.2 downloaded from mongodb-10gen: http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/

Any ideas?

Edit: So I just created a new VM from scratch and it's perfectly fine. So this isn't a show stopper for me since I plan to use managed hosting. Still, knowing the problem would be nice!

share|improve this question

2 Answers 2

The first thing to look at is the provided line of code at the top of the crash:

https://github.com/mongodb/mongo/blob/v2.2/src/mongo/db/cmdline.cpp#L188

This is basically getting the current working directory. An odd place to crash - it would suggest a fairly basic problem at the filesystem level - directory not found, or in some other way corrupt.

According to addr2line (see Parsing Stack Traces) the first relevant line (0x6878a8) points here:

https://github.com/mongodb/mongo/blob/v2.2/src/mongo/db/cmdline.cpp#L349

That again points to some sort of issue getting to the relevant mongod folder (probably /var/lib/mongodb or similar). This time the relevant error is:

Cant chdir() while forking server process

Again pointing to a similar root cause in terms of accessing the filesystem/folder that the program is trying to use.

share|improve this answer

Looks like you're OK, but FYI: this just happened to me. Pretty much the same stack trace. The problem was that as I was restarting mongod, my current directory in this shell happened to be one which I had deleted a little while ago (in another shell). That was why getcwd was failing.

share|improve this answer
    
Same thing for me. :) –  Julien Le Coupanec Sep 16 at 15:33

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.