[SERVER-22431] MongoDB server crashes "TTLMonitor exception: need a non-empty collection name" Created: 02/Feb/16  Updated: 05/Mar/16  Resolved: 05/Mar/16

Status: Closed
Project: Core Server
Component/s: MMAPv1
Affects Version/s: 3.0.5
Fix Version/s: None

Type: Bug Priority: Critical - P2
Reporter: Kuan Yu Assignee: Kelsey Schubert
Resolution: Incomplete Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File mongod.2016-01-16T05-10-21.mdmp     Text File mongod.log    
Operating System: ALL
Steps To Reproduce:

Difficult to reproduce.

Participants:

 Description   

After running MongoDB server 3.0.5 in a Windows 7 SP1 machine (64bit) for several days, it suddenly crashed with the following exception (full log file is attached):

2016-01-16T16:10:21.133+1100 I -        [TTLMonitor] Assertion: 28538:need a non-empty collection name
2016-01-16T16:10:21.219+1100 I CONTROL  [TTLMonitor] mongod.exe      index_collator_extension+0x142e23
2016-01-16T16:10:21.219+1100 I CONTROL  [TTLMonitor] mongod.exe      index_collator_extension+0xfa337
2016-01-16T16:10:21.219+1100 I CONTROL  [TTLMonitor] mongod.exe      index_collator_extension+0xed2f7
2016-01-16T16:10:21.219+1100 I CONTROL  [TTLMonitor] mongod.exe      ???
2016-01-16T16:10:21.220+1100 I CONTROL  [TTLMonitor] mongod.exe      index_collator_extension+0x15562
2016-01-16T16:10:21.220+1100 I CONTROL  [TTLMonitor] mongod.exe      index_collator_extension+0x150cc
2016-01-16T16:10:21.220+1100 I CONTROL  [TTLMonitor] mongod.exe      index_collator_extension+0x15b5e
2016-01-16T16:10:21.220+1100 I CONTROL  [TTLMonitor] mongod.exe      index_collator_extension+0xeef38
2016-01-16T16:10:21.220+1100 I CONTROL  [TTLMonitor] mongod.exe      index_collator_extension+0x1625e1
2016-01-16T16:10:21.220+1100 I CONTROL  [TTLMonitor] MSVCR120.dll    beginthreadex+0x107
2016-01-16T16:10:21.220+1100 I CONTROL  [TTLMonitor] MSVCR120.dll    endthreadex+0x192
2016-01-16T16:10:21.220+1100 I CONTROL  [TTLMonitor] kernel32.dll    BaseThreadInitThunk+0xd
2016-01-16T16:10:21.220+1100 I CONTROL  [TTLMonitor] 
2016-01-16T16:10:21.223+1100 I COMMAND  [conn29] command dcms_archive_file.$cmd command: createIndexes { createIndexes: "fs.files", indexes: [ { key: { filename: 1, uploadDate: 1 }, name: "filename_1_uploadDate_1" } ] } keyUpdates:0 writeConflicts:0 numYields:0 reslen:149 locks:{ Global: { acquireCount: { r: 1, w: 1 } }, MMAPV1Journal: { acquireCount: { w: 2 } }, Database: { acquireCount: { W: 1 }, acquireWaitCount: { W: 1 }, timeAcquiringMicros: { W: 102815 } } } 102ms
2016-01-16T16:10:21.223+1100 E COMMAND  [TTLMonitor] backgroundjob TTLMonitor exception: need a non-empty collection name
2016-01-16T16:10:21.225+1100 I CONTROL  [TTLMonitor] *** unhandled exception 0xE06D7363 at 0x000007FEFDB3ADCD, terminating
2016-01-16T16:10:21.226+1100 I CONTROL  [TTLMonitor] *** stack trace for unhandled exception:
2016-01-16T16:10:21.278+1100 I CONTROL  [TTLMonitor] KERNELBASE.dll    RaiseException+0x3d
2016-01-16T16:10:21.278+1100 I CONTROL  [TTLMonitor] MSVCR120.dll      _BuildCatchObjectHelper+0x3b1
2016-01-16T16:10:21.278+1100 I CONTROL  [TTLMonitor] ntdll.dll         RtlRestoreContext+0x2e2
2016-01-16T16:10:21.278+1100 I CONTROL  [TTLMonitor] mongod.exe        index_collator_extension+0xeef38
2016-01-16T16:10:21.278+1100 I CONTROL  [TTLMonitor] mongod.exe        index_collator_extension+0x1625e1
2016-01-16T16:10:21.278+1100 I CONTROL  [TTLMonitor] MSVCR120.dll      beginthreadex+0x107
2016-01-16T16:10:21.278+1100 I CONTROL  [TTLMonitor] MSVCR120.dll      endthreadex+0x192
2016-01-16T16:10:21.278+1100 I CONTROL  [TTLMonitor] kernel32.dll      BaseThreadInitThunk+0xd
2016-01-16T16:10:21.278+1100 I -        [TTLMonitor] 
2016-01-16T16:10:21.278+1100 I CONTROL  [TTLMonitor] writing minidump diagnostic file C:\mongodb\mongod.2016-01-16T05-10-21.mdmp
2016-01-16T16:10:21.386+1100 I CONTROL  [TTLMonitor] *** immediate exit due to unhandled exception

No replica set. No sharding.

It looks like the exception happens in TTLMonitor module (https://github.com/mongodb/mongo/blob/r3.0.5/src/mongo/db/ttl.cpp) when it tries to iterate all collection namespaces and finds one collection namespace to be invalid.



 Comments   
Comment by Kelsey Schubert [ 03/Feb/16 ]

Hi yukuan2008@gmail.com,

Thank you for providing the minidump. To get a better idea of what is going on here please answer the following questions.

  1. Was this system running previous versions of MongoDB prior to 3.0.5? If so, can you list the upgrade path?
  2. Can you provide the output of db.getCollectionInfos()?
  3. Can you please post the output of db.collection.getIndexes() on any TTL collections?

Thank you,
Thomas

Comment by Kuan Yu [ 02/Feb/16 ]

Memory dump is attached.

Comment by Ramon Fernandez Marina [ 02/Feb/16 ]

yukuan2008@gmail.com, can you please upload the C:\mongodb\mongod.2016-01-16T05-10-21.mdmp minidump to this ticket?

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