[SERVER-10563] Missing/invalid LOCALE on Solaris results in stacktrace on startup Created: 19/Aug/13  Updated: 14/Apr/16  Resolved: 14/Mar/16

Status: Closed
Project: Core Server
Component/s: Stability
Affects Version/s: 2.4.5
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Daniel Heitepriem Assignee: DO NOT USE - Backlog - Platform Team
Resolution: Done Votes: 0
Labels: 6, abort, code, crash, error
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Solaris Version 5.10 Generic_147441-01 64-bit in Virtual machine


Issue Links:
Duplicate
duplicates SERVER-9032 mongod fails when launched with misco... Closed
Backwards Compatibility: Fully Compatible
Operating System: Solaris
Participants:

 Description   

Hi guys,

I'm trying to start mongod process from a local directory using ssh accessing my virtual machine. Unfortunately mongod crashes with teh following code:

bash-3.2$ cd /export/home/mongodb/mongodb/bin

bash-3.2$ ./mongod --config mongodb.conf

warning: bind_ip of 0.0.0.0 is unnecessary; listens on all ips by default
Mon Aug 19 09:40:04.694 terminate() called, printing stack (if implemented for platform):
0xdd3988 0x92a6ea 0xfffffd7fff1a1f7b 0xfffffd7fff1a1fb3 0xfffffd7fff1a20b2 0xfffffd7fff13e126 0xfffffd7fff19ff29 0xfffffd7fff1468ce 0xfffffd7fff147f85 0xdee220 0xdf0003 0xde633c 0xb3f2de 0x1168439 0x92a49c
/export/home/mongodb/mongodb/bin/mongod'_ZN5mongo15printStackTraceERSo+0x28 [0xdd3988]
/export/home/mongodb/mongodb/bin/mongod'_ZN5mongo11myterminateEv+0x3a [0x92a6ea]
/lib/amd64/libstdc++.so.6'ZN10cxxabiv111_terminateEPFvvE+0xb [0xfffffd7fff1a1f7b]
/lib/amd64/libstdc++.so.6'_ZSt9terminatev+0x13 [0xfffffd7fff1a1fb3]
/lib/amd64/libstdc++.so.6'__cxa_throw+0x62 [0xfffffd7fff1a20b2]
/lib/amd64/libstdc++.so.6'ZSt21_throw_runtime_errorPKc+0x66 [0xfffffd7fff13e126]
/lib/amd64/libstdc++.so.6'ZNSt6locale5facet18_S_create_c_localeERPiPKcS1+0x29 [0xfffffd7fff19ff29]
/lib/amd64/libstdc++.so.6'_ZNSt6locale5_ImplC1EPKcm+0x4e [0xfffffd7fff1468ce]
/lib/amd64/libstdc++.so.6'_ZNSt6localeC1EPKc+0x5d5 [0xfffffd7fff147f85]
/export/home/mongodb/mongodb/bin/mongod'_ZN5boost11filesystem34path21wchar_t_codecvt_facetEv+0x40 [0xdee220]
/export/home/mongodb/mongodb/bin/mongod'_ZNK5boost11filesystem34path14root_directoryEv+0x103 [0xdf0003]
/export/home/mongodb/mongodb/bin/mongod'ZN5boost11filesystem38absoluteERKNS0_4pathES3+0x2c [0xde633c]
/export/home/mongodb/mongodb/bin/mongod'_ZN5mongo27initializeServerGlobalStateEb+0x41e [0xb3f2de]
/export/home/mongodb/mongodb/bin/mongod'main+0x289 [0x1168439]
/export/home/mongodb/mongodb/bin/mongod'_start+0x6c [0x92a49c]
Mon Aug 19 09:40:04.701 Got signal: 6 (Abort).

