[SERVER-11909] Stacktrace at start of mongod with replset option enabled Created: 01/Dec/13  Updated: 10/Dec/14  Resolved: 02/Dec/13

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: 2.4.8
Fix Version/s: None

Type: Bug Priority: Critical - P2
Reporter: Guillaume Besson [X] Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: crash, replicaset
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Ubuntu Server 12.04


Issue Links:
Duplicate
duplicates SERVER-9032 mongod fails when launched with misco... Closed
Operating System: Linux
Participants:

 Description   

Hello
I have a mongodb server running on a production server and I want to active the ReplicaSet option to ensure none of our data is lost.
When I add the replSet option on the config file, mongod refuse to start and print a stacktrace.

Sun Dec  1 14:14:37.028 terminate() called, printing stack (if implemented for platform):
0xde05e1 0x6cf3de 0x7f94fe0ad846 0x7f94fe0ad873 0x7f94fe0ad96e 0x7f94fe05aa07 0x7f94fe06a284 0x7f94fe05ea74 0x7f94fe05fb6b 0xdfde3f 0xdfe78b 0xdfb430 0x9ee8ff 0x6dd6b0 0x6df459 0x7f94fd74876d 0x6cf1c9 
 /usr/bin/mongod(_ZN5mongo15printStackTraceERSo+0x21) [0xde05e1]
 /usr/bin/mongod(_ZN5mongo11myterminateEv+0x3e) [0x6cf3de]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xb5846) [0x7f94fe0ad846]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xb5873) [0x7f94fe0ad873]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xb596e) [0x7f94fe0ad96e]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZSt21__throw_runtime_errorPKc+0x57) [0x7f94fe05aa07]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x72284) [0x7f94fe06a284]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZNSt6locale5_ImplC1EPKcm+0x44) [0x7f94fe05ea74]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZNSt6localeC1EPKc+0x73b) [0x7f94fe05fb6b]
 /usr/bin/mongod(_ZN5boost11filesystem34path21wchar_t_codecvt_facetEv+0x4f) [0xdfde3f]
 /usr/bin/mongod(_ZNK5boost11filesystem34path14root_directoryEv+0xbb) [0xdfe78b]
 /usr/bin/mongod(_ZN5boost11filesystem38absoluteERKNS0_4pathES3_+0x40) [0xdfb430]
 /usr/bin/mongod(_ZN5mongo27initializeServerGlobalStateEb+0x15f) [0x9ee8ff]
 /usr/bin/mongod() [0x6dd6b0]
 /usr/bin/mongod(main+0x9) [0x6df459]
 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed) [0x7f94fd74876d]
 /usr/bin/mongod(__gxx_personality_v0+0x499) [0x6cf1c9]
Sun Dec  1 14:14:37.031 Got signal: 6 (Aborted).
 
Sun Dec  1 14:14:37.033 Backtrace:
0xde05e1 0x6d0559 0x7f94fd75d4a0 0x7f94fd75d425 0x7f94fd760b8b 0x6cf3e3 0x7f94fe0ad846 0x7f94fe0ad873 0x7f94fe0ad96e 0x7f94fe05aa07 0x7f94fe06a284 0x7f94fe05ea74 0x7f94fe05fb6b 0xdfde3f 0xdfe78b 0xdfb430 0x9ee8ff 0x6dd6b0 0x6df459 0x7f94fd74876d 
 /usr/bin/mongod(_ZN5mongo15printStackTraceERSo+0x21) [0xde05e1]
 /usr/bin/mongod(_ZN5mongo10abruptQuitEi+0x399) [0x6d0559]
 /lib/x86_64-linux-gnu/libc.so.6(+0x364a0) [0x7f94fd75d4a0]
 /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x35) [0x7f94fd75d425]
 /lib/x86_64-linux-gnu/libc.so.6(abort+0x17b) [0x7f94fd760b8b]
 /usr/bin/mongod(_ZN5mongo11myterminateEv+0x43) [0x6cf3e3]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xb5846) [0x7f94fe0ad846]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xb5873) [0x7f94fe0ad873]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xb596e) [0x7f94fe0ad96e]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZSt21__throw_runtime_errorPKc+0x57) [0x7f94fe05aa07]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x72284) [0x7f94fe06a284]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZNSt6locale5_ImplC1EPKcm+0x44) [0x7f94fe05ea74]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZNSt6localeC1EPKc+0x73b) [0x7f94fe05fb6b]
 /usr/bin/mongod(_ZN5boost11filesystem34path21wchar_t_codecvt_facetEv+0x4f) [0xdfde3f]
 /usr/bin/mongod(_ZNK5boost11filesystem34path14root_directoryEv+0xbb) [0xdfe78b]
 /usr/bin/mongod(_ZN5boost11filesystem38absoluteERKNS0_4pathES3_+0x40) [0xdfb430]
 /usr/bin/mongod(_ZN5mongo27initializeServerGlobalStateEb+0x15f) [0x9ee8ff]
 /usr/bin/mongod() [0x6dd6b0]
 /usr/bin/mongod(main+0x9) [0x6df459]
 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed) [0x7f94fd74876d]

Here is the config file:

dbpath=/var/lib/mongodb
logpath=/var/log/mongodb/mongodb.log
logappend=true
port = 27017
replSet = dmoprod



 Comments   
Comment by Eric Milkie [ 02/Dec/13 ]

No problem.

In the 2.6 version of MongoDB, it will no longer print a messy stack trace; instead it prints the error that boost is throwing (bad locale name), so it's easier to figure out what the problem is.

Comment by Guillaume Besson [X] [ 02/Dec/13 ]

