[SERVER-28156] mongod crashes with --setParameter replIndexPrefetch=none Created: 01/Mar/17  Updated: 27/Oct/23  Resolved: 04/Jan/20

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

Type: Bug Priority: Major - P3
Reporter: Andrew Wason Assignee: Backlog - Replication Team
Resolution: Gone away Votes: 1
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Replication
Operating System: ALL
Participants:

 Description   

Specifying --setParameter replIndexPrefetch=none or --setParameter replIndexPrefetch=_id_only crashes mongod on startup.

$ mongod --port 27019 --dbpath /tmp/mongo --replSet testing --setParameter replIndexPrefetch=none
2017-03-01T16:58:00.773+0000 I REPL     [main] changing replication index prefetch behavior to none
2017-03-01T16:58:00.774+0000 I -        [main] Fatal Assertion 17508 at src/mongo/db/service_context.cpp 59
2017-03-01T16:58:00.774+0000 I -        [main]
 
***aborting after fassert() failure
 
 
2017-03-01T16:58:00.790+0000 F -        [main] Got signal: 6 (Aborted).
 
 0x7f77f5384c71 0x7f77f5383d69 0x7f77f538424d 0x7f77f2a65330 0x7f77f26c6c37 0x7f77f26ca028 0x7f77f460cc15 0x7f77f4f5a09a 0x7f77f4f5a129 0x7f77f4dd3189 0x7f77f4c2933d 0x7f77f4f4fe20 0x7f77f4ace3a5 0x7f77f467aeb5 0x7f77f4677043 0x7f77f468582c 0x7f77f4685fb2 0x7f77f4617d94 0x7f77f26b1f45 0x7f77f46762ff
----- BEGIN BACKTRACE -----
{"backtrace":[{"b":"7F77F3DFB000","o":"1589C71","s":"_ZN5mongo15printStackTraceERSo"},{"b":"7F77F3DFB000","o":"1588D69"},{"b":"7F77F3DFB000","o":"158924D"},{"b":"7F77F2A55000","o":"10330"},{"b":"7F77F2690000","o":"36C37","s":"gsignal"},{"b":"7F77F2690000","o":"3A028","s":"abort"},{"b":"7F77F3DFB000","o":"811C15","s":"_ZN5mongo32fassertFailedNoTraceWithLocationEiPKcj"},{"b":"7F77F3DFB000","o":"115F09A"},{"b":"7F77F3DFB000","o":"115F129"},{"b":"7F77F3DFB000","o":"FD8189","s":"_ZN5mongo4repl31getGlobalReplicationCoordinatorEv"},{"b":"7F77F3DFB000","o":"E2E33D","s":"_ZN5mongo4repl17ReplIndexPrefetch13setFromStringERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE"},{"b":"7F77F3DFB000","o":"1154E20","s":"_ZN5mongo18storeServerOptionsERKNS_17optionenvironment11EnvironmentE"},{"b":"7F77F3DFB000","o":"CD33A5","s":"_ZN5mongo18storeMongodOptionsERKNS_17optionenvironment11EnvironmentE"},{"b":"7F77F3DFB000","o":"87FEB5","s":"_ZN5mongo45_mongoInitializerFunction_MongodOptions_StoreEPNS_18InitializerContextE"},{"b":"7F77F3DFB000","o":"87C043","s":"_ZNSt17_Function_handlerIFN5mongo6StatusEPNS0_18InitializerContextEEPS4_E9_M_invokeERKSt9_Any_dataOS3_"},{"b":"7F77F3DFB000","o":"88A82C","s":"_ZNK5mongo11Initializer7executeERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EERKSt3mapIS7_S7_St4lessIS7_ESaISt4pairIKS7_S7_EEE"},{"b":"7F77F3DFB000","o":"88AFB2","s":"_ZN5mongo21runGlobalInitializersEiPKPKcS3_"},{"b":"7F77F3DFB000","o":"81CD94","s":"main"},{"b":"7F77F2690000","o":"21F45","s":"__libc_start_main"},{"b":"7F77F3DFB000","o":"87B2FF"}]}
 mongod(_ZN5mongo15printStackTraceERSo+0x41) [0x7f77f5384c71]
 mongod(+0x1588D69) [0x7f77f5383d69]
 mongod(+0x158924D) [0x7f77f538424d]
 libpthread.so.0(+0x10330) [0x7f77f2a65330]
 libc.so.6(gsignal+0x37) [0x7f77f26c6c37]
 libc.so.6(abort+0x148) [0x7f77f26ca028]
 mongod(_ZN5mongo32fassertFailedNoTraceWithLocationEiPKcj+0x0) [0x7f77f460cc15]
 mongod(+0x115F09A) [0x7f77f4f5a09a]
 mongod(+0x115F129) [0x7f77f4f5a129]
 mongod(_ZN5mongo4repl31getGlobalReplicationCoordinatorEv+0x9) [0x7f77f4dd3189]
 mongod(_ZN5mongo4repl17ReplIndexPrefetch13setFromStringERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0xFD) [0x7f77f4c2933d]
 mongod(_ZN5mongo18storeServerOptionsERKNS_17optionenvironment11EnvironmentE+0x14F0) [0x7f77f4f4fe20]
 mongod(_ZN5mongo18storeMongodOptionsERKNS_17optionenvironment11EnvironmentE+0x35) [0x7f77f4ace3a5]
 mongod(_ZN5mongo45_mongoInitializerFunction_MongodOptions_StoreEPNS_18InitializerContextE+0x35) [0x7f77f467aeb5]
 mongod(_ZNSt17_Function_handlerIFN5mongo6StatusEPNS0_18InitializerContextEEPS4_E9_M_invokeERKSt9_Any_dataOS3_+0x23) [0x7f77f4677043]
 mongod(_ZNK5mongo11Initializer7executeERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EERKSt3mapIS7_S7_St4lessIS7_ESaISt4pairIKS7_S7_EEE+0x23C) [0x7f77f468582c]
 mongod(_ZN5mongo21runGlobalInitializersEiPKPKcS3_+0x352) [0x7f77f4685fb2]
 mongod(main+0xC4) [0x7f77f4617d94]
 libc.so.6(__libc_start_main+0xF5) [0x7f77f26b1f45]
 mongod(+0x87B2FF) [0x7f77f46762ff]
-----  END BACKTRACE  -----
Aborted



 Comments   
Comment by Judah Schvimer [ 04/Jan/20 ]

This parameter went away with mmapv1 (SERVER-38143), closing Gone Away.

Comment by Spencer Brody (Inactive) [ 27/Oct/17 ]

Several things about this are interesting. First, the feature is only supported on mmapv1, which is deprecated. Second, there are two ways to control this feature. There's a --replIndexPrefetch command line option, which correctly sets the behavior at startup. There is also a setParameter, which correctly controls the behavior at runtime, but if provided at the command line causes the server to crash during startup.

Since the feature is still in use on mmapv1, I propose that the minimum work short term fix is to change the setParamter to be a runtime-only parameter. Then this whole functionality can be removed when mmapv1 is removed down the road.

Comment by Daniel Pasette (Inactive) [ 31/Jul/17 ]

this has been absolutely broken since 3.2.0. we should create a DOCS ticket to remove and rip out the code for it too.

Comment by Mark Agarunov [ 01/Mar/17 ]

Hello rectalogic,

Thank you for the report. We were able to reproduce this issue and are investigating further. We will update the ticket with any new information as it becomes available.

Thanks,
Mark

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