Mon Aug 19 09:40:04.702 Backtrace:
0xdd3988 0x92b07e 0xfffffd7ffef6d296 0xfffffd7ffef61b62 0xfffffd7ffef72a9a 0xfffffd7ffef17d59 0xfffffd7ffeef688e 0x92a6ef 0xfffffd7fff1a1f7b 0xfffffd7fff1a1fb3 0xfffffd7fff1a20b2 0xfffffd7fff13e126 0xfffffd7fff19ff29 0xfffffd7fff1468ce 0xfffffd7fff147f85 0xdee220 0xdf0003 0xde633c 0xb3f2de 0x1168439
/export/home/mongodb/mongodb/bin/mongod'_ZN5mongo15printStackTraceERSo+0x28 [0xdd3988]
/export/home/mongodb/mongodb/bin/mongod'_ZN5mongo10abruptQuitEi+0x3ce [0x92b07e]
/lib/amd64/libc.so.1'smt_pause+0x166 [0xfffffd7ffef6d296]
/lib/amd64/libc.so.1'_sema_post+0x422 [0xfffffd7ffef61b62]
/lib/amd64/libc.so.1'__lwp_kill+0xa [0xfffffd7ffef72a9a]
/lib/amd64/libc.so.1'raise+0x19 [0xfffffd7ffef17d59]
/lib/amd64/libc.so.1'abort+0x5e [0xfffffd7ffeef688e]
/export/home/mongodb/mongodb/bin/mongod'_ZN5mongo11myterminateEv+0x3f [0x92a6ef]
/lib/amd64/libstdc++.so.6'ZN10cxxabiv111_terminateEPFvvE+0xb [0xfffffd7fff1a1f7b]
/lib/amd64/libstdc++.so.6'_ZSt9terminatev+0x13 [0xfffffd7fff1a1fb3]
/lib/amd64/libstdc++.so.6'__cxa_throw+0x62 [0xfffffd7fff1a20b2]
/lib/amd64/libstdc++.so.6'ZSt21_throw_runtime_errorPKc+0x66 [0xfffffd7fff13e126]
/lib/amd64/libstdc++.so.6'ZNSt6locale5facet18_S_create_c_localeERPiPKcS1+0x29 [0xfffffd7fff19ff29]
/lib/amd64/libstdc++.so.6'_ZNSt6locale5_ImplC1EPKcm+0x4e [0xfffffd7fff1468ce]
/lib/amd64/libstdc++.so.6'_ZNSt6localeC1EPKc+0x5d5 [0xfffffd7fff147f85]
/export/home/mongodb/mongodb/bin/mongod'_ZN5boost11filesystem34path21wchar_t_codecvt_facetEv+0x40 [0xdee220]
/export/home/mongodb/mongodb/bin/mongod'_ZNK5boost11filesystem34path14root_directoryEv+0x103 [0xdf0003]
/export/home/mongodb/mongodb/bin/mongod'ZN5boost11filesystem38absoluteERKNS0_4pathES3+0x2c [0xde633c]
/export/home/mongodb/mongodb/bin/mongod'_ZN5mongo27initializeServerGlobalStateEb+0x41e [0xb3f2de]
/export/home/mongodb/mongodb/bin/mongod'main+0x289 [0x1168439]

Is there any way to fix this error?

P.S.: Sorry for my bad english but I'm from Germany



 Comments   
Comment by Mira Carey [ 14/Mar/16 ]

After SERVER-9032, we now print a warning if a locale is not set, and setting LC_ALL=C works.

Comment by Daniel Heitepriem [ 21/Aug/13 ]

Hi Tad,

thank you for your help. The problem was solved with the final version of 2.4.6. Now my MongoDB is working like it should

Greetings,
Daniel

Comment by Tad Marshall [ 21/Aug/13 ]

Hi Daniel,

Do you mean that you got the abort with the stack trace? You still need export LC_ALL=C.

Or do you mean you got

ld.so.1: mongod: fatal: relocation error: file mongod: symbol posix_fadvise: referenced symbol not found

That should not happen in this version. That symbol is not referenced directly by mongod in that version; it is dynamically linked if available, which cannot cause the fatal relocation error. Can you double-check that you are testing the downloaded 2.4.6-rc1 version? Can you post the complete mongod log?

The final version 2.4.6 was released yesterday, so you can use that version instead.

http://fastdl.mongodb.org/sunos5/mongodb-sunos5-x86_64-2.4.6.tgz

Tad

Comment by Daniel Heitepriem [ 21/Aug/13 ]

Hi Tad,

i tried version 2.4.6-rc1 but i got the same error as before.

Comment by Tad Marshall [ 20/Aug/13 ]

Hi Daniel,

The posix_fadvise error on Solaris is SERVER-7404, fixed in version 2.4.6-rc1.

Can you test http://fastdl.mongodb.org/sunos5/mongodb-sunos5-x86_64-2.4.6-rc1.tgz and let us know if it fixes the problem?

Version 2.4.6-rc1 also fixes SERVER-9832, SERVER-9325, SERVER-9786 and SERVER-8795, all of which were problems on Solaris 10.

I'm interested that your system was able to show a stack trace on Solaris 10. In our testing, Solaris 10 did not have the required functions to produce a stack trace, which is why version 2.4.6-rc1 includes the fix for SERVER-7080. Is your copy of Solaris patched? Our testing was on a recent version of Solaris 10 installed from an ISO downloaded from Oracle's web site.

Your original issue, in which boost::filesystem::path throws an exception when the locale of the running user differs from the locale of the owner of the dbpath directory, is believed to be an incompatibility between Solaris defaults and boost version 1.49. This will still be a problem in version 2.4.6-rc1; you will still need the export LC_ALL=C workaround.

Tad

Comment by Daniel Heitepriem [ 20/Aug/13 ]

Hello Tad,
after running this command and rebooting i got the following error:

ld.so.1: mongod: fatal: relocation error: file mongod: symbol posix_fadvise: referenced symbol not found

Comment by Tad Marshall [ 19/Aug/13 ]

As a workaround, try running this command before starting mongod:

export LC_ALL=C

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