[SERVER-18938] Inserting $id will crash Secondaries Created: 11/Jun/15  Updated: 25/Jun/15  Resolved: 25/Jun/15

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

Type: Bug Priority: Major - P3
Reporter: Andre de Frere Assignee: Ramon Fernandez Marina
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-6833 Secondary crashes when replicating a ... Closed
Related
related to SERVER-12209 _id with $prefix field causes replica... Closed
Operating System: ALL
Participants:

 Description   

The following insert will crash all Secondaries in a replica set (in 2.4):

db.foo.insert( {_id : { $id : "a" } } )

The following stack is thrown:

Fri Jun 12 09:06:05.801 [repl writer worker 1] ERROR: writer worker caught exception: invalid operator: $id on: { ts: Timestamp 1434063965000|1, h: -5973081331456802799, v: 2, op: "i", ns: "test.foo", o: { _id: { $id: "a" } } }
Fri Jun 12 09:06:05.801 [repl writer worker 1]   Fatal Assertion 16360
0x10045236b 0x10042b587 0x10034162f 0x100432998 0x100484f05 0x7fff8c8db268 0x7fff8c8db1e5 0x7fff8c8d941d
 0   mongod                              0x000000010045236b _ZN5mongo15printStackTraceERSo + 43
 1   mongod                              0x000000010042b587 _ZN5mongo13fassertFailedEi + 151
 2   mongod                              0x000000010034162f _ZN5mongo7replset14multiSyncApplyERKSt6vectorINS_7BSONObjESaIS2_EEPNS0_8SyncTailE + 271
 3   mongod                              0x0000000100432998 _ZN5mongo10threadpool6Worker4loopEv + 138
 4   mongod                              0x0000000100484f05 thread_proxy + 229
 5   libsystem_pthread.dylib             0x00007fff8c8db268 _pthread_body + 131
 6   libsystem_pthread.dylib             0x00007fff8c8db1e5 _pthread_body + 0
 7   libsystem_pthread.dylib             0x00007fff8c8d941d thread_start + 13
Fri Jun 12 09:06:05.805 [repl writer worker 1]
 
***aborting after fassert() failure
 
 
Fri Jun 12 09:06:05.805 Got signal: 6 (Abort trap: 6).
 
Fri Jun 12 09:06:05.807 Backtrace:
0x10045236b 0x100001951 0x7fff8ed4bf1a 0x5 0x7fff8472db53 0x10042b5c5 0x10034162f 0x100432998 0x100484f05 0x7fff8c8db268 0x7fff8c8db1e5 0x7fff8c8d941d
 0   mongod                              0x000000010045236b _ZN5mongo15printStackTraceERSo + 43
 1   mongod                              0x0000000100001951 _ZN5mongo10abruptQuitEi + 225
 2   libsystem_platform.dylib            0x00007fff8ed4bf1a _sigtramp + 26
 3   ???                                 0x0000000000000005 0x0 + 5
 4   libsystem_c.dylib                   0x00007fff8472db53 abort + 129
 5   mongod                              0x000000010042b5c5 _ZN5mongo13fassertFailedEi + 213
 6   mongod                              0x000000010034162f _ZN5mongo7replset14multiSyncApplyERKSt6vectorINS_7BSONObjESaIS2_EEPNS0_8SyncTailE + 271
 7   mongod                              0x0000000100432998 _ZN5mongo10threadpool6Worker4loopEv + 138
 8   mongod                              0x0000000100484f05 thread_proxy + 229
 9   libsystem_pthread.dylib             0x00007fff8c8db268 _pthread_body + 131
 10  libsystem_pthread.dylib             0x00007fff8c8db1e5 _pthread_body + 0
 11  libsystem_pthread.dylib             0x00007fff8c8d941d thread_start + 13

2.6 does not allow the insert, and will not crash



 Comments   
Comment by Ramon Fernandez Marina [ 25/Jun/15 ]

Closing as a duplicate of SERVER-6833, fixed in 2.6.

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