[SERVER-24056] PPC64LE Debug needs higher stack reservation for SpiderMonkey Created: 04/May/16  Updated: 16/May/16  Resolved: 09/May/16

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

Type: Bug Priority: Major - P3
Reporter: Mark Benvenuto Assignee: Mark Benvenuto
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Steps To Reproduce:

mongo jstests/core/recursion.js

Sprint: Platforms 14 (05/13/16)
Participants:
Linked BF Score: 0

 Description   

recursion.js is triggered an infinite stack recursion, but it is failing to throw the error because it triggers a stack overflow. We need to increase the stack reservation as a result.

#0  0x00003fffb7a9f734 in pthread_once () from /lib64/power8/libpthread.so.0
#1  0x00000000108f1c60 in CheckForDanglingWrites (queue_entry=...) at src/third_party/gperftools-2.5/src/debugallocation.cc:636
#2  MallocBlock::ProcessFreeQueue (b=<optimized out>, size=<optimized out>, max_free_queue_size=<optimized out>) at src/third_party/gperftools-2.5/src/debugallocation.cc:623
#3  0x00000000108ea9a0 in Deallocate (given_size=0, type=-271733872, this=<optimized out>) at src/third_party/gperftools-2.5/src/debugallocation.cc:571
#4  DebugDeallocate (ptr=0x3fffb3f36e20, type=-271733872, given_size=0) at src/third_party/gperftools-2.5/src/debugallocation.cc:1039
#5  0x00000000110efc38 in tc_cfree (ptr=0x3fffb3f36e20) at src/third_party/gperftools-2.5/src/debugallocation.cc:1256
#6  0x00000000105fc670 in operator() (__closure=<optimized out>, b=0, ptr=0x3fffb3f36e20) at src/mongo/scripting/mozjs/jscustomallocator.cpp:193
#7  wrap_alloc<js_free(void*)::<lambda(void*, size_t)> > (bytes=0, func=<optimized out>, ptr=0x3fffb3f36e20) at src/mongo/scripting/mozjs/jscustomallocator.cpp:129
#8  js_free (p=0x3fffb3f36e20) at src/mongo/scripting/mozjs/jscustomallocator.cpp:195
#9  0x0000000010d92134 in free_ (this=0x3fffb55909f0, p=0x3fffb3f36e20) at src/third_party/mozjs-45/extract/js/src/jsalloc.h:126
#10 growTo (aNewCap=46, aV=...) at src/third_party/mozjs-45/include/mozilla/Vector.h:155
#11 mozilla::Vector<js::SavedFrame::Lookup, 60ul, js::TempAllocPolicy>::growStorageBy (this=0x3fffb55909f0, aIncr=<optimized out>) at src/third_party/mozjs-45/include/mozilla/Vector.h:893
#12 0x0000000010d8e62c in growByUninitialized (aIncr=1, this=<optimized out>) at src/third_party/mozjs-45/include/mozilla/Vector.h:983
#13 emplaceBack<js::PreBarriered<JSAtom*>&, unsigned long&, unsigned int&, JSAtom*&, std::nullptr_t, std::nullptr_t, JSPrincipals*, mozilla::Maybe<mozilla::Variant<js::AbstractFramePtr, js::jit::CommonFrameLayout*> >, unsigned char*, js::Activation*> (this=<optimized out>) at src/third_party/mozjs-45/include/mozilla/Vector.h:586
#14 js::SavedStacks::insertFrames (this=0x3fffb66618d8, cx=0x3fffb6a50320, iter=..., frame=..., maxFrameCount=<optimized out>) at src/third_party/mozjs-45/extract/js/src/vm/SavedStacks.cpp:1140
#15 0x0000000010d8ea6c in js::SavedStacks::saveCurrentStack (this=0x3fffb66618d8, cx=0x3fffb6a50320, frame=..., maxFrameCount=<optimized out>) at src/third_party/mozjs-45/extract/js/src/vm/SavedStacks.cpp:1017
#16 0x0000000010bb5cec in JS::CaptureCurrentStack (cx=<optimized out>, stackp=..., maxFrameCount=<optimized out>) at src/third_party/mozjs-45/extract/js/src/jsapi.cpp:6216
#17 0x0000000010c2078c in CaptureStack (stack=..., cx=0x3fffb6a50320) at src/third_party/mozjs-45/extract/js/src/jsexn.cpp:280
#18 js::ErrorToException (cx=0x3fffb6a50320, message=0x3fffb65caac0 "too much recursion", reportp=0x3fffb55913d0, callback=<optimized out>, userRef=<optimized out>) at src/third_party/mozjs-45/extract/js/src/jsexn.cpp:584
#19 0x0000000010bb87e8 in ReportError (cx=0x3fffb6a50320, message=0x3fffb65caac0 "too much recursion", reportp=0x3fffb55913d0, callback=0x10b9ee60 <js::GetErrorMessage(void*, unsigned int)>, userRef=0x0)
    at src/third_party/mozjs-45/extract/js/src/jscntxt.cpp:226
#20 0x0000000010bbc014 in js::ReportErrorNumberVA (cx=0x3fffb6a50320, flags=0, callback=0x10b9ee60 <js::GetErrorMessage(void*, unsigned int)>, userRef=0x0, errorNumber=<optimized out>, argumentsType=<optimized out>,
    ap=0x3fffb5591550 "@\204\r\264\377?") at src/third_party/mozjs-45/extract/js/src/jscntxt.cpp:752
#21 0x0000000010bbc13c in JS_ReportErrorNumberVA (cx=0x3fffb6a50320, errorCallback=0x10b9ee60 <js::GetErrorMessage(void*, unsigned int)>, userRef=0x0, errorNumber=<optimized out>, ap=0x3fffb5591550 "@\204\r\264\377?")
    at src/third_party/mozjs-45/extract/js/src/jsapi.cpp:5322
#22 0x0000000010bbc1b4 in JS_ReportErrorNumber (cx=<optimized out>, errorCallback=<optimized out>, userRef=<optimized out>, errorNumber=<optimized out>) at src/third_party/mozjs-45/extract/js/src/jsapi.cpp:5311
#23 0x0000000010bbcdd0 in js::ReportOverRecursed (maybecx=<optimized out>) at src/third_party/mozjs-45/extract/js/src/jscntxt.cpp:354
#24 0x0000000010d5b238 in CallJSNative (args=..., native=<optimized out>, cx=<optimized out>) at src/third_party/mozjs-45/extract/js/src/jscntxtinlines.h:229



 Comments   
Comment by Githook User [ 09/May/16 ]

Author:

{u'username': u'markbenvenuto', u'name': u'Mark Benvenuto', u'email': u'mark.benvenuto@mongodb.com'}

Message: SERVER-24056 PPC64LE Debug needs higher stack reservation for SpiderMonkey
Branch: master
https://github.com/mongodb/mongo/commit/3becb65be42ff0fe45268efdae9dcfe3744f4ff5

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