[SERVER-38495] Freebsd 11.2 mongod 4.0.4 cannot start server Created: 10/Dec/18  Updated: 24/Dec/18  Resolved: 24/Dec/18

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

Type: Bug Priority: Major - P3
Reporter: Evelio M Segura Assignee: Kelsey Schubert
Resolution: Incomplete Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Steps To Reproduce:

just run the same command on FreeBSD 11.2 after compiling the core mongo(d,s)  programs

Participants:

 Description   

I compiled the code (4.0.4) for Freebsd 11.2 however when I try to run the server I get errors.

here is the command:

{{}}

{{}}

su -m mongodb -c "mongod --replSet reps0 --configsvr --bind_ip localhost,192.168.2.31 --enableMajorityReadConcern=false --smallfiles"

{{}}

{{}}

here is the output:

{{}}
 2018-12-09T21:06:13.729-0500 I CONTROL [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'2018-12-09T21:06:13.730-0500 W CONTROL [main] Config servers require majority read concern, but it was explicitly disabled. The override is being ignored and the process is continuing with majority read concern enabled.2018-12-09T21:06:13.755-0500 I CONTROL [initandlisten] MongoDB starting : pid=4242 port=27019 dbpath=/data/configdb 64-bit host=configsvr22018-12-09T21:06:13.755-0500 I CONTROL [initandlisten] db version v4.0.42018-12-09T21:06:13.755-0500 I CONTROL [initandlisten] git version: f288a3bdf201007f3693c58e140056adf8b048392018-12-09T21:06:13.755-0500 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.2p 14 Aug 20182018-12-09T21:06:13.755-0500 I CONTROL [initandlisten] allocator: system2018-12-09T21:06:13.755-0500 I CONTROL [initandlisten] modules: none2018-12-09T21:06:13.755-0500 I CONTROL [initandlisten] build environment:2018-12-09T21:06:13.755-0500 I CONTROL [initandlisten] distarch: x86_642018-12-09T21:06:13.756-0500 I CONTROL [initandlisten] target_arch: x86_642018-12-09T21:06:13.756-0500 I CONTROL [initandlisten] options: { net:

{ bindIp: "localhost,192.168.2.31" }

, replication:

{ enableMajorityReadConcern: false, replSet: "reps0" }

, sharding:

{ clusterRole: "configsvr" }

, storage: { mmapv1:

{ smallFiles: true }

} }2018-12-09T21:06:13.757-0500 W STORAGE [initandlisten] Detected unclean shutdown - /data/configdb/mongod.lock is not empty.2018-12-09T21:06:13.757-0500 I STORAGE [initandlisten] Detected data files in /data/configdb created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'.2018-12-09T21:06:13.757-0500 W STORAGE [initandlisten] Recovering data from the last clean checkpoint.2018-12-09T21:06:13.757-0500 I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=256M,session_max=20000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),statistics_log=(wait=0),verbose=(recovery_progress),2018-12-09T21:06:18.939-0500 I STORAGE [initandlisten] WiredTiger message [1544407578:939771][4242:0x809016000], txn-recover: Main recovery loop: starting at 5/256 to 6/2562018-12-09T21:06:18.940-0500 I STORAGE [initandlisten] WiredTiger message [1544407578:940393][4242:0x809016000], txn-recover: Recovering log 5 through 62018-12-09T21:06:19.125-0500 I STORAGE [initandlisten] WiredTiger message [1544407579:125931][4242:0x809016000], txn-recover: Recovering log 6 through 62018-12-09T21:06:19.293-0500 I STORAGE [initandlisten] WiredTiger message [1544407579:293083][4242:0x809016000], txn-recover: Set global recovery timestamp: 02018-12-09T21:06:19.938-0500 I RECOVERY [initandlisten] WiredTiger recoveryTimestamp. Ts: Timestamp(0, 0)2018-12-09T21:06:19.952-0500 W STORAGE [initandlisten] Detected configuration for non-active storage engine mmapv1 when current storage engine is wiredTiger2018-12-09T21:06:19.952-0500 I CONTROL [initandlisten]2018-12-09T21:06:19.953-0500 I CONTROL [initandlisten] ** WARNING: Access control is not enabled for the database.2018-12-09T21:06:19.953-0500 I CONTROL [initandlisten] ** Read and write access to data and configuration is unrestricted.2018-12-09T21:06:19.953-0500 I CONTROL [initandlisten]2018-12-09T21:06:19.953-0500 I CONTROL [initandlisten]2018-12-09T21:06:19.953-0500 I CONTROL [initandlisten] ** WARNING: soft rlimits too low. rlimits set to 5734 processes, 28224 files. Number of processes should be at least 14112 : 0.5 times number of files.2018-12-09T21:06:19.960-0500 I STORAGE [initandlisten] Dropping unknown ident: collection-0-72206259762108945922018-12-09T21:06:19.963-0500 I STORAGE [initandlisten] Dropping unknown ident: index-1-72206259762108945922018-12-09T21:06:19.966-0500 I STORAGE [initandlisten] createCollection: local.startup_log with generated UUID: 6bd04d82-c362-44bc-8158-61b41a1d4d652018-12-09T21:06:19.995-0500 I FTDC [initandlisten] Initializing full-time diagnostic data capture with directory '/data/configdb/diagnostic.data'2018-12-09T21:06:19.997-0500 F - [free_mon] terminate() called. An exception is active; attempting to gather more information2018-12-09T21:06:19.997-0500 I SHARDING [thread1] creating distributed lock ping thread for process ConfigServer (sleeping for 30000ms)2018-12-09T21:06:19.997-0500 I STORAGE [initandlisten] createCollection: local.replset.oplogTruncateAfterPoint with generated UUID: 981703fb-72a5-484e-8075-344a2eac0ee82018-12-09T21:06:20.000-0500 F - [free_mon] DBException::toString(): NotYetInitialized: no replset config has been receivedActual exception type: mongo::error_details::ExceptionForImpl<(mongo::ErrorCodes::Error)94, mongo::AssertionException>0x343446b 0x3433ddf 0x80558eeb8 0x80558ef21 0x80558f163 0x1951238 0x1959073 0x19df4d4----- BEGIN BACKTRACE -----{"backtrace":[