In fact, I had fr_FR.utf8 but it wasn't installed.
It's fixed now, you really saved my day ! Thanks !

Comment by Eric Milkie [ 02/Dec/13 ]

Do you have any LC_ environment variables? If any of them are set wrong, boost will still throw a "name not valid" exception.

Comment by Guillaume Besson [X] [ 02/Dec/13 ]

I don't think it's the same issue.
Locals on the server are correctly installed:

$ locale -a
C
C.UTF-8
en_AG
en_AG.utf8
en_AU.utf8
en_BW.utf8
en_CA.utf8
en_DK.utf8
en_GB.utf8
en_HK.utf8
en_IE.utf8
en_IN
en_IN.utf8
en_NG
en_NG.utf8
en_NZ.utf8
en_PH.utf8
en_SG.utf8
en_US.utf8
en_ZA.utf8
en_ZM
en_ZM.utf8
en_ZW.utf8
POSIX

And starting mongod while forcing LANG variable also crash:

$ LANG=en_US.utf8 mongod --config /etc/mongodb.conf
Mon Dec  2 14:53:03.413 terminate() called, printing stack (if implemented for platform):
0xde05e1 0x6cf3de 0x7f858d791846 0x7f858d791873 0x7f858d79196e 0x7f858d73ea07 0x7f858d74e284 0x7f858d742a74 0x7f858d743b6b 0xdfde3f 0xdfe78b 0xdfb430 0x9ee8ff 0x6dd6b0 0x6df459 0x7f858ce2c76d 0x6cf1c9 
 mongod(_ZN5mongo15printStackTraceERSo+0x21) [0xde05e1]
 mongod(_ZN5mongo11myterminateEv+0x3e) [0x6cf3de]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xb5846) [0x7f858d791846]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xb5873) [0x7f858d791873]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xb596e) [0x7f858d79196e]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZSt21__throw_runtime_errorPKc+0x57) [0x7f858d73ea07]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x72284) [0x7f858d74e284]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZNSt6locale5_ImplC1EPKcm+0x44) [0x7f858d742a74]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZNSt6localeC1EPKc+0x73b) [0x7f858d743b6b]
 mongod(_ZN5boost11filesystem34path21wchar_t_codecvt_facetEv+0x4f) [0xdfde3f]
 mongod(_ZNK5boost11filesystem34path14root_directoryEv+0xbb) [0xdfe78b]
 mongod(_ZN5boost11filesystem38absoluteERKNS0_4pathES3_+0x40) [0xdfb430]
 mongod(_ZN5mongo27initializeServerGlobalStateEb+0x15f) [0x9ee8ff]
 mongod() [0x6dd6b0]
 mongod(main+0x9) [0x6df459]
 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed) [0x7f858ce2c76d]
 mongod(__gxx_personality_v0+0x499) [0x6cf1c9]
Mon Dec  2 14:53:03.417 Got signal: 6 (Aborted).
 
Mon Dec  2 14:53:03.419 Backtrace:
0xde05e1 0x6d0559 0x7f858ce414a0 0x7f858ce41425 0x7f858ce44b8b 0x6cf3e3 0x7f858d791846 0x7f858d791873 0x7f858d79196e 0x7f858d73ea07 0x7f858d74e284 0x7f858d742a74 0x7f858d743b6b 0xdfde3f 0xdfe78b 0xdfb430 0x9ee8ff 0x6dd6b0 0x6df459 0x7f858ce2c76d 
 mongod(_ZN5mongo15printStackTraceERSo+0x21) [0xde05e1]
 mongod(_ZN5mongo10abruptQuitEi+0x399) [0x6d0559]
 /lib/x86_64-linux-gnu/libc.so.6(+0x364a0) [0x7f858ce414a0]
 /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x35) [0x7f858ce41425]
 /lib/x86_64-linux-gnu/libc.so.6(abort+0x17b) [0x7f858ce44b8b]
 mongod(_ZN5mongo11myterminateEv+0x43) [0x6cf3e3]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xb5846) [0x7f858d791846]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xb5873) [0x7f858d791873]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xb596e) [0x7f858d79196e]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZSt21__throw_runtime_errorPKc+0x57) [0x7f858d73ea07]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x72284) [0x7f858d74e284]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZNSt6locale5_ImplC1EPKcm+0x44) [0x7f858d742a74]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZNSt6localeC1EPKc+0x73b) [0x7f858d743b6b]
 mongod(_ZN5boost11filesystem34path21wchar_t_codecvt_facetEv+0x4f) [0xdfde3f]
 mongod(_ZNK5boost11filesystem34path14root_directoryEv+0xbb) [0xdfe78b]
 mongod(_ZN5boost11filesystem38absoluteERKNS0_4pathES3_+0x40) [0xdfb430]
 mongod(_ZN5mongo27initializeServerGlobalStateEb+0x15f) [0x9ee8ff]
 mongod() [0x6dd6b0]
 mongod(main+0x9) [0x6df459]
 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed) [0x7f858ce2c76d]

Comment by Eric Milkie [ 02/Dec/13 ]

This is a duplicate of an already-reported issue; please see the linked ticket for more information.

Comment by Guillaume Besson [X] [ 02/Dec/13 ]

In fact, no. I have activated the option vvvvv = true but it doesn't change anything.
It only print this error.
I start the server with the command :

$ mongod -f /etc/mongodb.conf

Comment by Eliot Horowitz (Inactive) [ 02/Dec/13 ]

There should be some more information right above when you copied.
Can you send the entire log?

Generated at Thu Feb 08 03:27:04 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.