[SERVER-10055] Mongod hangs when accessing deeply recursive documents Created: 28/Jun/13  Updated: 29/Sep/14  Resolved: 29/Sep/14

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

Type: Bug Priority: Major - P3
Reporter: Christian Hergert Assignee: Ramon Fernandez Marina
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Fedora 19 w/ 10gen mongo rpms


Attachments: File insert.dat.xz    
Operating System: ALL
Steps To Reproduce:

xzcat insert.dat.xz | nc localhost 27017
mongo test
> db.test.find()

Participants:

 Description   

A deeply nested document will cause the shell to hang. I'm not totally sure it is just the shell, as all CPUs spin and my system hangs. (Keep that in mind while testing).

I've provided a mongo wire message encoded as a file that can be netcat'ed into the server. Then a supplemental query to the collection will cause the shell (and in my case, entire system, including mouse/video/etc) to hang.

The test document that is inserted is just under 16Mb in size, with recursive documents {'': {'': ...}}. Basically large enough to cause any recursive bson parser to stack overflow.



 Comments   
Comment by Ramon Fernandez Marina [ 04/Sep/14 ]

I'm not able to reproduce this behavior on 2.4.4, 2.4.11, 2.6.4 or 2.7.5; what happens instead is that the shell asserts and prints a stack trace (see below), but the server (or my system) is not affected. I'm using Ubuntu 14.04 with tarballs from the downloads page.

MongoDB shell version: 2.4.4
connecting to: test
> db.test.find()
Thu Sep  4 14:13:14.519 Assertion: 16496:V8: NULL Object template instantiated. v8 still executing.
0x7495d1 0x71189b 0x711ddc 0x6eeb8d 0x6efd80 0x6f4fa0 0x992ce3 0x9926c3 0x9ef680 0x12bec5a06362
 mongo(_ZN5mongo15printStackTraceERSo+0x21) [0x7495d1]
 mongo(_ZN5mongo11msgassertedEiPKc+0x9b) [0x71189b]
 mongo() [0x711ddc]
 mongo(_ZN5mongo7V8Scope11mongoToLZV8ERKNS_7BSONObjEb+0x57d) [0x6eeb8d]
 mongo(_ZN5mongo7V8Scope16mongoToV8ElementERKNS_11BSONElementEb+0x5c0) [0x6efd80]
 mongo() [0x6f4fa0]
 mongo(_ZN2v88internal8JSObject35GetPropertyAttributeWithInterceptorEPS1_PNS0_6StringEb+0x453) [0x992ce3]
 mongo(_ZN2v88internal10JSReceiver32GetPropertyAttributeWithReceiverEPS1_PNS0_6StringE+0xb3) [0x9926c3]
 mongo(_ZN2v88internal19Runtime_HasPropertyENS0_9ArgumentsEPNS0_7IsolateE+0x70) [0x9ef680]
 [0x12bec5a06362]
Error: 16496 V8: NULL Object template instantiated. v8 still executing.

Comment by Christian Hergert [ 28/Jun/13 ]

2.4.4 from RPMs in yum (official 10gen repository)

Comment by Daniel Pasette (Inactive) [ 28/Jun/13 ]

possibly duplicate of SERVER-6462. what version is this?

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