{"b":"1021000","o":"241346B","s":"_ZN5mongo15printStackTraceERSo"}

,

{"b":"1021000","o":"2412DDF","s":"_ZN5mongo29reportOutOfMemoryErrorAndExitEv"}

,

{"b":"805500000","o":"8EEB8","s":"_ZSt17rethrow_exceptionNSt15__exception_ptr13exception_ptrE"}

,

{"b":"805500000","o":"8EF21","s":"_ZSt9terminatev"}

,

{"b":"805500000","o":"8F163","s":"__cxa_throw"}

,

{"b":"1021000","o":"930238","s":"_ZN5mongo13error_details23throwExceptionForStatusERKNS_6StatusE"}

,

{"b":"1021000","o":"938073","s":"_ZN5mongo21uassertedWithLocationERKNS_6StatusEPKcj"}

,

{"b":"1021000","o":"9BE4D4","s":"_ZN5mongo4repl19CmdReplSetGetConfig3runEPNS_16OperationContextERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_7BSONObjERNS_14BSONObjBuilderE"}

],"processInfo":{ "mongodbVersion" : "4.0.4", "gitVersion" : "f288a3bdf201007f3693c58e140056adf8b04839", "compiledModules" : [], "uname" :

{ "sysname" : "FreeBSD", "release" : "11.2-RELEASE", "version" : "FreeBSD 11.2-RELEASE #0 r335510: Fri Jun 22 04:32:14 UTC 2018 root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC", "machine" : "amd64" }

}} mongod(ZN5mongo15printStackTraceERSo+0x3B) [0x343446b] mongod(_ZN5mongo29reportOutOfMemoryErrorAndExitEv+0x60F) [0x3433ddf] libstdc+.so.6(_ZSt17rethrow_exceptionNSt15exception_ptr13exception_ptrE+0x78) [0x80558eeb8] libstdc.so.6(_ZSt9terminatev+0x11) [0x80558ef21] libstdc+.so.6(cxa_throw+0x43) [0x80558f163] mongod(_ZN5mongo13error_details23throwExceptionForStatusERKNS_6StatusE+0x2748) [0x1951238] mongod(_ZN5mongo21uassertedWithLocationERKNS_6StatusEPKcj+0x191) [0x1959073] mongod(_ZN5mongo4repl19CmdReplSetGetConfig3runEPNS_16OperationContextERKNSt7_cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_7BSONObjERNS_14BSONObjBuilderE+0xA4) [0x19df4d4]----- END BACKTRACE -----Abort
My company is testing the move to 4+ version. 

{{}}

{{}}

{{}}



 Comments   
Comment by Kelsey Schubert [ 24/Dec/18 ]

Hi yami,

Thank you very much for the report and update! Since this issue was resolved after upgrading your system and we haven't been able to reproduce this issue on our side yet. I'm going to resolve this ticket for the time being. Please let us know if this issue is still a problem for you or if you could share steps to readily reproduce this behavior.

Kind regards,
Kelsey

Comment by Evelio M Segura [ 11/Dec/18 ]

I upgraded our systems to freebsd 12 and now everything works, even before recompiling the code. I used clang this time and it also made the code a bit smaller without even passing optimization flags myself. Just more info for you guys.

Comment by Evelio M Segura [ 10/Dec/18 ]

My output wasn't that great and I couldn't edit the original post so I am re-posting so it is clearer and also I tried a couple of things to make it work... It still doesn't though.

First I cleared the /data directory, then after reading the documentation a bit more I found out that some of those options were for the deprecated MMAPV engine, and then I ran this command:

$ mongod --replSet "replSet1" --configsvr --bind_ip localhost,192.168.2.31 --storageEngine wiredTiger --enableMajorityReadConcern=false

 This is the result I got

 

2018-12-10T10:38:27.060-0500 I CONTROL  [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'
2018-12-10T10:38:27.061-0500 W CONTROL  [main] Config servers require majority read concern, but it was explicitly disabled. The override is being ignored and the process is continuing with majority read concern enabled.
2018-12-10T10:38:27.085-0500 I CONTROL  [initandlisten] MongoDB starting : pid=918 port=27019 dbpath=/data/configdb 64-bit host=configsvr2
2018-12-10T10:38:27.085-0500 I CONTROL  [initandlisten] db version v4.0.4
2018-12-10T10:38:27.085-0500 I CONTROL  [initandlisten] git version: f288a3bdf201007f3693c58e140056adf8b04839
2018-12-10T10:38:27.085-0500 I CONTROL  [initandlisten] OpenSSL version: OpenSSL 1.0.2p  14 Aug 2018
2018-12-10T10:38:27.086-0500 I CONTROL  [initandlisten] allocator: system
2018-12-10T10:38:27.086-0500 I CONTROL  [initandlisten] modules: none
2018-12-10T10:38:27.086-0500 I CONTROL  [initandlisten] build environment:
2018-12-10T10:38:27.086-0500 I CONTROL  [initandlisten]     distarch: x86_64
2018-12-10T10:38:27.086-0500 I CONTROL  [initandlisten]     target_arch: x86_64
2018-12-10T10:38:27.086-0500 I CONTROL  [initandlisten] options: { net: { bindIp: "localhost,192.168.2.31" }, replication: { enableMajorityReadConcern: false, replSet: "replSet1" }, sharding: { clusterRole: "configsvr" }, storage: { engine: "wiredTiger" } }
2018-12-10T10:38:27.088-0500 I STORAGE  [initandlisten] wiredtiger_open config: create,cache_size=256M,session_max=20000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),statistics_log=(wait=0),verbose=(recovery_progress),
2018-12-10T10:38:30.641-0500 I STORAGE  [initandlisten] WiredTiger message [1544456310:641856][918:0x809016000], txn-recover: Set global recovery timestamp: 0
2018-12-10T10:38:30.651-0500 I RECOVERY [initandlisten] WiredTiger recoveryTimestamp. Ts: Timestamp(0, 0)
2018-12-10T10:38:30.673-0500 I CONTROL  [initandlisten]
2018-12-10T10:38:30.674-0500 I CONTROL  [initandlisten] ** WARNING: Access control is not enabled for the database.
2018-12-10T10:38:30.674-0500 I CONTROL  [initandlisten] **          Read and write access to data and configuration is unrestricted.
2018-12-10T10:38:30.674-0500 I CONTROL  [initandlisten] ** WARNING: You are running this process as the root user, which is not recommended.
2018-12-10T10:38:30.674-0500 I CONTROL  [initandlisten]
2018-12-10T10:38:30.674-0500 I CONTROL  [initandlisten]
2018-12-10T10:38:30.674-0500 I CONTROL  [initandlisten] ** WARNING: soft rlimits too low. rlimits set to 5734 processes, 28224 files. Number of processes should be at least 14112 : 0.5 times number of files.
2018-12-10T10:38:30.681-0500 I STORAGE  [initandlisten] createCollection: local.startup_log with generated UUID: 773aff12-e67d-406f-83fe-54b2af237dbd
2018-12-10T10:38:30.705-0500 I FTDC     [initandlisten] Initializing full-time diagnostic data capture with directory '/data/configdb/diagnostic.data'
2018-12-10T10:38:30.708-0500 I STORAGE  [initandlisten] createCollection: local.replset.oplogTruncateAfterPoint with generated UUID: a471bbde-c3e1-40f5-955c-746d82d6ea34
2018-12-10T10:38:30.709-0500 F -        [free_mon] terminate() called. An exception is active; attempting to gather more information
2018-12-10T10:38:30.709-0500 I SHARDING [thread1] creating distributed lock ping thread for process ConfigServer (sleeping for 30000ms)
2018-12-10T10:38:30.715-0500 F -        [free_mon] DBException::toString(): NotYetInitialized: no replset config has been received
Actual exception type: mongo::error_details::ExceptionForImpl<(mongo::ErrorCodes::Error)94, mongo::AssertionException>
 0x343446b 0x3433ddf 0x80558eeb8 0x80558ef21 0x80558f163 0x1951238 0x1959073 0x19df4d4
----- BEGIN BACKTRACE -----
{"backtrace":[{"b":"1021000","o":"241346B","s":"_ZN5mongo15printStackTraceERSo"},{"b":"1021000","o":"2412DDF","s":"_ZN5mongo29reportOutOfMemoryErrorAndExitEv"},{"b":"805500000","o":"8EEB8","s":"_ZSt17rethrow_exceptionNSt15__exception_ptr13exception_ptrE"},{"b":"805500000","o":"8EF21","s":"_ZSt9terminatev"},{"b":"805500000","o":"8F163","s":"__cxa_throw"},{"b":"1021000","o":"930238","s":"_ZN5mongo13error_details23throwExceptionForStatusERKNS_6StatusE"},{"b":"1021000","o":"938073","s":"_ZN5mongo21uassertedWithLocationERKNS_6StatusEPKcj"},{"b":"1021000","o":"9BE4D4","s":"_ZN5mongo4repl19CmdReplSetGetConfig3runEPNS_16OperationContextERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_7BSONObjERNS_14BSONObjBuilderE"}],"processInfo":{ "mongodbVersion" : "4.0.4", "gitVersion" : "f288a3bdf201007f3693c58e140056adf8b04839", "compiledModules" : [], "uname" : { "sysname" : "FreeBSD", "release" : "11.2-RELEASE-p5", "version" : "FreeBSD 11.2-RELEASE-p5 #0: Tue Nov 27 09:33:52 UTC 2018     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC", "machine" : "amd64" } }}
 mongod(_ZN5mongo15printStackTraceERSo+0x3B) [0x343446b]
 mongod(_ZN5mongo29reportOutOfMemoryErrorAndExitEv+0x60F) [0x3433ddf]
 libstdc++.so.6(_ZSt17rethrow_exceptionNSt15__exception_ptr13exception_ptrE+0x78) [0x80558eeb8]
 libstdc++.so.6(_ZSt9terminatev+0x11) [0x80558ef21]
 libstdc++.so.6(__cxa_throw+0x43) [0x80558f163]
 mongod(_ZN5mongo13error_details23throwExceptionForStatusERKNS_6StatusE+0x2748) [0x1951238]
 mongod(_ZN5mongo21uassertedWithLocationERKNS_6StatusEPKcj+0x191) [0x1959073]
 mongod(_ZN5mongo4repl19CmdReplSetGetConfig3runEPNS_16OperationContextERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_7BSONObjERNS_14BSONObjBuilderE+0xA4) [0x19df4d4]
-----  END BACKTRACE  -----
Abort (core dumped)

Hopefully this makes it better for us to see what is wrong. My theory is that the initial sync is not happenning correctly when starting mongod as a replica set without it being a prior db installed there. Thoughts?

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